AssetManagement is an asset management system developed in .NET 8, following Domain-Driven Design (DDD) principles and SOLID. The system allows registering, managing, and monitoring equipment, providing REST APIs for integration with front-end or other applications.
The project follows a DDD architecture with multiple layers:
- Domain: entities, aggregates, value objects, and business rules
- Application: use cases, application services, DTOs, and repository interfaces
- Infrastructure: repository implementations, persistence (Entity Framework Core), and external services
- API: presentation layer, REST controllers, Swagger, and system configuration
-
Equipment: register, update, list, and remove equipment
-
Auth (JWT): Authentication for protected API usage with user management - Claims: Admin and CommonUser
-
Future modules may include:
- Maintenance
- Inventory
- Suppliers
- Financial / Costs
- Real-time monitoring (IoT)
- Reports and KPIs
- .NET 9
- C#
- Entity Framework Core
- SQL Server or SQLite (for testing)
- Swagger (for API documentation and testing)
AssetManagement/
├─ AssetManagement.Domain/
├─ AssetManagement.Application/
├─ AssetManagement.Infrastructure/
└─ AssetManagement.API/
- Restore packages:
dotnet restore- Create migrations and update the database:
cd AssetManagement.Infrastructure
dotnet ef migrations add InitialCreate --startup-project ../AssetManagement.API
dotnet ef database update --startup-project ../AssetManagement.API
cd ..- Run the API:
cd AssetManagement.API
dotnet runThe API will be available at:
http://localhost:5000
https://localhost:5001
Swagger for testing and documentation:
https://localhost:5001/swagger
GET /api/equipment– List all equipmentGET /api/equipment/{id}– Find equipment by IDPOST /api/equipment– Create new equipmentPUT /api/equipment/{id}– Update equipmentDELETE /api/equipment/{id}– Remove equipment