This guide covers the complete local development setup for UpdaterAgent — from installing required software through verifying the running API and test suite. Allow 30–45 minutes for a first-time setup.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ShohjahonSohibov/repo-for-agent/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
The following software must be installed before proceeding.| Software | Version | Purpose |
|---|---|---|
| .NET SDK | 8.0 or later | Backend framework and CLI tooling |
| PostgreSQL | 16.x | Primary relational database |
| Git | Latest | Version control |
| IDE | Any | VS Code, JetBrains Rider, or Visual Studio |
| Software | Purpose |
|---|---|
| Postman or Insomnia | Manual API testing |
| pgAdmin 4 | PostgreSQL database management GUI |
| Docker Desktop | Containerized PostgreSQL alternative |
Clone the repository
Clone the repository and switch to the development branch.The project structure is:
Set up PostgreSQL
Choose the option that fits your environment.
- Local PostgreSQL
- Docker
Install PostgreSQL 16:On Windows, download the PostgreSQL 16 installer from postgresql.org and run it with default settings.Create the development database:
Configure the connection string
Open If you used a different password during PostgreSQL setup, update the
src/UpdaterAgent.Api/appsettings.Development.json. The default connection string targets localhost:5432 with the postgres user:Password field. Leave all other values unchanged for a standard local setup.Alternatively, set the connection string as an environment variable to avoid storing credentials in a file:Apply EF Core migrations
Install the EF Core CLI tools if not already present:Apply all migrations to create the full database schema:The output ends with
Done. after listing each applied migration. To create a new migration after changing domain entities:Build and run the API
Restore packages and build the full solution:A clean build ends with The server listens on two addresses:
Build succeeded. 0 Warning(s) 0 Error(s).Start the API server:Run the test suite
Run unit tests and integration tests from the solution root:To run a single test by name:Tests follow the
MethodName_Scenario_Expected naming convention (for example, CreateAsync_WithValidRequest_ShouldCreateUserSuccessfully). Unit tests use xUnit, Moq, and FluentAssertions. Integration tests use WebApplicationFactory.Useful URLs
Once the API is running, the following local URLs are available:| Resource | URL |
|---|---|
| Swagger UI | https://localhost:5001/swagger |
| Hangfire dashboard | https://localhost:5001/hangfire |
| Health check | http://localhost:5000/health |
| API base | https://localhost:5001/api |
The Hangfire dashboard requires an admin role. If you receive a
403 Forbidden, verify that your JWT token belongs to a user with admin permissions.Common issues
Database connection refused
Database connection refused
Error:
Npgsql.NpgsqlException: Connection refused-
Verify PostgreSQL is running:
-
Confirm the connection string in
appsettings.Development.jsonmatches your PostgreSQL host, port, username, and password. -
Check that PostgreSQL is listening on port
5432(the default). If you changed the port, update the connection string accordingly.
Port 5001 or 5000 already in use
Port 5001 or 5000 already in use
Error: To kill the process on macOS/Linux:On Windows:
Address already in use: https://localhost:5001Find and kill the process using the port, or change the port in src/UpdaterAgent.Api/Properties/launchSettings.json:NuGet package restore fails
NuGet package restore fails
Error: Verify your NuGet sources are configured correctly:
Unable to restore packageClear the local NuGet cache and retry:Hangfire dashboard returns 403 Forbidden
Hangfire dashboard returns 403 Forbidden
Error:
403 Forbidden on /hangfireThe Hangfire dashboard is protected by HangfireAuthorizationFilter, which requires an admin role. Ensure you are authenticated and that your user account has the admin role assigned.External integration errors (QuickManage, Zippy, Samsara)
External integration errors (QuickManage, Zippy, Samsara)
Error: API connection failures for external servicesThis is expected for a local setup. External integrations are optional for working with core features such as Loads, Drivers, and Stops. To configure external integrations, add the relevant API keys and credentials to
appsettings.Development.json under the appropriate configuration sections. See the Integrations overview for service-specific setup instructions.Next steps
Architecture overview
Learn how the four Clean Architecture layers fit together and how dependencies flow between them.
Conventions
Review the Driver ID convention, Result pattern, background job rules, and DI registration patterns before writing code.