The main goal of this project is to develop the backend of an e-commerce website specializing in electronic devices. The backend is built using Java 21 and Spring Boot, ensuring a reliable, scalable, and maintainable architecture. The project includes the creation of a RESTful API that manages products, categories, and shopping carts. The API is fully documented using Swagger for ease of understanding and integration. Product images are handled via Cloudinary, allowing efficient and secure image storage and delivery. The backend is fully testable using tools like Postman or any other API testing platform. This backend is designed to seamlessly integrate with an existing frontend application, delivering a complete and modern e-commerce experience.
src
└── com.temcoders.electronify
├── cart # Shopping cart logic (structure not expanded)
├── category # Category
│ ├── dto # DTOs for category operations
│ ├── exceptions # Custom exceptions for category
│ ├── Category # JPA Entity
│ ├── CategoryController # REST controller
│ ├── CategoryRepository # Spring Data JPA repository
│ └── CategoryService # Business logic
├── cloudinary # Cloudinary configuration and integration
│ ├── CloudinaryConfig # Cloudinary configuration setup
│ └── CloudinaryService # Service for media uploads
├── config # Security and web configuration
│ ├── SecurityConfig # Spring Security configuration
│ └── WebConfig # General web configurations
├── exceptions # Global exceptions and handlers
│ ├── AppException # Base application exception
│ ├── EmptyListException # Custom exception for empty lists
│ └── GlobalExceptionHandler # Centralized exception handling
├── product # Product (structure not expanded)
├── review # Review (structure not expanded)
├── user # User
│ ├── controller # REST controllers for user operations
│ ├── dto # DTOs for user operations
│ ├── exceptions # Custom exceptions for user logic
│ ├── model # User entity and related models
│ ├── UserRepository # User JPA repository
│ └── UserService # User service layer
└── ElectronifyApplication # Spring Boot application entry point
git clone https://github.com/Team-3-Electronify/Electronify.git
cd Electronify./mvnw spring-boot:runor
mvn spring-boot:runAlternative Way to Run the Application If you are using an IDE such as IntelliJ IDEA,VS Code etc, you can simply click the “Run” button or run the main application class directly (the one annotated with @SpringBootApplication). For example, in IntelliJ IDEA, right-click the main class and choose "Run 'ElectronifyApplication...main()'".
GET /api/products— Get all productsGET /api/products/{id}— Get product by IDGET /api/products/filter— Get product by filtersPOST /api/products— Add new productPUT /api/products/{id}— Update productDELETE /api/products/{id}— Delete product
GET /api/categories— Get all categoriesGET /api/categories/{id}— Get category by IDPOST /api/categories— Add new categoryPUT /api/categories/{id}— Update categoryDELETE /api/categories/{id}— Delete category by ID
GET /api/reviews/byUser— Get all reviews by userIDGET /api/reviews/byProduct— Get all reviews by productIDPOST /api/reviews— Add new review
GET /api/users— Get all usersGET /api/users/{id}— Get user by IDPOST /api/auth/register— Registration of new userPOST /api/auth/login— User Log inPUT /api/users/{id}— Update user by IDDELETE /api/users/{id}— Delete category by ID
GET /api/cart— Get cart by usernamePOST /api/cart/add/{productId}— Add new cart item by product IDPUT /api/cart/update/{productId}— Update cart item by product IDDELETE /api/cart/remove/{productId}— Delete cart item by product ID
[View Class Diagram] (https://drive.google.com/file/d/1cg5x1FwFY-r0HY_zOLb9dy0hgz31yhDP/view?usp=share_link)
[View Flow chat Diagram] (https://drive.google.com/file/d/1lRTPlr-jibYnW6GV97WK4XKShyFYudHC/view?usp=sharing)
Paula Calvo Garcia



