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.
- 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
- 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
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#@"
}
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
Click to access the Flow Chart
- Lara Pla @Lizar22
- May Carrascal @may-leth
- Sofia Santos @sofianutria
- Thais Rocha @thaisrqueiroz