Skip to content

femcoders-ecommerce/precariadashop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Precariada Shop - E-commerce Backend

Overview

Precariada Shop is the backend API for an e-commerce platform featuring products from Precariada, a Madrid-based illustrator. The API handles products, categories, users, and shopping cart functionality.

✨ Features

  • User Management: Create, read, update, and delete users
  • Product Catalog: Manage products with categories
  • Shopping Cart: Add/remove products, calculate totals
  • Validation: Comprehensive input validation
  • Error Handling: Custom exceptions and global handler

🛠️ Technologies

Java Spring Boot IntelliJ IDEA MySQL Postman Apache Maven Git

🚀 Getting Started

Running the Application

  • Ensure you have Java 21 and Maven installed
  • Clone the repository
git clone
https://github.com/femcoders-ecommerce/precariadashop.git
  • Create a MySQL database named precariadashop Run:
mvn spring-boot:run

The API will be available at http://localhost:8080

Testing with Postman

Import the Postman collection (available in the project) to test all endpoints with pre-configured examples.

Example requests:

Create Product:

POST /api/products

{
"name": "Lámina Eres casa",
"price": 20,00,
"imageUrl": "https://shorturl.at/4tcJI",
"featured": true,
"categoryId": 2
}

Create User:

POST /api/users

{
"username": "maria",
"email": "maria@example.com",
"password": "127GHqk8#@"
}

📂 Structure

Project Structure

com.precariada.precariadashop
├── controllers/
│   ├── CartController
│   ├── CategoryController
│   ├── ProductController
│   └── UserController
├── dtos/
│   ├── cart/
│   │   ├── CartDTO
│   │   └── CartMapper
│   ├── cartItem/
│   │   └── CartItemDTO
│   │   └── CartItemMapper
│   ├── category/
│   │   ├── CategoryMapper
│   │   ├── CategoryRequest
│   │   └── CategoryResponse
│   ├── product/
│   │   ├── ProductMapper
│   │   ├── ProductRequest
│   │   └── ProductResponse
│   └── users/
│       ├── UserMapper
│       ├── UserRequest
│       └── UserResponse
├── exceptions/ 
│   ├── ErrorResponse
│   └── GlobalExceptionHandler
├── models/
│   ├── Cart
│   ├── CartItem
│   ├── Category
│   ├── Product
│   └── User
├── repositories/
│   ├── CartItemRepository
│   ├── CartRepository
│   ├── CategoryRepository
│   ├── ProductRepository
│   └── UserRepository
├── services/         
│   ├── CartItemService
│   ├── CartService
│   ├── CategoryService
│   ├── ProductService
│   └── UserService
└── PrecariadashopApplication 

Entity Relationship (ER) Diagram

ER Diagram

Flow Chart

Click to access the Flow Chart

👥 Team Members

About

RESTful API for an e-commerce platform featuring products from Precariada

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages