How drusmanov/the_system_project works
This is an HTTP backend for managing refinery production departments, employees and working-time records. The main user workflow is an API request routed to login, shop or timesheet handling, translated through an application gateway, and handled by application/domain services backed by repositories. The README also describes user, training, safety-briefing, equipment and production-work modules, but the supplied tree does not show implementations for several of these; they are not represented as implemented runtime components. Some internal calls are left unverified because their implementation excerpts were not supplied.
Main entry points: request_handler.cpp Request router · application_manager.cpp Application manager · application_gateway.cpp Application gateway · timesheet_repository.cpp Timesheet repository
Components 23
HTTP interface
- HTTP server
src/infrastructure/http_server/http_server.cpp - Request router
src/infrastructure/handlers/request_handler/request_handler.cpp - Login handler
src/infrastructure/handlers/login_request_handler/login_request_handler.cpp - Shop handlers
src/infrastructure/handlers/shop_request_handler - Timesheet handlers
src/infrastructure/handlers/timesheet_request_handler
Application
- Application gateway
src/application/application_gateway/application_gateway.cpp - Application manager
src/application/application_manager/application_manager.cpp - DTO mappers
src/application/application_gateway/dto_mappers
Domain services
- User service
src/domain/services/user_service/user_service.cpp - Permission service
src/domain/services/permission_service/permission_service.cpp - Shop service
src/domain/services/shop_service/shop_service.cpp - Timesheet service
src/domain/services/timesheet_service/timesheet_service.cpp - Domain records
src/domain/entities
Persistence and security
- Shop repository
src/infrastructure/repositories_impl/shop_repository/shop_repository.cpp - Timesheet repository
src/infrastructure/repositories_impl/timesheet_repository/timesheet_repository.cpp - User repository
src/infrastructure/repositories_impl/user_repository/user_repository.cpp - Permission repository
src/infrastructure/repositories_impl/permission_repository/permission_repository.cpp - Unit of work
src/infrastructure/uow_impl/uow_impl.cpp - SQL definitions
src/infrastructure/connection_pool/querys.h - Token manager
src/infrastructure/token_manager/token_manager.cpp - JSON formatter
src/infrastructure/json_formater/json_formater.cpp
Other components
- API client
- Relational database
Connections 27
- API client → HTTP server: sends HTTP
- HTTP server → Request router: dispatches requests
- Request router → Login handler: routes login
- Request router → Shop handlers: routes shop
- Request router → Timesheet handlers: routes timesheets
- Login handler → Application gateway: calls API
- Shop handlers → Application gateway: calls API
src/infrastructure/handlers/shop_request_handler/shop_request_handler.h - Timesheet handlers → Application gateway: calls API
src/infrastructure/handlers/timesheet_request_handler/timesheet_request_handler.h - Application gateway → DTO mappers: maps DTOs
- Application gateway → Application manager: delegates operations
- Application manager → User service: uses service
- Application manager → Permission service: checks access
- Application manager → Shop service: uses service
- Application manager → Timesheet service: uses service
- Shop service → Shop repository: loads shop data
- Timesheet service → Timesheet repository: reads and writes
- User service → User repository: loads users
- Permission service → Permission repository: loads permissions
- Shop repository → SQL definitions: uses queries
src/infrastructure/repositories_impl/shop_repository/shop_repository.cpp - Timesheet repository → SQL definitions: uses queries
src/infrastructure/repositories_impl/timesheet_repository/timesheet_repository.cpp - Shop repository → Relational database: persists data
- Timesheet repository → Relational database: persists records
- Request router → Token manager: validates token
- Login handler → Token manager: creates token
- Domain records → Shop service: domain types
- Domain records → Timesheet service: domain types
src/domain/services/timesheet_service/timesheet_service.cpp - Timesheet repository → JSON formatter: formats records
src/infrastructure/repositories_impl/timesheet_repository/timesheet_repository.cpp