ameyanagi/tanstack-start-fastapi/init-tanstack-fastapi
Claude Code and agent skill by ameyanagi/tanstack-start-fastapi
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"},{"type":"config","description":"Configuration overrides"}]
Checking that the SKILL.md file is still in the repository.
Initialize a full-stack monorepo with TanStack Start + shadcn/ui frontend (Bun, Biome, tsc) and FastAPI backend (uv, Ruff, ty). Includes hey-api OpenAPI client generation with Zod and TanStack Query, a justfile task runner, and Docker production setup. Use when creating a new full-stack project, scaffolding a monorepo, or setting up TanStack Start with FastAPI.
Install
npx vskill@latest install ameyanagi/tanstack-start-fastapi/init-tanstack-fastapiSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
Initialize TanStack Start + FastAPI Monorepo
Create a production-ready monorepo with a TanStack Start frontend and FastAPI backend.
For detailed configuration file contents, see references/stack-details.md.
Prerequisites
Verify these tools are installed before proceeding:
If any required tool is missing (bun, uv, just, jj, lefthook), stop and inform the user. Docker is optional — warn if missing but continue.
Step 1: Initialize Version Control
Create .jj/.gitignore with content /* so git ignores jj metadata.
Step 2: Scaffold the Frontend
Run the shadcn create command to scaffold a TanStack Start project:
After scaffolding completes:
- Remove the nested git repository created by shadcn (the project uses the root-level jj/git repo):
``bash rm -rf frontend/.git ``
- Remove ESLint configuration if present (the project uses Biome instead):
- Delete
eslint.config.jsor.eslintrc.*if they exist - Remove
eslint,@eslint/*, andprettierpackages frompackage.jsondevDependencies - Remove any eslint/prettier scripts from
package.json
- Install Biome:
``bash cd frontend && bun add -d @biomejs/biome ``
- Create
frontend/biome.jsonwith the configuration from stack-details.md section "Biome Configuration".
- Auto-fix the scaffolded code to conform to Biome rules (formatting, imports):
``bash cd frontend && bunx biome check --write --unsafe . ``
- Install hey-api and API client dependencies:
``bash cd frontend && bun add @hey-api/client-fetch zod @tanstack/react-query cd frontend && bun add -d @hey-api/openapi-ts vitest jsdom ``
- Create
frontend/openapi-ts.config.tswith the configuration from stack-details.md section "Hey-API Configuration".
- Create
frontend/vitest.config.tsandfrontend/src/__tests__/smoke.test.tsfrom stack-details.md section "Frontend Test Configuration".
- Merge these scripts into
frontend/package.json(preserve existing scripts from scaffolding):
``json { "scripts": { "check": "biome check .", "check:fix": "biome check --write .", "typecheck": "tsc --noEmit", "test": "vitest run", "gen:api": "bunx --bun @hey-api/openapi-ts" } } ``
Step 3: Scaffold the Backend
- Initialize a Python project with uv (pinned to Python 3.13 to match Docker images):
``bash uv init backend --app --python 3.13 ``
- Add FastAPI and dependencies:
``bash cd backend && uv add "fastapi[standard]" ``
- Add development dependencies:
``bash cd backend && uv add --dev ruff ty pytest httpx mkdocs mkdocs-material "mkdocstrings[python]" ``
- Create the backend application structure:
`` backend/ ├── app/ │ ├── __init__.py │ ├── main.py │ └── routers/ │ ├── __init__.py │ └── health.py └── scripts/ └── generate_schema.py ``
- Write
backend/app/main.pywith the starter code from stack-details.md section "FastAPI Main App".
- Write
backend/app/routers/health.pywith the health check router from stack-details.md section "Health Router".
- Create empty
backend/app/__init__.pyandbackend/app/routers/__init__.py.
- Write
backend/scripts/generate_schema.pywith the schema export script from stack-details.md section "Schema Generation Script".
- Append the Ruff and ty configuration to
backend/pyproject.tomlfrom stack-details.md section "Ruff and ty Configuration" (includes pytest config).
- Create test files from stack-details.md section "Backend Tests":
backend/tests/__init__.py(empty)backend/tests/conftest.pybackend/tests/test_health.py
- Create
backend/mkdocs.ymlfrom stack-details.md section "MkDocs Configuration".
- Create
backend/docs/index.mdfrom stack-details.md section "MkDocs Index Page".
- Create
backend/docs/api-reference.mdfrom stack-details.md section "MkDocs API Reference".
- Remove
backend/hello.pyif it was created byuv init(the app now lives inbackend/app/).
Step 4: Create the Root Justfile
Create justfile in the project root with the content from stack-details.md section "Justfile".
Key recipes:
set dotenv-loadto read.envdevspawns frontend and backend in paralleldev-frontend/dev-backendfor individual servicescheckruns all linters, formatters, and type checkersgen-apigenerates OpenAPI client from static schemagen-api-livefetches schema from running backend serverdocs-serve/docs-buildfor backend API documentation
Step 5: Create Docker Configuration
- Create
frontend/Dockerfilefrom stack-details.md section "Frontend Dockerfile". - Create
backend/Dockerfilefrom stack-details.md section "Backend Dockerfile". - Create
docker-compose.ymlin the project root from stack-details.md section "Docker Compose". - Create
frontend/.dockerignoreandbackend/.dockerignorefrom stack-details.md section "Dockerignore Files".
Step 6: Create Root Configuration Files
- Create
.env.examplefrom stack-details.md section "Environment Template". - Copy
.env.exampleto.env:
``bash cp .env.example .env ``
- Create
.gitignorefrom stack-details.md section "Gitignore". - Create
README.mdfrom stack-details.md section "Project README". - Create
.editorconfigfrom stack-details.md section "EditorConfig". - Create
.vscode/extensions.jsonfrom stack-details.md section "VS Code Extensions". - Create
.vscode/settings.jsonfrom stack-details.md section "VS Code Settings". - Create
.github/workflows/ci.ymlfrom stack-details.md section "GitHub Actions CI".
Step 7: Install Pre-commit Hooks
- Create
lefthook.ymlat the project root from stack-details.md section "Lefthook Configuration".
- Install the hooks:
``bash lefthook install ``
Step 8: Generate Initial API Client
Step 9: Verify Everything Works
- Run checks:
``bash just check ``
- Run tests:
``bash just test ``
- Run dev servers:
``bash just dev `` Verify:
- Frontend at http://localhost:3000
- Backend at http://localhost:8000
- API docs at http://localhost:8000/docs
- Stop the dev servers after verification.
Final Project Structure
Report the final status to the user, including any warnings or errors encountered during setup.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/init-tanstack-fastapi/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Extension points
hookPre/post lifecycle hooksconfigConfiguration overrides
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ameyanagi/tanstack-start-fastapi/init-tanstack-fastapi)