Git workflow
DualMind Lab uses a simple branch-based workflow across all three repositories.Branch strategy
| Branch | Purpose |
|---|---|
main | Production-ready code, deployed automatically |
feature/* | New features (branch from main) |
fix/* | Bug fixes |
dev | Integration branch (optional) |
Commit conventions
Use descriptive commit messages:Testing
Backend tests
Located attests/DualMind.API.Tests/:
SmokeTests.cs— basic endpoint connectivityUnitTest1.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
- Create or update a controller in
Controllers/ - Add route attribute:
[Route("api/your-route")] - Add HTTP method attribute:
[HttpGet],[HttpPost], etc. - Add
[Authorize]if auth required,[AllowAnonymous]if public - Inject required services via constructor
- Add request/response models in
Core/Models/if needed - Register any new services in
Program.cs - Test via Swagger or curl
- Update OpenAPI spec in
docs/openapi.yaml
Adding a new AI provider
- Create a new service class implementing
IChatProviderinAI/Providers/ - Implement
ChatAsync()andStreamAsync()methods - Register the typed HttpClient in
Program.cs - Add the provider case in
ChatProviderFactory.GetProvider() - Add provider record to
providerstable in Supabase - Add API keys to
provider_api_keystable - Add models using this provider to
ai_modelstable