BookShop is an e-commerce application for browsing and purchasing books. The project includes a Flask backend for handling API requests and a React frontend for the user interface.
Deployed Site: Live Demo
Blog Article: Final Project Blog
Authors:
- Kareem Hany (LinkedIn) - Backend Developer
- Youssef Ahmed (LinkedIn) - Backend Developer
- Sayed Abdelaal (LinkedIn) - Frontend Developer
- Features
- Technology Stack
- Installation
- Usage
- Contributing
- License
- Screenshots
- Admin access
- Story and Technical Details
- User authentication (register, login, logout, reset password, login with google)
- Cart functionality (add, view, update, and remove items)
- Wishlist management
- Book catalog with search and filter options
- Checkout process
- Admin dashboard for managing books, users, and orders
- Frontend: React, HTML, CSS, TypeScript, Redux
- Backend: Python, Flask, SQLAlchemy
- Database: SQLite
- Authentication: Session
- Dependency Management: pip, virtualenv
-
Clone the Repository
git clone https://github.com/sayedabdelal/BookShop.git cd BookShop
-
Install
virtualenv
(if not already installed)pip install virtualenv
-
Create a Virtual Environment Navigate to your project directory and create a virtual environment:
python3 -m venv venv
-
Activate the Virtual Environment To activate the virtual environment:
source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the backend dependencies
pip install -r requirements.txt
-
Set Up Environment Variables Copy the
.env.example
file to.env
and fill in the necessary environment variables.cp backend/.env.example backend/.env
Note: The .env file is used to configure the backend. Ensure you provide the required values for the environment variables listed in the .env.example.
-
Install frontend dependencies (Terminal 1)
cd frontend npm install
-
Run the frontend development server
npm run dev
-
Run the backend server (Terminal 2)
open new terminal and run this command in BookShop directory
python3 run_backend.py
-
Open the webiste
Navigate to http://localhost:5173/ in your browser.
- Create an account and log in.
- Browse through available book in shop or use the search feature to find books.
- Add books to your cart and proceed to checkout.
- Manage your cart and wishlist.
- Add favorite books to your wishlist.
Contributions are welcome! If you'd like to contribute, please fork the repository and create a new branch with your feature or bug fix.
- Fork the repository
- Create a new feature branch
- Push your changes
- Create a pull request
This project is licensed under the MIT License. See the LICENSE file for more details.
Dark mode enabled! After login, you can add items to the cart or wishlist.
Admin dashboard for managing users and books:
If you'd like to explore the admin dashboard, you can use the following credentials:
- Email: [email protected]
- Password: admin1234
Note: These credentials are only for demo purposes and should not be used in production environments.
The inspiration for BookCorner came from a need to simplify the book shopping experience. I wanted to create a platform where users could easily find books, manage their carts, and make purchases without hassle.
One of the biggest challenges was managing user authentication and secure sessions across the frontend and backend. Flask's session management, along with React's state handling, required careful configuration to ensure that users remained logged in across different sessions.
Another area of focus was ensuring the smooth operation of cart and wishlist functionality. I also learned the importance of handling asynchronous operations with React Query and making API calls to the backend.
In the next iteration, I aim to:
- Add user reviews and book ratings
- Implement a recommendation engine based on purchase history
- Further enhance the search functionality with filters for author, price, and publication year