Skip to content

Commit 0785188

Browse files
amosttAygentic
andcommitted
chore: rename master branch to main and refresh project docs
Rename default branch from master to main across all CI workflows, documentation, and PRD. Also adds comprehensive project documentation generated by the initialise skill (CLAUDE.md, docs/ structure). 🤖 Generated by Aygentic Co-Authored-By: Aygentic <noreply@aygentic.com>
1 parent 96fa33e commit 0785188

25 files changed

+5746
-21
lines changed

.github/workflows/deploy-staging.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Deploy to Staging
33
on:
44
push:
55
branches:
6-
- master
6+
- main
77

88
jobs:
99
deploy:

.github/workflows/latest-changes.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Latest Changes
33
on:
44
pull_request_target:
55
branches:
6-
- master
6+
- main
77
types:
88
- closed
99
workflow_dispatch:

.github/workflows/playwright.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Playwright Tests
33
on:
44
push:
55
branches:
6-
- master
6+
- main
77
pull_request:
88
types:
99
- opened

.github/workflows/test-backend.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Test Backend
33
on:
44
push:
55
branches:
6-
- master
6+
- main
77
pull_request:
88
types:
99
- opened

.github/workflows/test-docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Test Docker Compose
33
on:
44
push:
55
branches:
6-
- master
6+
- main
77
pull_request:
88
types:
99
- opened

CLAUDE.md

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
# CLAUDE.md
2+
3+
## Project Overview
4+
5+
Full-stack web app template: FastAPI backend + React frontend + PostgreSQL. JWT auth, user management, CRUD, auto-generated API client. Docker Compose-based monorepo with Traefik reverse proxy.
6+
7+
## Technology Stack
8+
9+
| Category | Technology |
10+
|----------|-----------|
11+
| Backend | Python >=3.10, FastAPI >=0.114.2 |
12+
| ORM | SQLModel >=0.0.21 (SQLAlchemy) |
13+
| Database | PostgreSQL 18, Alembic migrations |
14+
| Frontend | TypeScript 5.9, React 19.1, Vite 7.3 (SWC) |
15+
| Routing | TanStack Router 1.157+ (file-based) |
16+
| Server State | TanStack Query 5.90+ |
17+
| Styling | Tailwind CSS 4.2, shadcn/ui (new-york) |
18+
| Auth | JWT (HS256) via PyJWT, Argon2+Bcrypt |
19+
20+
**Key Libraries:** Zod 4.x, React Hook Form 7.x, Axios 1.13, lucide-react, sonner
21+
22+
## Architecture Overview
23+
24+
**Pattern:** Layered monorepo — `backend/` (Python) + `frontend/` (TypeScript)
25+
26+
```
27+
backend/app/
28+
api/routes/ # FastAPI endpoint handlers
29+
core/ # config.py, db.py, security.py
30+
alembic/versions/ # Database migrations
31+
models.py # SQLModel tables + Pydantic schemas
32+
crud.py # Data access functions
33+
frontend/src/
34+
routes/ # TanStack file-based routing (pages)
35+
components/ # UI (Admin/, Items/, Common/, UserSettings/, Sidebar/, ui/)
36+
client/ # Auto-generated OpenAPI client — DON'T EDIT
37+
hooks/ # Custom React hooks
38+
```
39+
40+
**Important Patterns:**
41+
- Backend models: `ModelBase → ModelCreate → ModelUpdate → Model(table=True) → ModelPublic`
42+
- `src/client/`, `src/routeTree.gen.ts`, `src/components/ui/` are auto-generated — don't edit
43+
44+
**Key Files:** `backend/app/main.py` (FastAPI entry), `backend/app/core/config.py` (settings from `.env`), `frontend/src/main.tsx` (React app + QueryClient + Router)
45+
46+
## Development Commands
47+
48+
```bash
49+
# Setup
50+
cd backend && uv sync # Backend deps
51+
bun install # Frontend deps
52+
cd backend && uv run prek install -f # Pre-commit hooks
53+
docker compose watch # Start full stack
54+
55+
# Development
56+
docker compose watch # Full stack (recommended)
57+
bun run dev # Frontend only (:5173)
58+
cd backend && fastapi dev app/main.py # Backend only (:8000)
59+
60+
# Testing
61+
bash ./scripts/test.sh # All backend tests (Pytest)
62+
bunx playwright test # Frontend E2E
63+
bunx playwright test tests/login.spec.ts # Single E2E test
64+
65+
# Quality
66+
bun run lint # Frontend (Biome)
67+
uv run ruff check --fix # Backend lint
68+
uv run ruff format # Backend format
69+
uv run mypy backend/app # Backend type check
70+
71+
# Utilities
72+
bash ./scripts/generate-client.sh # Regenerate OpenAPI client
73+
```
74+
75+
## Code Conventions
76+
77+
- **Backend:** snake_case files/functions, PascalCase classes, absolute imports `from app.*`, Ruff + strict mypy
78+
- **Frontend:** PascalCase components, camelCase utils, `@/` alias → `./src/*`, Biome (double quotes, no semicolons)
79+
80+
## Testing
81+
82+
**Backend:** Pytest in `backend/tests/` (api/routes/, crud/, scripts/) — `uv run pytest backend/tests/path/to/test.py`
83+
**Frontend:** Playwright E2E in `frontend/tests/``bunx playwright test tests/file.spec.ts`
84+
85+
See `@docs/testing/strategy.md` for coverage requirements and mocking patterns.
86+
87+
## Database & Migrations
88+
89+
**ORM:** SQLModel | **Models:** `backend/app/models.py`
90+
91+
```bash
92+
alembic revision --autogenerate -m "desc" # Create migration
93+
alembic upgrade head # Apply pending
94+
alembic downgrade -1 # Rollback last
95+
alembic history --verbose # View history
96+
```
97+
98+
Always review autogenerated migrations before applying. See `@docs/data/models.md`.
99+
100+
## Known Issues
101+
102+
- `SECRET_KEY`, `POSTGRES_PASSWORD`, `FIRST_SUPERUSER_PASSWORD` default to `changethis` — change for staging/production
103+
- Backend syntax errors crash dev container — restart with `docker compose watch`
104+
- Pre-commit hook auto-regenerates frontend SDK on backend changes
105+
- Alembic autogenerated migrations need manual review
106+
107+
## Documentation
108+
109+
Key references in `docs/`:
110+
- `@docs/getting-started/setup.md` - Setup and environment
111+
- `@docs/getting-started/development.md` - Daily development workflow
112+
- `@docs/architecture/overview.md` - System architecture
113+
- `@docs/api/overview.md` - API documentation
114+
- `@docs/data/models.md` - Data models and schemas
115+
- `@docs/testing/strategy.md` - Testing approach
116+
- `@docs/deployment/environments.md` - Deployment guides
117+
- `@docs/deployment/ci-pipeline.md` - CI/CD pipeline documentation

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ git remote add upstream git@github.com:fastapi/full-stack-fastapi-template.git
8686
- Push the code to your new repository:
8787

