How mikailakar/backend-project works
This is an ASP.NET Core API for user and role management. The main workflow is an HTTP request to a controller, through the user-service abstraction for user operations, into SQL-backed state, and back as an API response. Login verifies a password and issues a role-bearing JWT; later requests pass through JWT middleware, which validates the token and loads user and role context. The README also documents soft deletion, role-aware user queries, and date ordering. Those capabilities are represented from documentation where source detail was not sampled.
Main entry points: UserService.cs User service · UsersContext.cs EF data context · Program.cs API host · UsersController.cs User endpoints
Components 17
API runtime
- API host
backendProjesi/Program.cs - User endpoints
backendProjesi/Controllers/UsersController.cs - Role endpoints
backendProjesi/Controllers/RolController.cs
Authentication
- Password hashing
backendProjesi/Models/PasswordService.cs - JWT middleware
backendProjesi/Helpers/JwtMiddleware.cs - Role authorization
backendProjesi/Helpers/AuthorizeAttribute.cs - Login request
backendProjesi/Models/AuthenticateRequest.cs - Token response
backendProjesi/Models/AuthenticateResponse.cs
User services
- User service
backendProjesi/Implements/UserService.cs - User service contract
backendProjesi/Interfaces/IUserService.cs - DTO mapping
backendProjesi/Models/MappingProfile.cs - User model
backendProjesi/Models/Users.cs
Roles and storage
- Role model
backendProjesi/Models/Rol.cs - Users with roles
backendProjesi/Models/UserWithRoleDto.cs - EF data context
backendProjesi/Models/UsersContext.cs - SQL Server
Other components
- HTTP client
Connections 18
- HTTP client → API host: sends requests
- API host → User endpoints: routes requests
- API host → Role endpoints: routes requests
- API host → JWT middleware: runs middleware
- User endpoints → User service contract: calls
- User service contract → User service: implemented by
- JWT middleware → User service contract: loads user roles
- User endpoints → Role authorization: protects actions
- User service → EF data context: queries and saves
- Role endpoints → EF data context: queries and saves
- EF data context → SQL Server: reads and writes
- User service → DTO mapping: maps user data
- User service → Password hashing: hashes and verifies
- User service → Login request: accepts credentials
- User service → Token response: returns token result
- EF data context → User model: stores users
- EF data context → Role model: stores roles
- EF data context → Users with roles: projects role queries