Production-ready FastAPI project scaffolding templates including directory structure, configuration files, settings management, dependency injection, MCP server integration, and development/production setup patterns. Use when creating FastAPI projects, setting up project structure, configuring FastAPI applications, implementing settings management, adding MCP integration, or when user mentions FastAPI setup, project scaffold, app configuration, environment management, or backend structure.
View on GitHubvanman2024/ai-dev-marketplace
fastapi-backend
plugins/fastapi-backend/skills/fastapi-project-structure/SKILL.md
February 1, 2026
Select agents to install to:
npx add-skill https://github.com/vanman2024/ai-dev-marketplace/blob/main/plugins/fastapi-backend/skills/fastapi-project-structure/SKILL.md -a claude-code --skill fastapi-project-structureInstallation paths:
.claude/skills/fastapi-project-structure/# FastAPI Project Structure Skill
Production-ready FastAPI project scaffolding templates and best practices for building scalable, maintainable backend applications with MCP integration support.
## Instructions
### 1. Choose Project Template
Select the appropriate project template based on your use case:
- **minimal**: Basic FastAPI app structure (single file, quick prototypes)
- **standard**: Standard production structure (API routes, models, services)
- **mcp-server**: FastAPI app with MCP server integration
- **full-stack**: Complete backend with auth, database, background tasks
- **microservice**: Microservice-ready structure with health checks, metrics
### 2. Generate Project Structure
Use the setup script to scaffold a new FastAPI project:
```bash
cd /home/gotime2022/.claude/plugins/marketplaces/ai-dev-marketplace/plugins/fastapi-backend/skills/fastapi-project-structure
./scripts/setup-project.sh <project-name> <template-type>
```
**Template types:** `minimal`, `standard`, `mcp-server`, `full-stack`, `microservice`
**Example:**
```bash
./scripts/setup-project.sh my-api-service standard
```
**What This Creates:**
- Complete directory structure
- Configuration files (pyproject.toml, .env.example)
- Main application entry point
- Settings management system
- Docker configuration (for production templates)
- README with setup instructions
### 3. Configure Application Settings
The skill uses Pydantic Settings for configuration management:
**Settings Structure:**
```python
# app/core/config.py
from pydantic_settings import BaseSettings
class Settings(BaseSettings):
# App Configuration
PROJECT_NAME: str = "FastAPI App"
VERSION: str = "1.0.0"
DEBUG: bool = False
# Server Configuration
HOST: str = "0.0.0.0"
PORT: int = 8000
# Database Configuration (if needed)
DATABASE_URL: str
# Security
SECRET_KEY: str
ALLOWED_ORIGINS: list[str] = ["*"]
class Config:
env_file = ".env"
case_sensitiv