This repository contains the code for a fully functional bookstore website built using React, Node.js, Express, MongoDB, and Vite. The website includes features like user authentication, authorization and a book carousel slider with course course section which is accessible to authorized user only.
-
Frontend:
- React
- Vite
- React Router
- Tailwind CSS
- Axios
-
Backend:
- Node.js
- Express
- MongoDB
- Mongoose
- bcryptjs
- User Authentication: Secure login and registration using JWT.
- User Authorization: Role-based access control for different user actions.
- Book Carousel Slider: Attractive slider to showcase featured books.
- Responsive Design: Fully responsive design for mobile, tablet, and desktop.
- Node.js (v14.x or later)
- MongoDB
git clone https://github.com/Ketan-Chaudhary/BookStore.git
cd bookstore
cd backend
npm install
cd ../frontend
cd /bookstore
npm install
Create a .env
file in the backend
directory and add the following environment variables:
MONGO_URI=your_mongodb_connection_string
PORT=5000
cd backend
npm start
cd frontend
cd bookstore
npm run dev
The frontend will be served at http://localhost:3000
and the backend at http://localhost:5000
.
Contributions are welcome! Please fork the repository and create a pull request with your changes. Make sure to follow the code style and write tests for new features.
- Fork the repository
- Create a new branch (
git checkout -b feature-branch
) - Commit your changes (
git commit -m 'Add new feature'
) - Push to the branch (
git push origin feature-branch
) - Create a pull request