Skip to content

Commit e548b3d

Browse files
committed
[DOCS] add starter selection guide & update fastkit output demos
1 parent cf63fb6 commit e548b3d

7 files changed

Lines changed: 337 additions & 105 deletions

File tree

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ fastkit init --interactive
6767
```
6868
- What it does: Guided step-by-step project setup with intelligent feature selection
6969
- Features:
70+
- **Architecture preset**: `minimal` | `single-module` | `classic-layered` | `domain-starter` (default)
7071
- **Database selection**: PostgreSQL, MySQL, MongoDB, Redis, SQLite
7172
- **Authentication**: JWT, OAuth2, FastAPI-Users, Session-based
7273
- **Background tasks**: Celery, Dramatiq
@@ -77,10 +78,10 @@ fastkit init --interactive
7778
- **Deployment**: Docker, docker-compose with auto-generated configs
7879
- **Package manager**: pip, uv, pdm, poetry
7980
- **Custom packages**: Add your own dependencies
80-
- Auto-generates:
81-
- `main.py` with selected features integrated
82-
- Database and authentication configuration files
83-
- Docker deployment files (Dockerfile, docker-compose.yml)
81+
- Auto-generates (varies by preset — see [the matrix](https://bnbong.github.io/FastAPI-fastkit/reference/preset-feature-matrix/) for details):
82+
- `main.py` regenerated from selected features for `minimal` / `single-module`; preserved as-shipped for `classic-layered` / `domain-starter`
83+
- Database and authentication configuration files at preset-specific paths
84+
- Docker deployment files (`Dockerfile`, `docker-compose.yml`) with the preset's correct uvicorn entrypoint
8485
- Test configuration (pytest with coverage)
8586

8687
### Create a project from a template
@@ -121,9 +122,11 @@ fastkit deleteproject <project_name>
121122

122123
For comprehensive guides and detailed usage instructions, visit our documentation:
123124

125+
- 🧭 **[Which starter should I choose?](https://bnbong.github.io/FastAPI-fastkit/user-guide/choosing-a-starter/)** - Beginner decision guide for `startdemo` templates and interactive presets
124126
- 📚 **[User Guide](https://bnbong.github.io/FastAPI-fastkit/user-guide/quick-start/)** - Detailed installation and usage guides
125127
- 🎯 **[Tutorial](https://bnbong.github.io/FastAPI-fastkit/tutorial/getting-started/)** - Step-by-step tutorials for beginners
126128
- 📖 **[CLI Reference](https://bnbong.github.io/FastAPI-fastkit/user-guide/cli-reference/)** - Complete command reference
129+
- 🧱 **[Architecture Preset Matrix](https://bnbong.github.io/FastAPI-fastkit/reference/preset-feature-matrix/)** - Per-preset / per-feature contract for interactive generation
127130
- 🔍 **[Template Quality Assurance](https://bnbong.github.io/FastAPI-fastkit/reference/template-quality-assurance/)** - Automated testing and quality standards
128131

129132
## Contributing

docs/en/index.md

Lines changed: 59 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -275,35 +275,54 @@ Select package manager (pip, uv, pdm, poetry): uv
275275
📝 Custom Packages (optional)
276276
Enter custom package names (comma-separated, press Enter to skip):
277277

278-
───────────────── Selected Configuration ─────────────────
279-
Project: my-fullstack-project
280-
Database: PostgreSQL
281-
Authentication: JWT
282-
Background Tasks: Celery
283-
Caching: Redis
284-
Monitoring: Prometheus
285-
Testing: Coverage
286-
Utilities: CORS
287-
Deployment: Docker, docker-compose
288-
Package Manager: uv
289-
──────────────────────────────────────────────────────────
278+
📋 Project Configuration Summary
279+
┌─────────────────────┬───────────────────────────────────────────────────────────────────────────┐
280+
│ Setting │ Value │
281+
├─────────────────────┼───────────────────────────────────────────────────────────────────────────┤
282+
│ Project Name │ my-fullstack-project │
283+
│ Author │ John Doe │
284+
│ Email │ john@example.com │
285+
│ Description │ Full-stack FastAPI project with PostgreSQL and JWT │
286+
│ Architecture Preset │ domain-starter — Domain-oriented: src/app/domains/<concept>/ (recommended)│
287+
│ Database │ PostgreSQL │
288+
│ Authentication │ JWT │
289+
│ Async Tasks │ Celery │
290+
│ Caching │ Redis │
291+
│ Monitoring │ Prometheus │
292+
│ Testing │ Coverage │
293+
│ Utilities │ CORS │
294+
│ Package Manager │ uv │
295+
└─────────────────────┴───────────────────────────────────────────────────────────────────────────┘
296+
297+
Total dependencies to install: 18
290298

291299
Proceed with project creation? [Y/n]: y
292300

301+
╭──────────────────────── Info ────────────────────────╮
302+
│ ℹ Injected metadata into pyproject.toml │
303+
╰──────────────────────────────────────────────────────╯
293304
╭─────────────────────── Success ───────────────────────╮
294-
│ ✨ Generated main.py with selected features │
295-
╰───────────────────────────────────────────────────────╯
296-
╭─────────────────────── Success ───────────────────────╮
297-
│ ✨ Generated database configuration │
305+
│ ✨ Generated dependency file with 18 packages │
298306
╰───────────────────────────────────────────────────────╯
307+
╭──────────────────────── Info ────────────────────────╮
308+
│ ℹ Preserving template-shipped main.py for preset │
309+
│ 'domain-starter'. │
310+
╰──────────────────────────────────────────────────────╯
299311
╭─────────────────────── Success ───────────────────────╮
300-
│ ✨ Generated authentication configuration
312+
│ ✨ Generated Docker deployment files
301313
╰───────────────────────────────────────────────────────╯
302-
╭─────────────────────── Success ───────────────────────╮
303-
│ ✨ Generated test configuration │
314+
╭────────────────────── Warning ────────────────────────╮
315+
│ ⚠ Preset compatibility │
316+
│ fastapi-domain-starter's shipped src/app/main.py is │
317+
│ preserved. The selections below need manual wiring │
318+
│ there (CORS is already wired — set │
319+
│ BACKEND_CORS_ORIGINS in .env to activate it). │
320+
│ Affected selections (packages installed, but no │
321+
│ dynamic main.py edits applied for the │
322+
│ 'domain-starter' preset): Prometheus │
304323
╰───────────────────────────────────────────────────────╯
305324
╭─────────────────────── Success ───────────────────────╮
306-
│ ✨ Generated Docker deployment files
325+
│ ✨ Generated configuration files for selected stack
307326
╰───────────────────────────────────────────────────────╯
308327

309328
Creating virtual environment...
@@ -312,27 +331,21 @@ Installing dependencies...
312331
----> 100%
313332

314333
╭─────────────────────── Success ───────────────────────╮
315-
│ ✨ FastAPI project 'my-fullstack-project' created! │
316-
│ │
317-
│ Generated files: │
318-
│ • main.py (with all selected features) │
319-
│ • src/config/database.py │
320-
│ • src/config/auth.py │
321-
│ • tests/conftest.py │
322-
│ • Dockerfile │
323-
│ • docker-compose.yml │
324-
│ • pyproject.toml / requirements.txt │
334+
│ ✨ FastAPI project 'my-fullstack-project' from │
335+
│ 'fastapi-domain-starter' has been created! │
325336
╰───────────────────────────────────────────────────────╯
326337
```
327338

