fastapi-layered-architecture
CommunityEnforce clean separation in FastAPI apps.
Authoramaozhao
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill addresses the common issue of tangled FastAPI code by enforcing a strict separation of Router, Service, and Repository layers.
Core Features & Use Cases
- Router: Parse requests and validate with Pydantic
- Service: Implement business logic and coordinate commits
- Repository: Build SQL queries and return model instances
- Use Case: Starting a new production FastAPI project with clean layering
Quick Start
Create the directory structure as shown: app/api/endpoints (Router), app/services (Service), app/repositories (Repository), app/models (DB models), app/schemas (Pydantic models). Then start the app with uvicorn main:app --reload.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: fastapi-layered-architecture Download link: https://github.com/amaozhao/MySkills/archive/main.zip#fastapi-layered-architecture Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.