Description: The BookStore application is a full-stack web platform built using the MERN stack (MongoDB, Express.js, React.js, and Node.js). It allows users to browse, purchase, and manage books online, with features tailored for both customers and administrators.
This project is open for collaboration! Developers, designers, and tech enthusiasts are welcome to contribute and enhance the platform together.
User Authentication: Secure login and signup functionality using JWT or session-based authentication. Book Browsing: Browse books by categories, genres, or authors. Search and Filter: Real-time search bar with sorting and filtering options (e.g., price, rating). Book Details Page: Detailed descriptions, reviews, and ratings for each book. Cart Management: Add, remove, and view items in the shopping cart. Checkout Flow: A user-friendly interface for placing orders, including address and payment information.
API Development: RESTful APIs for handling book data, user management, and orders. Admin Features: Manage books, inventory, and view sales reports. Order Processing: Handle order creation, updates, and status tracking. Security: Hashing of passwords and secure data transfer. Database (MongoDB): Data Models: Users: Stores user profiles, authentication credentials, and order history. Books: Manages book details such as title, author, publishYear, price Orders: Tracks orders placed by users, including items, payment status, and delivery updates.
Docker Setup The entire project is containerized using Docker to ensure consistency and portability across environments.
Dockerfile:
FROM node:20-alpine
WORKDIR /app
COPY package.json ./
RUN npm install
COPY . .
RUN npm run build
EXPOSE 5173
CMD ["npm", "run", "dev"]
docker build -t frontend .
docker run --name frontend -d -p 5173:5173 frontend
Dockerfile:
node:18-alpine
WORKDIR /app
COPY package.json ./
RUN npm install
COPY . .
EXPOSE 3333
CMD ["npm", "run", "dev"]
docker build -t backend .
docker run --name backend -d -p 3333:3333 backend
Run MongoDB using Docker:
docker run --name mongodb --network=mern-stack -d -p 27017:27017 -v ~/opt/data:/data/db mongo:latest
Docker Compose
To streamline the process, a docker-compose.yml file combines all services:
version: '3.8'
services:
frontend:
build:
context: ./frontend
ports:
- "5173:5173"
depends_on:
- backend
backend:
build:
context: ./backend
ports:
- "3333:3333"
depends_on:
- database
database:
image: mongodb
container_name: bookstore-mongodb
ports:
- "27017:27017"
This project is open for collaboration! Contributions are welcome in the following areas:
Frontend Development: Enhancing UI/UX, adding animations, or improving responsiveness. Backend Development: Optimizing APIs, adding new features, or improving performance. Database Management: Structuring and optimizing database schemas. Testing: Writing unit, integration, or end-to-end tests. DevOps: Improving Docker configurations or CI/CD pipelines. If you're interested, feel free to fork the repository, submit pull requests, or propose new features via issues. Let’s build something amazing together!