Welcome to the MERN BookStore! This project is a full-stack bookstore application developed using the MERN stack (MongoDB, Express, React, Node.js).
- 🔒 User Authentication: Sign up, log in, and log out functionality.
- 📚 Book Management: Add, edit, delete, and view books.
- 🛒 Shopping Cart: Add books to the cart and proceed to checkout.
- 📦 Order Management: View order history and order details.
The backend of the project is built with Node.js, Express, and MongoDB.
server.js: The main entry point for the backend application.config/: Contains configuration files for connecting to the database and other settings.controllers/: Contains the logic for handling requests and responses.models/: Defines the data models used by the application.routes/: Defines the API endpoints and routes.middleware/: Contains middleware functions for request processing and authentication.utils/: Utility functions and helpers.
The frontend of the project is built with React.
src/: Contains the source code for the React application.components/: Reusable UI components.pages/: Page components corresponding to different routes.services/: Functions for making API calls.App.js: The main app component.index.js: The entry point for the React application.App.css: The main stylesheet.
-
Install Dependencies
npm install
-
Environment Variables
Create a
.envfile in thebackenddirectory and add the following:MONGO_URI=your_mongo_connection_string JWT_SECRET=your_jwt_secret -
Run the Server
npm start
-
Install Dependencies
npm install
-
Run the Application
npm start
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/YourFeature). - Commit your changes (
git commit -m 'Add some feature'). - Push to the branch (
git push origin feature/YourFeature). - Create a pull request.
This project is licensed under the MIT License.
