BookWebsite is a modern, full-stack platform for authors to publish and update their books continuously and for readers to enjoy a seamless, lightweight reading experience. The platform uses a "Netflix-style" tiered data loading approach to ensure fast browsing even with a large library.
⚠️ Status: This project is currently in active development.
- Backend: Built with FastAPI (Python), providing a high-performance asynchronous API.
- Database: MongoDB for flexible document storage of books, authors, and reader profiles.
- Frontend: Built with Next.js 14 (React), TypeScript, and Vanilla CSS for a clean, "book-like" aesthetic.
- Infrastructure: Fully containerized using Docker and Docker Compose.
- Tiered Data Loading: Browse books using "Card View" (titles/images only) for maximum speed. Full content is only loaded when you start reading.
- Chapter System: Books are organized into chapters, allowing for organized reading and efficient data retrieval.
- Author Panel: Dedicated space for authors to create books, manage biographies, and publish new chapters.
- Reader Lists: Readers can save books to their "Favorites", "Currently Reading", or "Finished" lists.
- Cloud Seeding: Includes a utility script to seed the database with real book data from the Open Library API.
- Docker Desktop (Must be installed and running)
- Git
Recommended for users who just want to run the website without looking at the code.
This method pulls pre-built, production-ready images directly from our GitHub Container Registry (GHCR).
-
Download the Docker Compose file:
# Create a directory for the project and enter it mkdir book-website && cd book-website # Download the compose file curl -L https://raw.githubusercontent.com/Nzouh/BookWebsite/main/docker-compose.yml -o docker-compose.yml
-
Pull the latest images:
docker compose pull
-
Start the application:
docker compose up
-
Verify services:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
Recommended for developers who want to modify the code or contribute.
-
Clone the repository:
git clone https://github.com/Nzouh/BookWebsite.git cd BookWebsite -
Build and start:
docker compose up --build
-
Seed the database (Optional): If you want to quickly populate the site with books:
pip install -r requirements.txt python scripts/seed_books.py
This project uses GitHub Actions for continuous integration and deployment.
- Automated Builds: Every push to the
mainbranch triggers a workflow that builds and pushes new Docker images to GHCR. - Image Registry: You can find all published images at github.com/Nzouh/BookWebsite/pkgs.
- Testing: A dedicated
docker-compose.test.ymlis available to simulate the production environment locally by pulling the latest images and running tests.
One of the most exciting upcoming features is the Context-Aware AI Assistant.
When reading a book, users often encounter complex terms or forget character details from previous chapters. You will be able to ask an AI assistant for help while reading.
Using Redis for high-speed context lookup, the AI will be engineered with a "Knowledge Guard":
- Spoiler Prevention: The AI only "knows" what the reader has already read. If a reader asks a question about a character while on Chapter 2, the AI will not reveal information from Chapter 10.
- Book-Specific Knowledge: The AI helps with definitions but focuses on the story's internal logic and character relationships based on the current progress level.
This project is open-source and available under the MIT License.