Codebook is a full-fledged e-commerce web application built using React, Tailwind CSS, Context API, JSON Server, JWT Authentication, and deployed on Netlify and Render. This project simulates a real-world e-commerce platform with features like search functionality, order history, authentication (registration and login), and theme switching.
- JWT Authentication: Secure login and registration using JSON Server Auth.
- Search Functionality: Search products by name with partial matching.
- Order History: Users can view past orders, providing a complete shopping experience.
- Theme Controller: Supports light/dark mode switching.
- Fully Responsive: Optimized for all screen sizes using Tailwind CSS.
- Modular Structure: Clean and maintainable code following best practices.
The backend for this project is maintained in a separate repository: Codebook Node Backend.
It handles the mock API using JSON Server and provides authentication with JSON Server Auth. For local testing, the backend server can be run separately.
To test the application locally, you'll need to run both the frontend and the mock backend.
You can either clone the backend repository or run the JSON Server locally as follows.
-
Run JSON Server with Auth (Port 8000):
Open a new terminal and run the following command to start the JSON server with authentication:
npx json-server data/db.json -m ./node_modules/json-server-auth --port 8000
