A backend-focused ASP.NET Core Web API project that simulating a simple order management system. Designed to practice API design with authentication, logging, error handling, and relational data.
- JWT token-based authentication
- Role-based authorization (e.g., Admin vs. User)
- Secure password hashing
- Email Validation
- Create, update, delete products
- Validate stock before fulfilling orders
- Create orders containing existing products
- Stock deduction when order is placed
- Prevent order submission in case of insufficient stock
- Tracks all key user actions (e.g., product changes, order creation,..)
- Stores who did what and when
- Prevent any app crash by properly handling any exceptions
- Logging any unsuccessful attempts/ encountered errors
- Model validation using FluentValidation
- Initial testing data are stored in development environments
| Entity | Relationships |
|---|---|
| User | Has many Orders, has many AuditLogs, has many EmailVerificationTokens |
| EmailVerificationToken | Belongs to single User, records created and expiration date |
| Product | Appears in many OrderItems, tracks stock quantity and price |
| Order | Created by one User, contains many OrderItems, tracks created date, order status and price |
| OrderItem | Links one Order and one Product, tracks ordered quantity and unit price |
| AuditLog | Belongs to one User, records action & timestamp |
- BE: ASP.NET Core Web API
- Auth: JWT Bearer Tokens
- DB: Entity Framework Core + SQL Server
- Testing: xUnit + Moq
- Validation: FluentValidation
- Logging: Serilog
- Postman - for endpoints tests
- PaperCut SMTP - for email tests
- Docker Desktop (includes Docker Engine, CLI, and Compose)
- Alternatively which includes all 3 components
docker compose up --buildWhich:
- Starts a SQL Server 2022 instance
- Build and start the Inventory-Management.API
- Starts Papercut SMTP server and email viewer
- API → http://localhost:7024
- Papercut GUI → http://localhost:8080
- Add integration tests
- Add functionality to re-send verification emails
- Add background tasks to clear non-verified user and expired email validation tokens
- Implement product search & filtering
- Build small React frontend for visualization
- and many more