Contributing Guide
DualMind Lab is a blind AI model comparison platform built with .NET 8, Supabase, and Cloudflare Workers. Users compare two AI models side-by-side without knowing which is which, vote on the better response, and build crowd-sourced ELO rankings.
Before contributing, make sure you’ve completed the local development setup.
Getting started
Fork the repository
Fork the relevant repository on GitHub:
Backend
.NET 8 API
Frontend
Vanilla JS SPA
Admin
Admin dashboard
Code standards
Backend (C# / .NET 8)
Naming conventions
Naming conventions
- Classes: PascalCase —
ArenaController,ChatProviderFactory - Methods: PascalCase —
SendMessageAsync,GetThreadById - Variables: camelCase —
threadId,modelResponse - Constants: PascalCase —
MaxRetryAttempts - Interfaces: Prefix with
I—IChatProvider,ISupabaseClient
Architecture patterns
Architecture patterns
- Controllers handle HTTP concerns only — no business logic
- Services contain business logic
- Use dependency injection for all services
- Async/await for all I/O operations
- Return
IActionResultfrom controllers
Error handling
Error handling
Frontend (JavaScript)
File organization
File organization
Code style
Code style
- Use
constby default,letwhen reassignment is needed - Arrow functions for callbacks
- Template literals for string interpolation
- Async/await over
.then()chains - Descriptive variable names — no single-letter variables
Commit conventions
Use conventional commit messages:| Prefix | Usage | Example |
|---|---|---|
feat: | New feature | feat: add OpenAI provider integration |
fix: | Bug fix | fix: handle expired JWT in streaming |
docs: | Documentation | docs: update API reference for voting |
refactor: | Code refactoring | refactor: extract model selection logic |
test: | Adding tests | test: add unit tests for ArenaController |
chore: | Maintenance | chore: update NuGet dependencies |
Pull request checklist
Before submitting your PR, verify:Documentation updated
Update relevant docs if your change affects the API, configuration, or user-facing behavior.
What to contribute
Good First Issues
Look for issues labeled
good-first-issue on GitHub — these are beginner-friendly tasks.Bug Reports
Found a bug? Open an issue with reproduction steps, expected vs actual behavior, and environment details.
New Providers
Add support for new AI providers by implementing the
IChatProvider interface.Documentation
Improve docs, fix typos, add examples, or translate content.
Need help?
If you’re stuck or unsure about an approach, open a draft PR early and ask for feedback. We’re happy to guide contributors.