DispatchCore is a backend dispatch-management API built with ASP.NET Core 8, Entity Framework Core, MySQL, and JWT authentication.
The project was designed to support a basic dispatch workflow where administrators or dispatchers can create jobs, assign drivers, manage job status changes, and track status history.
- JWT-based authentication
- Role-based authorization
- Admin, dispatcher, and driver roles
- Job creation and management
- Driver assignment
- Controlled job-status updates
- Job-status history
- Audit logging
- MySQL database integration
- Entity Framework Core migrations
- Swagger/OpenAPI testing
- C#
- ASP.NET Core 8
- Entity Framework Core
- MySQL
- JWT authentication
- Swagger/OpenAPI
Controllers/
Data/
Dtos/
Migrations/
Models/
Properties/
Program.cs
Core Workflow
A user logs in and receives a JWT.
Authorized users create dispatch jobs.
A dispatcher assigns a driver.
The driver or authorized user updates the job status.
Status changes are saved in the job-status history.
Audit records provide visibility into important actions.
Roles
Admin
Full API access
Can manage jobs and dispatch activity
Dispatcher
Can create jobs
Can assign drivers
Can review and update dispatch activity
Driver
Can view assigned jobs
Can update allowed job statuses
Job Statuses
The API supports a controlled dispatch lifecycle using statuses such as:
Pending
Assigned
In Route
Completed
Canceled
Local Setup
Requirements
.NET 8 SDK
MySQL
Visual Studio, Visual Studio Code, or another C# editor
Configuration
Update the connection string in appsettings.json or provide it through environment variables or .NET user secrets.
Example:
{
"ConnectionStrings": {
"DefaultConnection": "server=localhost;port=3306;database=dispatchcore_db;user=root;password=YOUR_LOCAL_PASSWORD;"
},
"Jwt": {
"Key": "SET_WITH_USER_SECRETS_OR_ENVIRONMENT_VARIABLE",
"Issuer": "DispatchCore",
"Audience": "DispatchCoreUsers"
}
}
Do not commit real database passwords or JWT secrets.
Run the Project
dotnet restore
dotnet ef database update
dotnet run
Open Swagger using the local URL shown in the terminal.
Security Notes
This project is a prototype and learning project.
Before production use, I would improve it by:
Hashing all stored passwords
Moving secrets to environment variables or .NET user secrets
Adding refresh tokens
Adding stronger validation
Adding automated tests
Expanding audit logging
Adding rate limiting
Adding more detailed error handling
Adding CI/CD
What I Learned
This project gave me practical experience with:
Designing a REST API
Structuring an ASP.NET Core application
Implementing JWT authentication
Enforcing role-based access
Modeling job and driver workflows
Using Entity Framework Core migrations
Connecting a C# API to MySQL
Testing endpoints through Swagger
Project Status
DispatchCore is a backend API prototype created to demonstrate dispatch-management logic and structured backend development.
It is not currently deployed as a public production service.
Developer
Alphonso Teague
Full-Stack Software Developer
Teague Cloud & Code