A cutting-edge full-stack web application for discovering, reading, and managing books online. BookNest combines seamless reading experiences with premium features like bookmarks, reading progress tracking, and personalized reading goals.
Live Demo: book-nest-ashy.vercel.app
- Added the AI Reading Assistant for contextual book help inside the reader page.
- Improved the reader layout for both desktop sidebar and mobile drawer use.
- Expanded the README with extra showcase space for the chatbot screenshot.
Libraries: React Icons, Lucide React, Ant Design, React PageFlip
Libraries: Axios, Razorpay, CORS, Dotenv
- โจ Features
- ๐ ๏ธ Tech Stack
- ๐ Project Structure
- โ๏ธ Installation & Setup
- ๐ Getting Started
- ๐ API Endpoints
- ๐พ Database Schema
- ๐ Environment Variables
- Contributing
- ๐ Deployment
- ๐ License
- โ User registration with email verification
- โ Secure login with JWT tokens
- โ Password hashing with bcryptjs
- โ Protected routes with middleware
- โ Auto-redirect for authenticated users
- โ Session management
- โ Browse & search books from external APIs
- โ Full-screen custom reader page
- โ Page-flip animation with React PageFlip
- โ Save reading position in database
- โ Book recommendations & discovery
- โ Advanced book filtering & sorting
- โ Responsive design for all devices
- โ Bookmark management (Create, Read, Update, Delete)
- โ Reading goals & daily tasks
- โ Reading progress tracking
- โ Favorite books collection
- โ Premium access lock system
- โ Subscription management
- โ Razorpay payment integration
- โ Subscription plans
- โ Plan upgrade/downgrade
- โ Payment history
- โ Automatic renewal handling
- โ User profile customization
- โ Avatar upload
- โ Bio/About section
- โ Reading statistics
- โ Account settings
- โ Modern, clean interface
- โ Dark/Light mode support ready
- โ Loading skeletons for better UX
- โ Toast notifications
- โ Pagination for book lists
- โ Real-time search
Book_Nest/
โโโ frontend/ # React Vite application
โ โโโ public/ # Static assets
โ โโโ src/
โ โ โโโ assets/ # Images, icons
โ โ โโโ components/ # Reusable React components
โ โ โ โโโ BookCard/
โ โ โ โโโ SearchBar/
โ โ โ โโโ Layout/
โ โ โ โโโ Loader/
โ โ โ โโโ Toast/
โ โ โ โโโ ...
โ โ โโโ pages/ # Page components
โ โ โ โโโ Home/
โ โ โ โโโ Login/
โ โ โ โโโ Signup/
โ โ โ โโโ ReaderPage/
โ โ โ โโโ Library/
โ โ โ โโโ Profile/
โ โ โ โโโ Writing/
โ โ โ โโโ premium/
โ โ โโโ services/ # API service functions
โ โ โโโ context/ # React Context API
โ โ โโโ hooks/ # Custom React hooks
โ โ โโโ config/ # Configuration files
โ โ โโโ App.jsx
โ โ โโโ main.jsx
โ โโโ package.json
โ โโโ vite.config.js
โ
โโโ back-end/ # Express.js server
โ โโโ controllers/ # Business logic
โ โ โโโ authController.js
โ โ โโโ bookController.js
โ โ โโโ bookmarkController.js
โ โ โโโ favoriteController.js
โ โ โโโ paymentController.js
โ โ โโโ premiumController.js
โ โ โโโ profileController.js
โ โ โโโ progressController.js
โ โ โโโ writingController.js
โ โโโ routes/ # API routes
โ โ โโโ authRoutes.js
โ โ โโโ bookRoutes.js
โ โ โโโ bookmarkRoutes.js
โ โ โโโ ...
โ โโโ middleware/ # Express middleware
โ โ โโโ authMiddleware.js
โ โโโ prisma/
โ โ โโโ schema.prisma # Database schema
โ โโโ config/
โ โ โโโ prisma.js
โ โโโ utils/ # Helper functions
โ โ โโโ jwt.js
โ โ โโโ cache.js
โ โ โโโ paginate.js
โ โโโ server.js # Express server entry
โ โโโ package.json
โ โโโ .env # Environment variables
โ
โโโ README.md
โโโ package.json
- Node.js (v16 or higher)
- npm or yarn
- MongoDB (Atlas or local)
- Git
git clone https://github.com/Shamarvey1/BookNest.git
cd Book_Nestcd back-end
npm installcd ../frontend
npm installPORT=5001
DATABASE_URL=mongodb+srv://username:password@cluster.mongodb.net/booknest
JWT_SECRET=your_jwt_secret_key_here
RAZORPAY_KEY_ID=your_razorpay_key_id
RAZORPAY_KEY_SECRET=your_razorpay_secret_keyconst API_URL = "http://localhost:5001/api";
export default API_URL;cd back-end
npm run devServer runs on: http://localhost:5001
cd frontend
npm run devFrontend runs on: http://localhost:5173
Frontend:
cd frontend
npm run build
npm run previewBackend:
cd back-end
npm start| Method | Endpoint | Description |
|---|---|---|
| POST | /signup |
Register new user |
| POST | /login |
Login user |
| GET | /profile |
Get current user profile |
| PUT | /update |
Update user profile |
| Method | Endpoint | Description |
|---|---|---|
| GET | / |
Get all books |
| GET | /:id |
Get book details |
| GET | /search/:query |
Search books |
| Method | Endpoint | Description |
|---|---|---|
| GET | / |
Get all bookmarks |
| POST | / |
Create bookmark |
| PUT | /:id |
Update bookmark |
| DELETE | /:id |
Delete bookmark |
| Method | Endpoint | Description |
|---|---|---|
| GET | / |
Get all favorites |
| POST | / |
Add to favorites |
| DELETE | /:id |
Remove from favorites |
| Method | Endpoint | Description |
|---|---|---|
| GET | / |
Get reading tasks |
| POST | / |
Create reading task |
| PUT | /:id |
Update task |
| DELETE | /:id |
Delete task |
| Method | Endpoint | Description |
|---|---|---|
| GET | / |
Get reading progress |
| POST | / |
Create progress entry |
| PUT | /:id |
Update progress |
| DELETE | /:id |
Delete progress |
| Method | Endpoint | Description |
|---|---|---|
| POST | /create-order |
Create Razorpay order |
| POST | /verify |
Verify payment |
| GET | /history |
Payment history |
| Method | Endpoint | Description |
|---|---|---|
| GET | /status |
Check premium status |
| POST | /upgrade |
Upgrade to premium |
| POST | /cancel |
Cancel subscription |
| Method | Endpoint | Description |
|---|---|---|
| GET | / |
Get profile details |
| PUT | / |
Update profile |
| POST | /avatar |
Upload avatar |
model User {
id String
name String
email String (unique)
password String (hashed)
isPremium Boolean
plan String
validTill DateTime
avatarUrl String
bio String
bookmarks Bookmark[]
favorites Favorite[]
userBooks UserBook[]
readingProgresses ReadingProgress[]
createdAt DateTime
}model Book {
id String
title String
author String
coverImage String
description String
content String
totalPages Int
language String
bookmarks Bookmark[]
favorites Favorite[]
userBooks UserBook[]
}- Bookmark: User bookmarks for specific pages/books
- Favorite: User's favorite books collection
- ReadingProgress: Track reading progress per book
- UserBook: User reading history
PORT # Server port (default: 5001)
DATABASE_URL # MongoDB connection string
JWT_SECRET # Secret key for JWT tokens
RAZORPAY_KEY_ID # Razorpay public key
RAZORPAY_KEY_SECRET # Razorpay secret key
NODE_ENV # Environment (development/production)Configured in frontend/src/config/endpoint.js:
const API_URL = "http://localhost:5001/api";We welcome contributions! Here's how to help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/YourFeature) - Commit your changes (
git commit -m 'Add YourFeature') - Push to the branch (
git push origin feature/YourFeature) - Open a Pull Request
- Use meaningful variable and function names
- Add comments for complex logic
- Follow ESLint rules (run
npm run lint) - Test before submitting PR
- Push to GitHub
- Connect repository to Vercel
- Set environment variables
- Deploy automatically on push to main branch
- Create account on Render/Railway
- Connect GitHub repository
- Set environment variables
- Deploy from main branch
- Advanced book recommendations using AI/ML
- Social features (sharing, comments, ratings)
- Reading clubs and community features
- Offline reading mode
- Audio narration support
- Advanced analytics dashboard
- Mobile app (React Native)
- Dark mode implementation
- Email notifications
- Book discussion forums
- GitHub Issues: Report bugs
- Email: [Contact author]
- Documentation: [Wiki/Docs]
This project is licensed under the ISC License - see the LICENSE file for details.
Shamarvey - Full Stack Developer
- GitHub: @Shamarvey1
- Repository: BookNest
- External book APIs for book data
- MongoDB for database hosting
- Razorpay for payment processing
- Vercel for frontend deployment
- Open source community
Made with โค๏ธ by Shamarvey
npm start
๐ป Frontend Setup cd frontend npm install npm run dev
๐ API (Auth) Signup
POST /api/auth/signup
{ "name": "Ajit", "email": "ajitlookforbest@gmail.com", "password": "123456" }
Login
POST /api/auth/login
{ "email": "ajitlookforbest@gmail.com", "password": "123456" }
Response: { "token": "JWT_TOKEN" }
๐ธ Screenshots ๐ฆ Landing Page
๐ Home Page
๐ Reader Page
๐ค AI Chatbot
AI Book Summary Generator
Razorpay payment integration
User Profile Page
Book Upload (for creators)
Search + Filter + Pagination
Reading Statistics Dashboard
๐จ๐ปโ๐ป Author
Ajit Kumar Prasad (Shamarvey) Full Stack Developer ๐ Rourkela, Odisha ๐ง Email: ajitlookforbest@gmail.com



