Skip to content

Team-3-Electronify/Electronify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

256 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Electronify

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.

Project Structure

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

Technologies Used

Java Spring Apache Maven GitHub Git Postman MySQL draw.io Cloudinary Swagger

Clone the Repository

git clone https://github.com/Team-3-Electronify/Electronify.git
cd Electronify

Run

./mvnw spring-boot:run

or

mvn spring-boot:run

Alternative 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()'".

API Endpoints

Product

  • GET /api/products — Get all products
  • GET /api/products/{id} — Get product by ID
  • GET /api/products/filter — Get product by filters
  • POST /api/products — Add new product
  • PUT /api/products/{id} — Update product
  • DELETE /api/products/{id} — Delete product

Category

  • GET /api/categories — Get all categories
  • GET /api/categories/{id} — Get category by ID
  • POST /api/categories — Add new category
  • PUT /api/categories/{id} — Update category
  • DELETE /api/categories/{id} — Delete category by ID

Review

  • GET /api/reviews/byUser — Get all reviews by userID
  • GET /api/reviews/byProduct — Get all reviews by productID
  • POST /api/reviews — Add new review

User

  • GET /api/users — Get all users
  • GET /api/users/{id} — Get user by ID
  • POST /api/auth/register — Registration of new user
  • POST /api/auth/login — User Log in
  • PUT /api/users/{id} — Update user by ID
  • DELETE /api/users/{id} — Delete category by ID

Cart

  • GET /api/cart — Get cart by username
  • POST /api/cart/add/{productId} — Add new cart item by product ID
  • PUT /api/cart/update/{productId} — Update cart item by product ID
  • DELETE /api/cart/remove/{productId} — Delete cart item by product ID

Class Diagram

[View Class Diagram] (https://drive.google.com/file/d/1cg5x1FwFY-r0HY_zOLb9dy0hgz31yhDP/view?usp=share_link)

Flow chat Diagram

[View Flow chat Diagram] (https://drive.google.com/file/d/1lRTPlr-jibYnW6GV97WK4XKShyFYudHC/view?usp=sharing)

Contributors

Paula Calvo Garcia GitHub icon Nadiia Alaieva GitHub icon Vita Poperechna GitHub icon Anna Nepyivoda GitHub icon

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages