Bookshelf is a web application for browsing, searching, and managing your favorite books. It allows users to explore books, view detailed information, and save their favorite books for easy access.
- Search Books: Search for books by title, author etc.
- View Details: View detailed information about a book, including its description, authors, and related subjects.
- Favorite Books: Save books to your favorites for quick access.
- Responsive Design: Responsive UI for desktop and mobile.
- Accessibility: High accessibility.
- Pagination: Navigate books and favorites with pagination.
- Caching: Caching enabled via with Next.js.
- Tests: Missing tests.
- Types: Frontend types are not generated from Backend.
- Tailwind styling: Some Unused/global styling not fully cleaned up.
- Frontend: React/Next, TypeScript, Tailwind CSS
- Backend: Node.js, Express, Prisma ORM, PostgreSQL
- Component library: Shadcn and Radix primitives as base, modified to fit my design.
- Icons: Lucide
- State Management: Context API
- UNIX based OS (mac, linux or WSL2 for windows)
- Node.js (v22 or higher), nvm recommended.
- Docker (for running PostgreSQL)
- yarn v1
-
Navigate to the
api
folder:cd api
-
Install dependencies:
yarn install
-
Create a
.env
file in the /api folder, copy from.env.example
cp .env.example .env
-
Start PostgreSQL container, run Prisma migrations to setup database schema, and start dev server.
yarn setup:dev
-
Open Prisma Studio to inspect the database (optional):
yarn prisma:studio
-
The backend will be running at http://localhost:3333.
-
Navigate to the
web
folder:cd web
-
Install dependencies:
yarn install
-
Create a
.env
file in the /web folder, copy from.env.example
cp .env.example .env
-
Build and start server
yarn build yarn start # You can also use the dev server
-
Open your browser and navigate to http://localhost:3000.