How ordreflow/ordreflow-backend works
This is a .NET backend for managing users, orders and tasks, and employee time registration with manager review. The principal workflow is an HTTP request entering an endpoint, being dispatched to an application handler, applying domain rules, and using repository abstractions backed by persistence. Separate capabilities include user administration, work assignment, weekly time views, review and export, and top-orders reporting. Relationships below follow the README and shown endpoint/domain evidence; unsampled handler and persistence links are marked unverified where appropriate.
Main entry points: Handlers Action handlers · Endpoints HTTP endpoints · TimeEntry.cs Time entry lifecycle · Task.cs Task lifecycle
Components 23
HTTP API
- HTTP endpoints
Backend/WebApi/Endpoints - Authorization
Backend/WebApi/Authentication/AuthorizationPolicies.cs - API mapping
Backend/ObjectMapper/ObjectMapper.cs
Application actions
- Command dispatch
Backend/Application/Dispatcher.cs - Action handlers
Backend/Application/Handlers - Query handlers
Backend/Application/Handlers - User administration
Backend/Application/Handlers/UserHandlers - Orders and tasks
Backend/Application/Handlers/TaskHandlers - Time registration
Backend/Application/Handlers/TimeEntryHandlers - Time review
Backend/Application/Handlers/TimeEntryHandlers - Reports and export
Backend/Application/Handlers/GetTopOrdersHandler.cs
Domain model
- User aggregate
Backend/Domain/Aggregate/User.cs - Order aggregate
Backend/Domain/Aggregate/Order.cs - Task lifecycle
Backend/Domain/Entities/Task.cs - Time entry lifecycle
Backend/Domain/Aggregate/TimeEntry.cs - Review rules
Backend/Domain/Services/TimeEntryReviewDomainService.cs - Repository contracts
Backend/Domain/Interfaces - Operation results
Backend/OperationResultPattern/Result.cs
Persistence and services
- Repositories
Backend/Persistence/Repositories - EF Core context
Backend/Persistence/AppDbContext.cs - PostgreSQL
- JWT tokens
Backend/WebApi/Authentication/JwtTokenGenerator.cs
Other components
- API client
Connections 25
- API client → HTTP endpoints: sends HTTP
README.md - HTTP endpoints → Authorization: checks policy
Backend/WebApi/Endpoints/Users/AssignManager.cs - HTTP endpoints → Command dispatch: dispatches command
Backend/WebApi/Endpoints/Users/AssignManager.cs - HTTP endpoints → API mapping: maps models
README.md - Command dispatch → Action handlers: resolves handler
README.md - Action handlers → User aggregate: applies user rules
- Action handlers → Order aggregate: applies order rules
- Action handlers → Task lifecycle: applies task rules
Backend/Application/Handlers/TimeEntryHandlers/GetTimeEntryReviewsHandler.cs - Action handlers → Time entry lifecycle: applies entry rules
Backend/Application/Handlers/TimeEntryHandlers/GetManagerTimeEntriesHandler.cs - Action handlers → Repository contracts: uses repositories
README.md - Query handlers → Repository contracts: queries repositories
README.md - User administration → User aggregate: enforces permissions
- Orders and tasks → Order aggregate: manages orders
- Orders and tasks → Task lifecycle: manages tasks
- Time registration → Time entry lifecycle: creates and edits
Backend/Application/Handlers/TimeEntryHandlers/GetManagerTimeEntriesHandler.cs - Time review → Time entry lifecycle: reviews entries
Backend/Application/Handlers/TimeEntryHandlers/GetManagerTimeEntriesHandler.cs - Time review → Review rules: applies review rules
- Reports and export → Repositories: requests report data
- Repository contracts → Repositories: implemented by
README.md - Repositories → EF Core context: reads and writes
README.md - EF Core context → PostgreSQL: persists data
README.md - HTTP endpoints → JWT tokens: authenticates users
- Action handlers → Operation results: returns outcomes
README.md - Time entry lifecycle → Operation results: validates transitions
Backend/Domain/Aggregate/TimeEntry.cs - Task lifecycle → Operation results: validates lifecycle
Backend/Domain/Entities/Task.cs