Eclat Shop is a powerful website designed for e-commerce platforms, particularly focused on the sale of computer components. It leverages the Symfony framework for backend operations, React with TypeScript for the frontend, and Docker for efficient deployment.
Before you begin, ensure you have the following installed:
- Docker: For creating and managing containers.
To clone the repository and start setting up the project, use the following command in your terminal:
Step 1 : Clone the repository
git clone https://repository.git
Step 2: Set up the .env configurations. Add one .env file at the root directory and another within the app directory.
cd app/
Step 2: Launch Docker and enter the following command.
docker compose up -d --build
- Register a User:
POST /api/register
- Creates a new user account. - User Login:
POST /api/login
- Authenticates a user and returns an authorization token.
- List Products:
GET /api/products
- Retrieves all products. - Single Product:
GET /api/products/{productId}
- Fetches details of a specific product. - Add Product:
POST /api/products
- Adds a new product to the system (Authentication required). - Update Product:
PUT /api/products/{productId}
- Updates an existing product (Authentication required). - Delete Product:
DELETE /api/products/{productId}
- Removes a product from the system (Authentication required).
- Add to Cart:
POST /api/carts/{productId}
- Adds a product to the user's shopping cart (Authentication required). - Remove from Cart:
DELETE /api/carts/{productId}
- Removes a product from the cart (Authentication required). - View Cart:
GET /api/carts
- Displays all items in the shopping cart (Authentication required). - Validate Cart:
POST /api/carts/validate
- Converts the cart into an order (Authentication required).
- View Orders:
GET /api/orders
- Retrieves all orders associated with the current user (Authentication required). - Order Details:
GET /api/orders/{orderId}
- Provides detailed information about a specific order (Authentication required).
Deployment is handled using Docker, which simplifies the process into manageable services:
- PHP Service: Manages the PHP environment.
- Web Server Service: Uses Nginx to serve the application.
- Database Service: Runs PostgreSQL for data management.
Use Docker Compose to orchestrate these services. This script will set up each service in its container, ensuring they are interconnected and configured correctly.
- Etienne Mentrel
- Loïc Bravo
- Sébastien OGE
https://drive.google.com/file/d/1PZyjjLWGN1XGjszZ-jO77o3HCETA23lS/view?usp=sharing