一键导入
backend-architecture-fastapi
AI-Optimized FastAPI architecture with strict Pydantic V2 schemas and modular routing.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
AI-Optimized FastAPI architecture with strict Pydantic V2 schemas and modular routing.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Syncs Telegram supergroup topics into local task files and GitHub issues, using embedded Python scripts for deterministic JSON state management. Preserves raw bilingual messages verbatim, injects refactored prompts, and correlates codebase context.
100% Jetpack Compose, MVI (UDF), Hilt, and SQLDelight for token-efficient, zero-hallucination Android development.
NestJS, Prisma ORM, Vertical Slice Architecture, and Strict TypeScript for zero-hallucination backend development.
Expo Managed Workflow, Expo Router, NativeWind, and Strict TypeScript for zero-hallucination cross-platform apps.
Automatically generates decentralized task files based on manager instructions.
Idiomatic Go, Clean Architecture, and Gin routing best practices
| name | backend-architecture-fastapi |
| description | AI-Optimized FastAPI architecture with strict Pydantic V2 schemas and modular routing. |
-> dict, : str) on every single function, argument, and return type.Depends()) simple and localized.app/
├── api/ # API routers (v1/users.py)
├── core/ # config.py (Pydantic BaseSettings)
├── db/ # Database session and setup (Supabase/Postgres)
├── models/ # SQLAlchemy 2.0 Typed Models
├── schemas/ # Pydantic V2 Models (DTOs)
├── services/ # Business logic
└── main.py # FastAPI instance
| Artifact | Convention | Example |
|---|---|---|
| Files/Directories | snake_case | user_service.py |
| Classes | PascalCase | UserService |
| Functions/Methods | snake_case | get_user_by_id |
| Variables | snake_case | current_user |
Dependency Injection: Use Depends() for database sessions (get_db) and authentication (get_current_user). Never instantiate global DB sessions in routers.
ORM to Schema Separation: Never return SQLAlchemy models directly from endpoints. Always return Pydantic schemas to ensure data validation and hide sensitive fields.
Async First: Use async def for endpoints and asynchronous database drivers (e.g., asyncpg for SQLAlchemy) to maximize throughput.
| Layer | Test Type | Framework | File Naming |
|---|---|---|---|
| Service | Unit | Pytest | test_user_service.py |
| Route / View | Integration | Pytest + httpx AsyncClient | test_users.py |