This project was developed as a school project for the Advanced Programming course (3rd year, 1st semester).
A full-stack web application for product and category management. Products can be assigned to multiple categories; full CRUD operations are supported for both products and categories.
| Layer | Technology |
|---|---|
| Frontend | React 19, Vite 7, Tailwind CSS, Axios |
| Backend | Spring Boot 4.0, Java 17, Spring Data JPA |
| Database | MySQL |
flowchart LR
subgraph Frontend [Frontend]
React[React + Vite]
Tailwind[Tailwind CSS]
end
subgraph Backend [Backend]
SpringBoot[Spring Boot]
JPA[Spring Data JPA]
end
subgraph DB [Database]
MySQL[(MySQL)]
end
React -->|REST API| SpringBoot
SpringBoot --> JPA
JPA --> MySQL
project/
├── Frontend/ # React + Vite application
│ ├── src/
│ │ ├── App.jsx
│ │ └── services/api.js
│ └── package.json
├── Backend/ # Spring Boot REST API
│ └── src/main/java/com/example/project/
│ ├── Controller/
│ ├── Service/
│ ├── Repository/
│ ├── Entity/
│ └── Config/
└── README.md
- Node.js 18+
- Java 17+
- Maven 3.6+
- MySQL 8+
Create the ecommerce database in MySQL:
CREATE DATABASE ecommerce;Copy Backend/src/main/resources/application.properties.example to application.properties and update with your database credentials:
cd Backend/src/main/resources
cp application.properties.example application.properties
# Edit application.properties and update spring.datasource.username and spring.datasource.passwordcd Backend
mvn spring-boot:runBackend runs at http://localhost:8080.
cd Frontend
npm install
npm run devFrontend runs at http://localhost:5173.
| Method | Endpoint | Description |
|---|---|---|
| GET | /products |
List all products |
| GET | /products/{id} |
Get product details |
| GET | /products/category/{categoryId} |
Get products by category |
| POST | /products |
Create new product |
| PUT | /products/{id} |
Update product |
| DELETE | /products/delete/{id} |
Delete product |
| POST | /products/{productId}/addCategory/{categoryId} |
Add category to product |
| POST | /products/{productId}/removeCategory/{categoryId} |
Remove category from product |
| Method | Endpoint | Description |
|---|---|---|
| GET | /categories |
List all categories |
| GET | /categories/{id} |
Get category details |
| GET | /categories/product/{productId} |
Get categories for a product |
| POST | /categories |
Create new category |
| PUT | /categories/{id} |
Update category |
| DELETE | /categories/delete/{id} |
Delete category |
- Product CRUD (create, read, update, delete)
- Category CRUD
- Product–Category many-to-many relationship
- Responsive dashboard UI (Tailwind CSS)
- REST API with CORS configuration
This project is for educational purposes.