Contributing¶
Development Workflow¶
- Fork the repository
- Create a feature branch from
main - Make your changes
- Run tests and linting locally
- Submit a pull request
Code Standards¶
Backend (Python)¶
- Formatter: Ruff (
ruff format app/) - Linter: Ruff (
ruff check app/) - Type checker: mypy (
mypy app/) - Tests: pytest (
pytest --cov=app)
Frontend (TypeScript/React)¶
- Linter: ESLint (
npm run lint) - Tests: Vitest (
npm test) - Build check:
npm run build(includes TypeScript compilation)
Pull Request Checklist¶
- [ ] Backend tests pass (
pytest) - [ ] Frontend tests pass (
npm test) - [ ] Linting passes (Ruff, ESLint)
- [ ] Type checking passes (mypy, TypeScript)
- [ ] Docker build succeeds
- [ ] Database migrations included if schema changed
- [ ]
setup_databases.sqlupdated if schema changed
Database Changes¶
When modifying the database schema:
- Update the SQLAlchemy model in
app/models/ - Create a migration SQL file in
migrations/ - Update
setup_databases.sqlto reflect the new schema - Test the migration:
python migrations/run_migration.py <name>
Project Conventions¶
- Backend routes follow REST conventions
- Frontend uses Zustand for state management (not Redux)
- API clients are organized by resource in
frontend/src/api/endpoints/ - Use
MasterBasefor master DB models,Basefor tenant DB models - Session-based authentication (no JWT tokens)