Skip to main content

Git workflow

DualMind Lab uses a simple branch-based workflow across all three repositories.

Branch strategy

Commit conventions

Use descriptive commit messages:

Testing

Backend tests

Located at tests/DualMind.API.Tests/:
Test files:
  • SmokeTests.cs — basic endpoint connectivity
  • UnitTest1.cs — unit tests

Frontend linting

Manual API testing

Use the Swagger UI at /swagger or curl:

Deployment process

Backend (Azure)

The backend deploys to Azure App Service via GitHub Actions:

Frontend (Cloudflare Workers)

Admin panel (Cloudflare Workers)

Adding a new API endpoint

  1. Create or update a controller in Controllers/
  2. Add route attribute: [Route("api/your-route")]
  3. Add HTTP method attribute: [HttpGet], [HttpPost], etc.
  4. Add [Authorize] if auth required, [AllowAnonymous] if public
  5. Inject required services via constructor
  6. Add request/response models in Core/Models/ if needed
  7. Register any new services in Program.cs
  8. Test via Swagger or curl
  9. Update OpenAPI spec in docs/openapi.yaml

Adding a new AI provider

  1. Create a new service class implementing IChatProvider in AI/Providers/
  2. Implement ChatAsync() and StreamAsync() methods
  3. Register the typed HttpClient in Program.cs
  4. Add the provider case in ChatProviderFactory.GetProvider()
  5. Add provider record to providers table in Supabase
  6. Add API keys to provider_api_keys table
  7. Add models using this provider to ai_models table