BookStore is a web application for buying and selling books online. It is built using the MERN stack (MongoDB, Express.js, React.js, and Node.js).
- User authentication and authorization
- Browse books by categories
- Search for books by title, author, or genre
- Add, edit, or delete book listings (for sellers)
- Purchase books (for buyers)
- User profile management
- Reviews and ratings for books
- Order history tracking
A live demo of the application is available at Demo Link
-
Frontend:
- React.js
- Axios (for API requests)
- React Router (for navigation)
- CSS/SCSS for styling
-
Backend:
- Node.js
- Express.js
- MongoDB (Mongoose for ORM)
- JWT (for authentication)
- Bcrypt (for password hashing)
To run this project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/ritikanigade13/ShelfSwap cd ShelfSwap -
Install dependencies:
-
Backend dependencies:
cd server npm install -
Frontend dependencies:
cd ../client npm install
-
-
Set up environment variables:
Create a
.envfile in theserverdirectory with the following contents:MONGO_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret -
Run the application:
-
Start the backend server:
cd server npm run dev -
Start the frontend development server:
cd ../client npm run dev
The application should now be running on http://localhost:3000.
-
POST /api/auth/register- Register a new userPOST /api/auth/login- Log in an existing user
GET /api/books- Get all booksPOST /api/books- Add a new book (requires authentication)GET /api/books/:id- Get a single book by IDPUT /api/books/:id- Update a book by ID (requires authentication)DELETE /api/books/:id- Delete a book by ID (requires authentication)
GET /api/users/:id- Get user profile by IDPUT /api/users/:id- Update user profile (requires authentication)DELETE /api/users/:id- Delete user profile (requires authentication)
If you have any questions, feel free to reach out:
- Email: nigaderitika13@gmail.com
- GitHub: ritikanigade13
This project was created for learning purposes and is not intended for commercial use.