skillfed

fastapi-templates

This skill provides structured project templates for FastAPI applications, covering directory organization, configuration management, and async database integration. It includes patterns for dependency injection, CRUD repositories, and service layers to establish a scalable foundation for backend API development.

fastapi-templates helps you set up new FastAPI projects with production-ready architecture, async patterns, and dependency injection.

AI-generated summary based on this skill's SKILL.md

86 12 MIT updated by HermeticOrmus

Install

HermeticOrmus/LibreUIUX-Claude-Code/fastapi-templates · repository language: Shell

git clone https://github.com/HermeticOrmus/LibreUIUX-Claude-Code
cp -r LibreUIUX-Claude-Code/plugins/api-scaffolding/skills/fastapi-templates ~/.claude/skills/fastapi-templates
npx skillfed install HermeticOrmus/LibreUIUX-Claude-Code/fastapi-templates

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How do I structure a FastAPI application?

fastapi-templates provides a structured project layout for FastAPI applications that organizes code into logical layers. The template includes directories for routes, services, repositories, schemas, and models, following production-ready architecture patterns. This organization supports scalability and maintainability as your API grows, with clear separation between business logic, data access, and request handling.

What async patterns does fastapi-templates include?

fastapi-templates demonstrates async database operations and dependency injection patterns essential for high-performance APIs. The templates show how to use SQLAlchemy's async engine, manage database sessions efficiently, and implement async/await throughout your application. These patterns enable FastAPI to handle concurrent requests effectively while maintaining clean, readable code.

How do I use the CRUD repository pattern in fastapi-templates?

fastapi-templates includes repository and service layer patterns that abstract database operations. The repository pattern encapsulates CRUD logic in dedicated classes, while the service layer handles business rules. This separation makes your code testable, reusable, and easier to maintain. The templates show concrete examples of implementing these patterns with async database access.

Does fastapi-templates include authentication and error handling?

fastapi-templates covers authentication using JWT tokens and provides middleware for centralized error handling. The templates demonstrate how to implement authorization checks, validate user credentials, and handle exceptions gracefully. These production-ready patterns help secure your API and provide consistent error responses to clients.

What is included in fastapi-templates for production setup?

fastapi-templates is a production-ready boilerplate that covers project initialization, configuration management, and best practices setup. It includes dependency injection configuration, async database integration with PostgreSQL, structured logging, and middleware setup. The template provides a solid foundation for building scalable backend APIs without starting from scratch.

Can I use fastapi-templates for testing my endpoints?

fastapi-templates includes testing patterns for endpoints and business logic using pytest. The templates demonstrate how to write unit tests for services, integration tests for API routes, and how to mock dependencies. These examples help you establish a testing foundation for your FastAPI application from the start.

SKILL.md

rendered from the published skill — quoted content, verbatim

FastAPI Project Templates

Production-ready FastAPI project structures with async patterns, dependency injection, middleware, and best practices for building high-performance APIs.

When to Use This Skill

  • Starting new FastAPI projects from scratch
  • Implementing async REST APIs with Python
  • Building high-performance web services and microservices
  • Creating async applications with PostgreSQL, MongoDB
  • Setting up API projects with proper structure and testing

Core Concepts

1. Project Structure

Recommended Layout: ``` app/ ├── api/ # API routes │ ├── v1/ │ │ ├── endpoints/ │ │ │ ├── users.py │ │ │ ├── auth.py │ │ │ └── items.py │ │ └── router.py │ └── dependencies.py # Shared dependencies ├── core/ # Core configuration │ ├── config.py │ ├── security.py │ └── database.py ├── models/ # Database models │ ├── user.py │ └──

(truncated - see the full file via the links below)

Read as markdown · JSON record · Browse the source repository

File tree — 1 file
plugins/api-scaffolding/skills/fastapi-templates/SKILL.md

Related skills

Tags

project-scaffolding layered-architecture async-database jwt-auth repository-pattern service-oriented type-safety rest-api-design testing-framework production-ready