-
Notifications
You must be signed in to change notification settings - Fork 0
Scaffold Python FastAPI backend service #15
Copy link
Copy link
Open
Labels
P3: lowLow priority — nice to haveLow priority — nice to havearea: apiFastAPI backend (services/api)FastAPI backend (services/api)needs discussionNeeds team discussion or ADRNeeds team discussion or ADRsize: LLarge — 3-5 daysLarge — 3-5 daystype: featureNew feature or capabilityNew feature or capability
Milestone
Description
Metadata
Metadata
Assignees
Labels
P3: lowLow priority — nice to haveLow priority — nice to havearea: apiFastAPI backend (services/api)FastAPI backend (services/api)needs discussionNeeds team discussion or ADRNeeds team discussion or ADRsize: LLarge — 3-5 daysLarge — 3-5 daystype: featureNew feature or capabilityNew feature or capability
Projects
StatusShow more project fields
Todo
Description
The CLAUDE.md references a planned
services/apiPython FastAPI backend for advanced analytics and data processing that goes beyond what Next.js server actions can efficiently handle.\n\n## Proposed Scope\n\n### What Moves to FastAPI\n- Heavy computation: batch weather data processing, historical analysis\n- Machine learning: fire behavior prediction models (future)\n- Data pipeline: aggregation, ETL for analytics dashboard\n- External API orchestration: RAWS weather stations, satellite imagery\n\n### What Stays in Next.js\n- All current CRUD (observations, auth, user management)\n- Real-time UI interactions (form, map, dashboard)\n- Server-side rendering\n\n### Architecture\n\nservices/api/\n├── pyproject.toml (uv managed)\n├── src/\n│ └── firevector_api/\n│ ├── main.py (FastAPI app)\n│ ├── routers/ (API routes)\n│ ├── models/ (Pydantic models matching @firevector/schema)\n│ ├── services/ (business logic)\n│ └── db/ (SQLAlchemy or direct postgres)\n└── tests/\nDeployment\n- Containerized (Dockerfile)\n- Deploy to Vercel Serverless Functions, Railway, or Fly.io\n- Shared database with Next.js app (same Vercel Postgres)\n\n## Acceptance Criteria\n\n- [ ]
services/api/scaffolded with FastAPI, uv, pytest\n- [ ] Health check endpoint working\n- [ ] Shared database access (read from observations table)\n- [ ] At least one analytics endpoint (e.g., EWS statistics)\n- [ ] Docker build working\n- [ ]npm run test:apiruns pytest from monorepo root\n- [ ] OpenAPI docs generated at/docs