> For the complete documentation index, see [llms.txt](https://zcx.gitbook.io/fastapi-template/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://zcx.gitbook.io/fastapi-template/readme.md).

# Introduction

This **Introduction** is the starting point. Use it to figure out **where** to go next.

**FastAPI Template** is a **production-oriented FastAPI boilerplate**. It ships the cross-cutting concerns most backends need: authentication, logging, rate limiting, health checks, pagination, testing, and CI. You start on domain logic, not infrastructure.

## What you get

| Area             | What ships out of the box                                                     |
| ---------------- | ----------------------------------------------------------------------------- |
| Structure        | A consistent, domain-first layout with `src/core/` for shared infrastructure. |
| Auth             | JWT authentication and basic user management (`register`, `login`, `/me`).    |
| Rate limiting    | slowapi on the sensitive endpoints.                                           |
| CORS and headers | Environment-driven CORS and security headers.                                 |
| Logging          | structlog: console in dev, JSON in prod, with a per-request `X-Request-ID`.   |
| Health           | `/healthz` (liveness) and `/readyz` (real DB probe).                          |
| Pagination       | A reusable cursor-pagination `Page[T]` envelope.                              |
| Data             | PostgreSQL and Alembic migrations, uv, and Docker.                            |
| Quality          | pytest, Ruff, pre-commit, and a GitHub Actions CI pipeline.                   |

## Where to go next

Pick the path that matches what you are doing.

### Just looking around

* Read [Technology Stack](/fastapi-template/developer-manual/technology_stack.md) to understand which tools the template adopts.
* Read [Project Structure](/fastapi-template/architecture/project_structure.md) to see how the code is organised.

### Starting a new project from the template

* Start with [Quickstart](/fastapi-template/developer-manual/quickstart.md) to spin up the stack.
* Then read [Project Structure](/fastapi-template/architecture/project_structure.md) and [Conventions](/fastapi-template/architecture/conventions.md) so your new code follows the same rules.

### Running it on your own machine

* Read [Local Development](/fastapi-template/developer-manual/local_development.md), [Configuration](/fastapi-template/developer-manual/configuration.md), and [Database & Migrations](/fastapi-template/developer-manual/database_migrations.md).

### Working on the code and quality

* [Testing](/fastapi-template/architecture/testing.md) explains the test suite and policy.
* [Contributing](/fastapi-template/contributing/contributing.md) explains the conventions for proposing changes.

### Helping or contributing back

* Start at [Contributing](/fastapi-template/contributing/contributing.md).

> New here? Read [Conventions](/fastapi-template/architecture/conventions.md) next. It covers formatting, imports, and the Pydantic and SQLAlchemy style.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://zcx.gitbook.io/fastapi-template/readme.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
