DigiBuy is a RESTful API designed for managing categories, coupons, orders, products, and users in an e-commerce system. This API is built with ASP.NET Core.
- Category Management: Create, update, delete, and retrieve product categories.
- Coupon Management: Handle creation, usage, and retrieval of discount coupons.
- Order Management: Manage customer orders, including details and status tracking.
- Order Detail Management: Manage customer orders' items, including details and status tracking.
- Product Management: Full CRUD operations for products, including stock and pricing.
- User Management: Register, authenticate, and manage users, including admin roles.
- .NET Core: Backend framework.
- Entity Framework Core: ORM for database access.
- PostgreSQL: Database management system.
- Swagger: API documentation and testing.
- JWT: Authentication method.
- Entity Framework Identity: Authentication and authorization management.
- AutoMapper: Object-object mapping library.
- Serilog: Logging library for structured logging.
- RabbitMQ: Message broker for handling email task.
- Redis: In-memory data structure store for caching.
- Hangfire: Background job processing for handling email tasks from RabbitMQ queues and monitorize them.
- SMTP: Email service for notifications.
- .NET 8.0 SDK
- PostgreSQL - You can install and use in Docker.
- Optionally Postman for testing API endpoints but can be used with built-in swagger.
- RabbitMQ - You can install and use in Docker.
- Redis - You can install and use in Docker.
git clone git@github.com:Ntolgka/DigiBuy.git
- In DigiBuy.Api directory:
dotnet restore
- Update database connection string
PostgresSqlConnection
- Update hangfire connection string
HangfireConnection
- Update JWT configuration
JwtSettings
- Update Redis configuration
Redis
- Update RabbitMQ configuration
RabbitMQ
- Update SMTP configuration
SMTPConfig
1 - Apply Migrations
- In DigiBuy.Infrastructure directory:
dotnet ef database update
2 - Start the API
- In DigiBuy.Api directory:
dotnet run
Full API documentation is available here.
The API provides the following endpoints:
- Category:
/api/Category
- Coupon:
/api/Coupon
- Order:
/api/Order
- Order Detail:
/api/OrderDetail
- Product:
/api/Product
- User:
/api/User
- Checkout:
/api/Checkout
Please check the API Documentation for detailed information on each endpoint, including request payloads.
Below are some screenshots demonstrating the API requests.
These are only some of the endpoints, not all of them.