328339
</div>
329340

330341
The interactive mode provides:
342+
- **Architecture preset selection** (`minimal` / `single-module` / `classic-layered` / `domain-starter`) that picks the right base template and project layout
331343
- **Guided selection** for databases, authentication, background tasks, caching, monitoring, and more
332-
- **Auto-generated code** for selected features (main.py, config files, Docker files)
344+
- **Auto-generated code** for selected features — varies by preset (regenerated `main.py` for `minimal` / `single-module`; preserve template-shipped `main.py` and overlay config modules for `classic-layered` / `domain-starter`)
345+
- **Preset-aware Docker generation** — the generated `Dockerfile` `CMD` targets the preset's actual entrypoint (`src.main:app` or `src.app.main:app`)
333346
- **Smart dependency management** with automatic pip compatibility
334-
- **Feature validation** to prevent incompatible combinations
335-
- **Always Empty project** as base for maximum flexibility
347+
- **Feature validation** with manual-wiring warnings for selections the preset cannot auto-wire
348+
- **Identity markers** in the generated `pyproject.toml` (description marker + `[tool.fastapi-fastkit]` table) so `is_fastkit_project()` can recognize generated projects later
336349

337350
### Add a new route to the FastAPI project
338351

@@ -434,18 +447,19 @@ To view the list of available FastAPI demos, check with:
434447

435448
```console
436449
$ fastkit list-templates
437-
Available Templates
438-
┌─────────────────────────┬───────────────────────────────────┐
439-
│ fastapi-custom-response │ Async Item Management API with │
440-
│ │ Custom Response System │
441-
│ fastapi-dockerized │ Dockerized FastAPI Item │
442-
│ │ Management API │
443-
│ fastapi-empty │ No description │
444-
│ fastapi-async-crud │ Async Item Management API Server │
445-
│ fastapi-psql-orm │ Dockerized FastAPI Item │
446-
│ │ Management API with PostgreSQL │
447-
│ fastapi-default │ Simple FastAPI Project │
448-
└─────────────────────────┴───────────────────────────────────┘
450+
Available Templates
451+
┌────────────────────────┬───────────────────────────────────────────────────────┐
452+
│ fastapi-custom-response│ Async Item Management API with Custom Response System │
453+
│ fastapi-mcp │ FastAPI MCP Project │
454+
│ fastapi-domain-starter │ FastAPI Domain Starter │
455+
│ fastapi-dockerized │ Dockerized FastAPI Item Management API │
456+
│ fastapi-empty │ Minimal FastAPI Template │
457+
│ fastapi-async-crud │ Async Item Management API Server │
458+
│ fastapi-psql-orm │ Dockerized FastAPI Item Management API with │
459+
│ │ PostgreSQL │
460+
│ fastapi-default │ Simple FastAPI Project │
461+
│ fastapi-single-module │ FastAPI Single Module Template │
462+
└────────────────────────┴───────────────────────────────────────────────────────┘
449463
```
450464

451465
</div>

0 commit comments

Comments
 (0)