This project includes a shopping cart system that operates with a Node.js backend and a React frontend, with a Redis database connection for temporary data management. The system uses modern technologies like Docker, Vite, Redis, and Axios.
The project is divided into several main parts:
-
Backend (Node.js)
- Built with
Expressand manages the Redis connection. - Uses
axiosfor sending and receiving data from the server. - Includes services for reading, adding, updating, and deleting items in the shopping cart.
- Built with
-
Frontend (React + Vite)
- Uses Vite for fast React development.
- Includes a shopping cart page with options to add items, update item quantities, and remove items.
- The connection to the backend is handled via
axiosfor sending RESTful requests.
-
Redis
- Used to store temporary shopping cart data so that when the client reconnects, it can retrieve the data from the server and prevent data loss.
- The connection to Redis is handled using the
ioredislibrary in Node.js.
-
Backend (Server):
Node.jswithExpressaxiosfor sending and receiving HTTP requestsioredisfor Redis connectiondotenvfor managing environment variables
-
Frontend (Client):
ReactwithViteaxiosfor connecting to the backend APIMUIfor user interface design
-
Redis:
- Serves as a temporary data store for shopping cart items
-
Docker:
- All services (Backend, Frontend, and Redis) run inside containers using Docker and Docker Compose.
Before running the project, ensure the following dependencies are installed:
To run all services inside containers using Docker:
- Clone the project:
git clone [https://your-repository-url](https://github.com/PROL3/ShopFrontendProject/tree/main)](https://github.com/PROL3/ShopFrontendProject.git) cd ShopFrontendProject cd node-ts