How diogonunes2798/employees works
Employees is a React frontend and .NET REST API for employee CRUD, backed by SQLite/Dapper. The main workflow runs from the user interface through the API controller and application service to repository persistence, with results mapped back to the client. The README also documents search, sorting/filtering, API-key protection, and delete confirmation. Relationships are limited to excerpted calls and README statements; wiring in unsampled startup code is not inferred.
Main entry points: App.jsx Employee workspace · EmployeeRepository.cs Employee repository · EmployeesController.cs Employees endpoints · ContractMapping.cs Contract mapping
Components 21
React frontend
- Employee workspace
Employees.Frontend/src/App.jsx - API client
Employees.Frontend/src/api.js - Employee views
Employees.Frontend/src/components/employees/EmployeeTable.jsx - Employee row
Employees.Frontend/src/components/employees/EmployeeRow.jsx - Create/edit form
Employees.Frontend/src/components/employees/EmployeeModal.jsx - Search controls
Employees.Frontend/src/components/shared/SearchBar.jsx - Delete confirmation
Employees.Frontend/src/components/shared/DeleteConfirmModal.jsx
REST API
- Employees endpoints
Employees.Api/Controllers/EmployeesController.cs - Contract mapping
Employees.Api/Mapping/ContractMapping.cs - API key middleware
Employees.Api/Auth/ApiKeyMiddleware.cs - Exception handling
Employees.Api/Mapping/ExceptionHandlingMiddleware.cs - Request/response contracts
Employees.Contracts/Requests/CreateEmployeeRequest.cs
Application logic
- Employee service
Employees.Application/Services/EmployeeService.cs - Employee model
Employees.Application/Models/Employee.cs - List options
Employees.Application/Models/GetAllEmployeesOptions.cs - Input validation
Employees.Application/Validators - Conflict exception
Employees.Application/Exceptions/ConflictException.cs
Persistence
- Employee repository
Employees.Application/Repositories/EmployeeRepository.cs - Connection factory
Employees.Application/Database/IDbConnectionFactory.cs - SQLite database
Other components
- User
Connections 23
- User → Employee workspace: uses
README.md - Employee workspace → API client: calls
Employees.Frontend/src/App.jsx - Employee workspace → Employee views: renders
Employees.Frontend/src/App.jsx - Employee views → Employee row: renders
Employees.Frontend/src/components/employees/EmployeeTable.jsx - Employee workspace → Create/edit form: renders
Employees.Frontend/src/App.jsx - Employee workspace → Search controls: renders
Employees.Frontend/src/App.jsx - Employee workspace → Delete confirmation: renders
Employees.Frontend/src/App.jsx - API client → Employees endpoints: sends requests
README.md - Employees endpoints → Contract mapping: maps payloads
Employees.Api/Controllers/EmployeesController.cs - Employees endpoints → Employee service: invokes
Employees.Api/Controllers/EmployeesController.cs - Employees endpoints → Request/response contracts: accepts
Employees.Api/Controllers/EmployeesController.cs - Contract mapping → Employee model: maps to
Employees.Api/Mapping/ContractMapping.cs - Contract mapping → List options: maps to
Employees.Api/Mapping/ContractMapping.cs - Contract mapping → Request/response contracts: maps contracts
Employees.Api/Mapping/ContractMapping.cs - Employee service → Employee repository: calls
Employees.Application/Services/EmployeeService.cs - Employee service → Input validation: validates
Employees.Application/Services/EmployeeService.cs - Employee service → Conflict exception: throws
Employees.Application/Services/EmployeeService.cs - Exception handling → Conflict exception: handles
Employees.Api/Mapping/ExceptionHandlingMiddleware.cs - Employee repository → Connection factory: opens connection
Employees.Application/Repositories/EmployeeRepository.cs - Employee repository → SQLite database: queries
Employees.Application/Repositories/EmployeeRepository.cs - Employee repository → Employee model: reads and writes
Employees.Application/Repositories/EmployeeRepository.cs - Employee repository → List options: filters and sorts
Employees.Application/Repositories/EmployeeRepository.cs - API key middleware → Employees endpoints: protects requests
README.md