NextChapter is a modern digital library platform that revolutionizes online reading. Users can explore, read, and manage their book collections with AI-powered recommendations, content moderation, personalized reading experiences, and comprehensive analytics. Built with a focus on user experience, accessibility, and scalability.
- Advanced Search & Filters β Find books by title, author, genre, language, and rating
- Built-in PDF Reader β Read books directly in the browser with PDF.js integration
- Dark/Light Theme β Seamless theme switching with persistent preferences
- Fully Responsive β Optimized for desktop, tablet, and mobile devices
- Authentication System β Secure sign-up/sign-in with OAuth support (Google, GitHub)
- AI Content Moderation β Groq-powered moderation for user-generated content
- Personalized Recommendations β Smart book suggestions based on reading preferences
- Genre-Based Discovery β Curated book collections by genre
- Reading Statistics β Track books read, pages completed, and reading time
- Reading Activity β Visual charts showing daily/weekly reading patterns
- Monthly Progress β Monitor reading goals and achievements
- Reading Challenge β Set and track annual reading goals
- Currently Reading β Quick access to books in progress
- Pinned Books β Bookmark favorite books for easy access
- Genre Preferences β Customize reading recommendations
- Book Management β Add, edit, and delete books
- Bulk Upload β Upload multiple books via CSV with cover images and PDFs
- User Management β View and manage user accounts
- Analytics Dashboard β Track platform usage and statistics
- Reading Lists β Organize books into custom lists
- Already Read β Track completed books
- Trending Books β Discover popular titles
- Highest Rated β Browse top-rated books
- New Releases β Stay updated with latest additions
- Word Meaning Search β Built-in dictionary for vocabulary lookup
- Subscription System β Premium membership with Razorpay integration
- Profile Management β Customize user profiles and preferences
- Contact & Support β User support and feedback system
- Legal Pages β Privacy policy, terms of service, refunds, and shipping info
- Custom Cursor β Enhanced UI interactions
- Error Boundaries β Graceful error handling
- Loading States β Smooth loading animations
- React 18 β Modern UI library with hooks
- Vite β Lightning-fast build tool and dev server
- Tailwind CSS 4 β Utility-first CSS framework
- Framer Motion β Smooth animations and transitions
- React Router DOM β Client-side routing
- Lucide React β Beautiful icon library
- Recharts β Data visualization for analytics
- PDF.js β PDF rendering in browser
- Socket.io Client β Real-time features
- React Toastify β Toast notifications
- Supabase β Backend-as-a-Service (Database, Auth, Storage)
- FastAPI (Python) β AI moderation service
- Groq API β AI-powered content moderation
- FingerprintJS β Device fingerprinting
- DOMPurify β XSS protection
- date-fns β Date manipulation
- Razorpay β Payment gateway integration
- Vercel β Frontend hosting
- Render β Backend AI service hosting
NextChapter-React/
βββ frontend/ # React application
β βββ src/
β β βββ components/ # Reusable UI components
β β β βββ dashboard/ # Dashboard-specific components
β β β βββ Admin.jsx # Admin panel
β β β βββ BulkUploadModal.jsx # Bulk book upload
β β β βββ Header.jsx # Navigation header
β β β βββ HeroSection.jsx
β β β βββ BookSection.jsx
β β β βββ PdfViewer.jsx # PDF reader
β β β βββ Reader.jsx # Book reader
β β β βββ ...
β β βββ pages/ # Page components
β β β βββ LandingPage.jsx
β β β βββ BooksPage.jsx
β β β βββ BookDetailPage.jsx
β β β βββ ProfilePage.jsx
β β β βββ ExploreBooksPage.jsx
β β β βββ ReadingListPage.jsx
β β β βββ SignInPage.jsx
β β β βββ ...
β β βββ contexts/ # React contexts
β β β βββ AuthContext.jsx
β β β βββ ThemeContext.jsx
β β βββ hooks/ # Custom React hooks
β β β βββ useRazorpay.js
β β βββ lib/ # Utility functions
β β β βββ supabaseClient.js
β β β βββ bookUtils.js
β β β βββ dashboardUtils.js
β β β βββ errorHandler.js
β β β βββ ...
β β βββ services/ # API services
β β β βββ moderation/
β β βββ pdf/ # PDF utilities
β β βββ App.jsx
β β βββ main.jsx
β β βββ index.css
β βββ public/ # Static assets
β β βββ books-data.json
β β βββ bulk-upload-template.csv
β β βββ pdfs/
β β βββ pdfjs/
β βββ vite.config.js
β βββ tailwind.config.js
β βββ package.json
βββ backendAI/ # Python AI service
β βββ main.py # FastAPI server
β βββ requirements.txt
β βββ render.yaml
β βββ Setup_AI_Moderation.md
βββ documentation/ # Project documentation
β βββ elicitation/
β βββ EPICS.md
β βββ user-stories.md
β βββ sprints.md
βββ gallery/ # Screenshots & media
βββ README.md- Node.js 18+ and npm
- Python 3.8+ (for AI moderation service)
- Supabase account
- Groq API key (for AI moderation)
git clone https://github.com/Prasanna-Gupta/NextChapter.git
cd NextChapter-React/frontendnpm installCreate a .env file in the frontend directory:
VITE_SUPABASE_URL=your_supabase_project_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
VITE_RAZORPAY_KEY_ID=your_razorpay_key_idnpm run devhttp://localhost:5173
cd backendAI# Windows
python -m venv venv
.\venv\Scripts\activate
# macOS/Linux
python3 -m venv venv
source venv/bin/activatepip install -r requirements.txtCreate a .env file in the backendAI directory:
GROQ_API_KEY=your_groq_api_key_here
PORT=8000python -m uvicorn main:app --reloadThe AI moderation service will be available at http://localhost:8000
npm run dev- Start development server (Vite)npm run build- Build for productionnpm run preview- Preview production build
python -m uvicorn main:app --reload- Start AI service with hot reload- Access API docs at
http://localhost:8000/docs
NextChapter follows a clean, modern design approach:
- Minimalist Interface β Focus on content, not clutter
- Cream & Coral Color Scheme β Warm, inviting aesthetic
- Dark Mode Support β Reduce eye strain for night reading
- Smooth Animations β Framer Motion for delightful interactions
- Responsive Layout β Seamless experience across all devices
- Accessibility First β WCAG compliant design patterns
- books - Book catalog with metadata, cover images, and PDF files
- users - User accounts and profiles
- reading_progress - Track user reading progress
- reading_lists - User-created book lists
- subscriptions - Premium membership data
- user_preferences - Personalization settings
- covers - Book cover images
- pdfs - Book PDF files
Admins can upload multiple books at once using a CSV file:
- Download the CSV template from the admin panel
- Fill in book details (title, author, description, genres, etc.)
- Add
cover_filenameandpdf_filenamecolumns - Upload the CSV along with corresponding image and PDF files
- System automatically matches files by name and uploads to Supabase
- Powered by Groq API for real-time content analysis
- Moderates user comments, reviews, and feedback
- Flags inappropriate content automatically
- FastAPI backend service deployed on Render
- Tracks reading time, pages read, and books completed
- Visual charts using Recharts
- Monthly and yearly progress tracking
- Reading streak and challenge features
- Genre preference selection
- AI-powered book recommendations
- Customized book discovery based on reading history
- Trending and highest-rated book suggestions
- XSS Protection - DOMPurify sanitization
- Authentication - Supabase Auth with OAuth
- Device Fingerprinting - FingerprintJS for security
- Error Boundaries - Graceful error handling
- Input Validation - Pydantic models for API validation
npm run build
# Deploy the dist/ folder to Vercel