Thank you for your interest in contributing.
Caution
Security issues must NOT be reported here. Read SECURITY.md and email the maintainer privately instead.
- Before You Start
- Understanding the Codebase
- Branch Naming
- Commit Message Conventions
- Pull Request Requirements
- Code Standards
- Testing Requirements
- What Will Be Rejected
- Review Timeline
- Issue Labels
- Set up your local environment fully by following README.md. If your environment is not running correctly, do not open a PR.
- Search open issues and open PRs before starting work. Duplicate work will be closed.
- For any change that is not a clear bug fix or a
good first issuetask, open an issue first and get explicit approval from a maintainer before writing code. PRs submitted without prior discussion on non-trivial changes will be closed. - Do not begin working on an issue until it is assigned to you. Comment to request assignment; do not self-assign.
Read DOCUMENTATION.md before touching any of the following areas. A PR that contradicts the documented architecture will be rejected regardless of code quality.
| Area | Entry point | What to understand first |
|---|---|---|
| AI inference pipeline | backend/inference.py, backend/fusion.py |
Dual-stream architecture (Stream A + Stream B), temperature scaling, fusion formula |
| Scan endpoints | backend/main.py → /api/v1/scan, /api/v1/scan-auto |
Demo mode vs. real inference path, image routing via router.py |
| Frontend scan flow | src/pages/ScannerPage.tsx |
ScanPhase state machine: idle → capturing → processing → done/error |
| Analysis display | src/pages/AnalysisDashboard.tsx |
Score loading priority: ?id= param → sessionStorage → latest scan |
| API client | src/lib/api.ts |
All backend calls go through this single wrapper |
| Design system | src/index.css |
Color tokens, typography, utility classes — do not introduce inline styles |
| Database schema | backend/migrations/ |
All schema changes require a new migration file |
Branches must follow this exact pattern. PRs from branches that do not match will not be reviewed.
| Type | Pattern | Example |
|---|---|---|
| Feature | feat/<short-description> |
feat/scan-history-export |
| Bug fix | fix/<short-description> |
fix/map-marker-overlap |
| Documentation | docs/<short-description> |
docs/update-setup-guide |
| Refactor | refactor/<short-description> |
refactor/inference-pipeline |
| Tests | test/<short-description> |
test/auth-endpoint-coverage |
| Chore | chore/<short-description> |
chore/update-fastapi |
Rules:
- Use lowercase letters and hyphens only. No underscores, no slashes within the description.
- Keep the description under 40 characters.
- Never push directly to
mainordev. Force pushes tomainare disabled.
Follow the Conventional Commits specification exactly.
<type>(<scope>): <summary>
Allowed types: feat, fix, docs, style, refactor, test, chore
Scopes map to the codebase:
| Scope | What it covers |
|---|---|
scanner |
ScannerPage.tsx, camera/upload logic |
dashboard |
AnalysisDashboard.tsx |
map |
MarketMapPage.tsx, Leaflet layer |
auth |
auth.py, AuthPage.tsx, OAuth flow |
inference |
inference.py, fusion.py, router.py |
api |
main.py endpoints |
db |
backend/migrations/, schema changes |
ci |
.github/workflows/ |
deps |
Dependency updates |
Rules:
- Use the imperative mood:
add,fix,remove— notadded,fixed,removed. - Keep the summary line under 72 characters.
- Do not end the summary line with a period.
- Do not write vague summaries (
update files,fix stuff,changes). These commits will be asked to be reworded before the PR is reviewed.
Examples:
feat(scanner): add live confidence threshold display
fix(auth): handle OAuth redirect loop on mobile Safari
test(inference): add unit tests for temperature scaling edge cases
chore(deps): upgrade fastapi to 0.115
Every PR must pass all of the following before a review will begin. The CI pipeline (ci.yml) enforces the automated checks automatically on every PR opened against main.
| Check | Command | Failure means |
|---|---|---|
| Frontend lint | npm run lint |
ESLint errors in TypeScript/React code |
| Frontend build | npm run build |
TypeScript compile error or Vite build failure |
| Backend lint | ruff check . --config ruff.toml |
PEP 8 / style violations in Python code |
| Backend tests | python -m pytest tests/test_ci.py -v |
Regression in a CI-covered endpoint |
Do not open a PR if any of these are failing locally. Fix them first.
- Branch is up to date with
main— rebase, do not merge - No
.envor.env.localfiles, credentials, secrets, or API keys are present anywhere in the diff - No model weight files (
.pth,.pt,.onnx,.bin) are committed - No
__pycache__/directories,.pycfiles, or macOS._*metadata files are committed - New endpoints include corresponding tests in
backend/tests/orbackend/test_*.py - New utility functions in the frontend include a test file (Vitest)
- UI changes include before/after screenshots in the PR description
- Schema changes include a new migration file under
backend/migrations/
Use the template that loads automatically from .github/PULL_REQUEST_TEMPLATE.md. Every section must be filled in. Placeholder text left in the description ("What does this PR do?", "Why is this change needed?") means the PR is not ready for review and it will be marked as Draft until it is.
- Type-annotate every function signature. Unannotated functions will not be merged.
- Keep route handlers thin. Business logic belongs in dedicated modules (
inference.py,fusion.py,router.py,auth.py), not inmain.pyroute bodies. - All secrets and configuration must come from environment variables via
os.environ.get(...). No hardcoded fallback values for credentials. - Follow the existing pattern for error handling: raise
HTTPExceptionwith a precisestatus_codeanddetail. Do not swallow exceptions silently. - Do not add a dependency to
requirements.txtwithout a prior issue discussion. Add a comment next to it explaining why it is needed. - Run
ruff check . --config ruff.tomlbefore pushing. Ruff is enforced in CI.
- Strict TypeScript mode is enabled in
tsconfig.app.json. Noanytypes without an explicit// eslint-disablecomment that explains why. - Use functional components and hooks only. Class components will not be accepted.
- Components go in
src/components/. Pages go insrc/pages/. Do not create new top-level directories without maintainer approval. - All backend calls must go through
src/lib/api.ts. Do not callfetch()directly from a component. - Use the existing CSS design tokens defined in
src/index.css. Do not introduce arbitrary color values, font sizes, or spacing that are not part of the design system. - Do not add a new npm dependency without a prior issue discussion and maintainer approval.
- Do not commit generated files, build artifacts (
dist/), or editor configuration (.vscode/,.idea/) except for files already tracked. - Do not modify
vercel.json,Dockerfile, orbackend/startup.shwithout explicit maintainer approval — these affect production deployments.
cd backend
python -m pytest tests/test_ci.py -v- All new API endpoints must have at least one test in
backend/tests/or as a newtest_*.pyfile. - All new inference or fusion logic must have unit tests covering the normal path and at least one edge case (e.g., zero confidence, boundary score values).
- Tests must pass with
DEV_BYPASS_AUTH=false. Do not write tests that only work in bypass mode.
Vitest is configured. There are currently no component tests; if you add a utility function or a custom hook, include a co-located .test.ts or .test.tsx file.
PRs will be closed without review if they:
- Are submitted without a prior issue or maintainer approval for non-trivial changes
- Fail any automated CI gate
- Contain
.envor.env.localfiles, secrets, model weights, or binary artifacts - Touch the deployment configuration (
vercel.json,Dockerfile,startup.sh) without approval - Introduce a new dependency (npm or PyPI) without prior discussion
- Rewrite existing, working logic without a documented reason
- Have vague commit messages (
fix,update,wip,changes) - Do not include tests for new logic
- Leave placeholder text in the PR description template
- Add UI that deviates from the design system tokens in
src/index.css
| Action | Target |
|---|---|
| Assignment confirmation on issues | Within 24 hours |
| First review on submitted PR | Within 48 hours |
| Re-review after requested changes | Within 48 hours |
If you have not received a response after 48 hours, tag the maintainer (@jpdevhub) in a comment.
| Label | When to use |
|---|---|
good first issue |
Self-contained tasks with clear acceptance criteria, no deep codebase knowledge required |
bug |
A confirmed deviation from documented behavior |
feature |
A new capability not yet described in the roadmap |
help wanted |
Maintainer is actively seeking external input |
documentation |
Changes or additions to docs only |
needs-discussion |
Opened issue requires design or architecture discussion before work can begin |
When opening an issue, apply the most relevant label and provide enough detail for a contributor to start work without asking for clarification. Vague issues will be closed with a request for more information.
| Channel | Handle / Address |
|---|---|
| Discord | Razen04 |
| Email (non-security) | karanrathore23@zohomail.in |
| Security issues | See SECURITY.md |