Thanks for your interest in contributing. This document covers the basics for getting started.
-
Fork and clone the repository:
git clone https://github.com/your-username/habla-hermano.git cd habla-hermano -
Install dependencies (requires uv):
make install
-
Configure environment:
cp .env.example .env
Fill in at minimum:
ANTHROPIC_API_KEY-- from console.anthropic.comSUPABASE_URL,SUPABASE_ANON_KEY,SUPABASE_DB_URL-- from your Supabase projectSECRET_KEY-- generate withpython -c "import secrets; print(secrets.token_urlsafe(32))"
-
Run the dev server:
make dev # Starts at http://localhost:8000
make test # All tests (Python + JavaScript)
make test-fast # Skip slow tests
make test-cov # With coverage report
make test-js # JavaScript tests only (Vitest)The project has 2,400+ Python tests and 241 JavaScript tests.
Before submitting a PR, ensure all checks pass:
make check # Runs: ruff lint + ruff format --check + mypyThe project uses:
- Ruff for linting and formatting
- MyPy in strict mode for type checking
- Pre-commit hooks (install with
make install-hooks)
-
Create a feature branch from
main:git checkout -b feature/your-feature-name
-
Write tests for new functionality. Follow the patterns in
tests/. -
Ensure
make checkpasses with no errors. -
Keep commits focused. One logical change per commit with a descriptive message.
-
Open a PR with a clear description of what changed and why.
src/ Core application code
api/ FastAPI routes, middleware, auth
agent/ LangGraph pipeline, nodes, prompts
db/ Database client, models, repositories
services/ Business logic (review, paths, adaptive)
lessons/ Lesson models and service
templates/ Jinja2 HTML templates
static/ CSS + JavaScript modules
tests/ Python tests (pytest)
tests/js/ JavaScript tests (Vitest)
data/lessons/ 60 YAML lesson files
docs/ Architecture docs and design documents
migrations/ SQL migration files for Supabase
- Follow existing patterns in the codebase
- Python: type hints on all functions, no
Anywithout justification - JavaScript: ES modules, no global state
- Templates: HTMX for interactivity, minimal inline JS
- CSS: Tailwind utility classes, CSS custom properties for theming