8888
```bash
89-
git push -u origin master
89+
git push -u origin main
9090
```
9191

9292
### Update From the Original Template
@@ -107,7 +107,7 @@ upstream git@github.com:fastapi/full-stack-fastapi-template.git (push)
107107
- Pull the latest changes without merging:
108108

109109
```bash
110-
git pull --no-commit upstream master
110+
git pull --no-commit upstream main
111111
```
112112

113113
This will download the latest changes from this template without committing them, that way you can check everything is right before committing.
@@ -184,7 +184,7 @@ If you have `pipx` and you didn't install `copier`, you can run it directly:
184184
pipx run copier copy https://github.com/fastapi/full-stack-fastapi-template my-awesome-project --trust
185185
```
186186

187-
**Note** the `--trust` option is necessary to be able to execute a [post-creation script](https://github.com/fastapi/full-stack-fastapi-template/blob/master/.copier/update_dotenv.py) that updates your `.env` files.
187+
**Note** the `--trust` option is necessary to be able to execute a [post-creation script](https://github.com/fastapi/full-stack-fastapi-template/blob/main/.copier/update_dotenv.py) that updates your `.env` files.
188188

189189
### Input Variables
190190

deployment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ The current Github Actions workflows expect these secrets:
310310

311311
There are GitHub Action workflows in the `.github/workflows` directory already configured for deploying to the environments (GitHub Actions runners with the labels):
312312

313-
* `staging`: after pushing (or merging) to the branch `master`.
313+
* `staging`: after pushing (or merging) to the branch `main`.
314314
* `production`: after publishing a release.
315315

316316
If you need to add extra environments you could use those as a starting point.

docs/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Project Documentation
2+
3+
Welcome to the Aygentic Starter Template documentation. This directory contains comprehensive technical documentation for the full-stack FastAPI + React application.
4+
5+
## Documentation Structure
6+
7+
- **[Getting Started](./getting-started/)** - Setup, development environment, and contribution guides
8+
- **[PRD](./prd/)** - Product requirements and feature specifications
9+
- **[Architecture](./architecture/)** - System design, diagrams, and architectural decisions
10+
- **[API](./api/)** - API documentation and endpoint references
11+
- **[Data](./data/)** - Data models, schemas, and database documentation
12+
- **[Testing](./testing/)** - Testing strategy, test registry, and test plans
13+
- **[Deployment](./deployment/)** - Deployment guides and infrastructure documentation
14+
- **[Runbooks](./runbooks/)** - Operational procedures and incident response
15+
16+
## Quick Links
17+
18+
- [Setup Guide](./getting-started/setup.md)
19+
- [Development Guide](./getting-started/development.md)
20+
- [Contributing](./getting-started/contributing.md)
21+
- [Architecture Overview](./architecture/overview.md)
22+
- [API Overview](./api/overview.md)
23+
- [Data Models](./data/models.md)
24+
- [Testing Strategy](./testing/strategy.md)
25+
- [Test Registry](./testing/test-registry.md)
26+
- [Environments](./deployment/environments.md)
27+
- [Incidents](./runbooks/incidents.md)
28+
29+
---
30+
31+
**Last Updated**: 2026-02-26

0 commit comments

Comments
 (0)