Partho.
  • Projects
  • Skills
  • Contact
  • Education
  • About Me
  • Projects
  • Skills
  • Contact
  • Education
  • About Me
PreviousEducationNextContact

Partho Mukherjee

Full Stack Web Developer

© 2026 Partho Mukherjee. All rights reserved.

Back to Projects

BookNook

Live / Deployed

Add a book, borrow a book, return a book.

Full-stack web application
Live Demo Client Code Server Code Server API
BookNook screenshot

Project Overview

BookNook is a small online library where readers can browse a shared collection, add their own books, borrow a book for 14 days, and return it when done. Each user manages only their own books and borrows, protected by Better Auth and JWT verification.

Author: Partho Mukherjee•parthomukherjee582@gmail.com

Technologies

Express.jsNode.jsNext.js 16 (App Router)MongoDB AtlasBetter AuthTypeScriptTailwind CSSshadcn/uiJWT (jose)Swiper.jsSonnerLucide ReactReact Iconsimgbb APIVercel

Detailed Tech Architecture

Frontend

  • Framework: Next.js 16 (App Router)
  • Styling: Tailwind CSS
  • UI Components: shadcn/ui
  • Auth: Better Auth (MongoDB adapter, JWT plugin)

Backend

  • Runtime: Node.js 20+
  • Framework: Express.js
  • Verification: jose (JWT + remote JWKS)

Database

  • Name: BooksForBooknook
  • Collections: latestBooks, myAddedBook, borrows

Deployment

  • Client: Vercel
  • Server: Vercel

Key Features

Secure authentication with Better Auth (email/password and Google login)
JWT-protected API verified against the Better Auth JWKS endpoint
Private routes protected by a proxy with redirect back after login
Persistent login on page reload
Home slider built with Swiper.js
New Arrivals section showing the 6 latest books from MongoDB
All Books page with responsive equal-height cards
Book Details page with owner info and Borrow button
Add Book form with imgbb image upload and category select
My Books: edit in a pre-filled modal, delete with confirmation modal
Borrow system with 14-day return date
Duplicate borrow prevention (409 conflict)
My Borrows table with Return Book action
Toast notifications for all success and error messages
Loading spinners
Custom 404 page
Dynamic page titles on every route
Fully responsive design (mobile, tablet, desktop)
Password validation (min 6 chars, uppercase and lowercase)

Architecture & System Logic

Repository Pattern: Separate client and server repositories

Authentication & Data Verification Flow:

  • 1User registers or logs in with Better Auth (email/password or Google)
  • 2Proxy checks the session cookie before opening private pages
  • 3Client requests a JWT and sends it as Authorization: Bearer <token>
  • 4Server verifies the token via JWKS (signature, issuer, audience)
  • 5Server uses the verified email to return or change only that user's data

Application Routes & Pages

Homepublic
/
All Bookspublic
/AllBooks
Book Detailsprivate
/AllBooks/[id]
Add Bookprivate
/add-book
My Booksprivate
/my-books
My Borrowsprivate
/my-borrows
My Profileprivate
/profile
Loginpublic
/login
Registerpublic
/register
404 Not Foundpublic
*

Future Roadmap & Enhancements

  • Protect POST /allbooks and the /borrows routes with verifyToken and req.user.email, matching the /my-books pattern
Previous ProjectPizza Dot
All Projects
Next ProjectBazarDor