← ClaudeAtlas

farm-stacklisted

Use when building or scaffolding FastAPI + React + MongoDB (FARM stack) applications. Covers project structure, async MongoDB with Motor, Pydantic v2 models, config patterns, Docker setup, and testing conventions.
Sagargupta16/claude-skills · ★ 3 · AI & Automation · score 71
Install: claude install-skill Sagargupta16/claude-skills
# FARM Stack Development Patterns ## Quick Reference | Task | Approach | |------|----------| | New project | Use `/scaffold-farm` or follow structure below | | Add feature | Create model -> service -> route (one file per domain per layer) | | Config | Dual-layer: env vars (priority) + YAML fallback | | Database | Motor async client, never sync PyMongo in routes | | Docker | Alpine-based, compose with MongoDB + backend | | Frontend | Vite + React, proxy API in dev, static mount in prod | | Testing | pytest + httpx async, 80%+ coverage target | ## Project Structure ``` project-root/ ├── main.py # FastAPI entry with lifespan ├── requirements.txt # Pinned dependencies ├── pyproject.toml # Tool config (ruff, pytest) ├── .env.example # Environment template ├── Dockerfile # python:3.13-alpine ├── docker-compose.yml # MongoDB + backend + optional frontend ├── Makefile # Dev commands (run, test, lint, build) ├── config/ │ ├── __init__.py │ ├── secrets_parser.py # Env + YAML config loader, Motor client │ ├── secrets.yml # Local dev config (git-ignored) │ ├── secrets.yml.example # Template with placeholders │ └── logging.py # Logging setup ├── models/ # Pydantic v2 data models │ └── {domain}_models.py # Base -> Create -> Response per domain ├── routes/ # API endpoint handlers │ └── {domain}_routes.py