How melvinp473/simple-user-management-api works
This is a small ASP.NET Core user-management API. An HTTP client reaches the configured middleware pipeline, then controller endpoints that validate and normalize user data and use a repository for CRUD and email-uniqueness checks. The repository stores users in memory. Program.cs also exposes a health response at / and configures Swagger in development. Middleware ordering and registrations are shown; the README gives no further product details.
Main entry points: Program.cs ASP.NET host · UserController.cs User endpoints · InMemoryUserRepository.cs In-memory repository · ErrorHandlingMiddleware.cs Error handling
Components 10
API runtime
- ASP.NET host
Program.cs - Error handling
Middleware/ErrorHandlingMiddleware.cs - Token authentication
Middleware/TokenAuthenticationMiddleware.cs - Request logging
Middleware/RequestResponseLoggingMiddleware.cs - Health and Swagger
Program.cs
User management
- User endpoints
Controllers/UserController.cs - User model
Models/User.cs
User storage
- Repository contract
Repositories/IUserRepository.cs - In-memory repository
Repositories/InMemoryUserRepository.cs
Other components
- HTTP client
Connections 12
- HTTP client → ASP.NET host: sends requests
Program.cs - ASP.NET host → Error handling: configures first
Program.cs - Error handling → Token authentication: passes request
Program.cs - Token authentication → Request logging: passes request
Program.cs - Request logging → User endpoints: passes request
- ASP.NET host → User endpoints: maps controllers
Program.cs - ASP.NET host → Health and Swagger: maps and configures
Program.cs - User endpoints → Repository contract: calls CRUD methods
Controllers/UserController.cs - User endpoints → User model: validates and returns
Controllers/UserController.cs - In-memory repository → Repository contract: implements
Repositories/InMemoryUserRepository.cs - In-memory repository → User model: stores users
Repositories/InMemoryUserRepository.cs - ASP.NET host → In-memory repository: registers service
Program.cs