Skip to content

Commit 6507ee2

Browse files
committed
[DOCS] update README, docs/index.md - add fastkit init --interactive option description
1 parent cf75660 commit 6507ee2

File tree

2 files changed

+184
-0
lines changed

2 files changed

+184
-0
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
<a href="https://codecov.io/gh/bnbong/FastAPI-fastkit" >
1515
<img src="https://codecov.io/gh/bnbong/FastAPI-fastkit/graph/badge.svg?token=WS0B6WWD8K"/>
1616
</a>
17+
<a href="https://pepy.tech/project/fastapi-fastkit">
18+
<img src="https://static.pepy.tech/personalized-badge/fastapi-fastkit?period=total&units=INTERNATIONAL_SYSTEM&left_color=BLACK&right_color=GREEN&left_text=downloads" alt="PyPI Downloads">
19+
</a>
1720
</p>
1821

1922
---
@@ -25,6 +28,7 @@ This project was inspired by the `SpringBoot initializer` & Python Django's `dja
2528
## Key Features
2629

2730
- **⚡ Immediate FastAPI project creation** : Super-fast FastAPI workspace & project creation via CLI, inspired by `django-admin` feature of [Python Django](https://github.com/django/django)
31+
- **✨ Interactive project builder**: Guided step-by-step feature selection for databases, authentication, caching, monitoring, and more with auto-generated code
2832
- **🎨 Prettier CLI output** : Beautiful CLI experience powered by [rich library](https://github.com/Textualize/rich)
2933
- **📋 Standards-based FastAPI project templates** : Templates follow Python standards and common FastAPI patterns.
3034
- **🔍 Automated template quality assurance** : Weekly automated testing ensures all templates remain functional and up-to-date
@@ -57,6 +61,28 @@ fastkit init [OPTIONS]
5761
- `--package-manager` [pip|uv|pdm|poetry]
5862
- Stack selection: `minimal` | `standard` | `full` (interactive)
5963

64+
### Create a project with interactive mode
65+
```console
66+
fastkit init --interactive
67+
```
68+
- What it does: Guided step-by-step project setup with intelligent feature selection
69+
- Features:
70+
- **Database selection**: PostgreSQL, MySQL, MongoDB, Redis, SQLite
71+
- **Authentication**: JWT, OAuth2, FastAPI-Users, Session-based
72+
- **Background tasks**: Celery, Dramatiq
73+
- **Caching**: Redis, fastapi-cache2
74+
- **Monitoring**: Loguru, OpenTelemetry, Prometheus
75+
- **Testing**: Basic (pytest), Coverage, Advanced (with faker, factory-boy)
76+
- **Utilities**: CORS, Rate-Limiting, Pagination, WebSocket
77+
- **Deployment**: Docker, docker-compose with auto-generated configs
78+
- **Package manager**: pip, uv, pdm, poetry
79+
- **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)
84+
- Test configuration (pytest with coverage)
85+
6086
### Create a project from a template
6187
```console
6288
fastkit startdemo [TEMPLATE] [OPTIONS]

docs/en/index.md

Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
<a href="https://github.com/bnbong/FastAPI-fastkit/releases" target="_blank">
1212
<img src="https://img.shields.io/github/v/release/bnbong/FastAPI-fastkit" alt="GitHub Release">
1313
</a>
14+
<a href="https://pepy.tech/project/fastapi-fastkit">
15+
<img src="https://static.pepy.tech/personalized-badge/fastapi-fastkit?period=total&units=INTERNATIONAL_SYSTEM&left_color=BLACK&right_color=GREEN&left_text=downloads" alt="PyPI Downloads">
16+
</a>
1417
</p>
1518

1619
---
@@ -22,6 +25,7 @@ This project was inspired by the `SpringBoot initializer` & Python Django's `dja
2225
## Key Features
2326

2427
- **⚡ Immediate FastAPI project creation** : Super-fast FastAPI workspace & project creation via CLI, inspired by `django-admin` feature of [Python Django](https://github.com/django/django)
28+
- **✨ Interactive project builder**: Guided step-by-step feature selection for databases, authentication, caching, monitoring, and more with auto-generated code
2529
- **🎨 Prettier CLI outputs** : Beautiful CLI experience powered by [rich library](https://github.com/Textualize/rich)
2630
- **📋 Standards-based FastAPI project templates** : All FastAPI-fastkit templates are based on Python standards and FastAPI's common use patterns
2731
- **🔍 Automated template quality assurance** : Weekly automated testing ensures all templates remain functional and up-to-date
@@ -167,6 +171,160 @@ Installing dependencies...
167171

168172
This command will create a new FastAPI project workspace environment with Python virtual environment.
169173

174+
### Create a project with interactive mode ✨ NEW!
175+
176+
For more complex projects, use the **interactive mode** to build your FastAPI application step-by-step with intelligent feature selection:
177+
178+
<div class="termy">
179+
180+
```console
181+
$ fastkit init --interactive
182+
183+
⚡ FastAPI-fastkit Interactive Project Setup ⚡
184+
185+
📋 Basic Project Information
186+
Enter the project name: my-fullstack-project
187+
Enter the author name: John Doe
188+
Enter the author email: john@example.com
189+
Enter the project description: Full-stack FastAPI project with PostgreSQL and JWT
190+
191+
🗄️ Database Selection
192+
Select database (PostgreSQL, MySQL, MongoDB, Redis, SQLite, None):
193+
1. PostgreSQL - PostgreSQL database with SQLAlchemy
194+
2. MySQL - MySQL database with SQLAlchemy
195+
3. MongoDB - MongoDB with motor async driver
196+
4. Redis - Redis for caching and session storage
197+
5. SQLite - SQLite database for development
198+
6. None - No database
199+
200+
Select database: 1
201+
202+
🔐 Authentication Selection
203+
Select authentication (JWT, OAuth2, FastAPI-Users, Session-based, None):
204+
1. JWT - JSON Web Token authentication
205+
2. OAuth2 - OAuth2 with password flow
206+
3. FastAPI-Users - Full featured user management
207+
4. Session-based - Cookie-based sessions
208+
5. None - No authentication
209+
210+
Select authentication: 1
211+
212+
⚙️ Background Tasks Selection
213+
Select background tasks (Celery, Dramatiq, None):
214+
1. Celery - Distributed task queue
215+
2. Dramatiq - Fast and reliable task processing
216+
3. None - No background tasks
217+
218+
Select background tasks: 1
219+
220+
💾 Caching Selection
221+
Select caching (Redis, fastapi-cache2, None):
222+
1. Redis - Redis caching
223+
2. fastapi-cache2 - Simple caching for FastAPI
224+
3. None - No caching
225+
226+
Select caching: 1
227+
228+
📊 Monitoring Selection
229+
Select monitoring (Loguru, OpenTelemetry, Prometheus, None):
230+
1. Loguru - Simple and powerful logging
231+
2. OpenTelemetry - Observability framework
232+
3. Prometheus - Metrics and monitoring
233+
4. None - No monitoring
234+
235+
Select monitoring: 3
236+
237+
🧪 Testing Framework Selection
238+
Select testing framework (Basic, Coverage, Advanced, None):
239+
1. Basic - pytest + httpx for API testing
240+
2. Coverage - Basic + code coverage
241+
3. Advanced - Coverage + faker + factory-boy for fixtures
242+
4. None - No testing framework
243+
244+
Select testing framework: 2
245+
246+
🛠️ Additional Utilities
247+
Select utilities (comma-separated numbers, e.g., 1,3,4):
248+
1. CORS - Cross-Origin Resource Sharing
249+
2. Rate-Limiting - Request rate limiting
250+
3. Pagination - Pagination support
251+
4. WebSocket - WebSocket support
252+
253+
Select utilities: 1
254+
255+
🚀 Deployment Configuration
256+
Select deployment option:
257+
1. Docker - Generate Dockerfile
258+
2. docker-compose - Generate docker-compose.yml (includes Docker)
259+
3. None - No deployment configuration
260+
261+
Select deployment option: 2
262+
263+
📦 Package Manager Selection
264+
Select package manager (pip, uv, pdm, poetry): uv
265+
266+
📝 Custom Packages (optional)
267+
Enter custom package names (comma-separated, press Enter to skip):
268+
269+
───────────────── Selected Configuration ─────────────────
270+
Project: my-fullstack-project
271+
Database: PostgreSQL
272+
Authentication: JWT
273+
Background Tasks: Celery
274+
Caching: Redis
275+
Monitoring: Prometheus
276+
Testing: Coverage
277+
Utilities: CORS
278+
Deployment: Docker, docker-compose
279+
Package Manager: uv
280+
──────────────────────────────────────────────────────────
281+
282+
Proceed with project creation? [Y/n]: y
283+
284+
╭─────────────────────── Success ───────────────────────╮
285+
│ ✨ Generated main.py with selected features │
286+
╰───────────────────────────────────────────────────────╯
287+
╭─────────────────────── Success ───────────────────────╮
288+
│ ✨ Generated database configuration │
289+
╰───────────────────────────────────────────────────────╯
290+
╭─────────────────────── Success ───────────────────────╮
291+
│ ✨ Generated authentication configuration │
292+
╰───────────────────────────────────────────────────────╯
293+
╭─────────────────────── Success ───────────────────────╮
294+
│ ✨ Generated test configuration │
295+
╰───────────────────────────────────────────────────────╯
296+
╭─────────────────────── Success ───────────────────────╮
297+
│ ✨ Generated Docker deployment files │
298+
╰───────────────────────────────────────────────────────╯
299+
300+
Creating virtual environment...
301+
Installing dependencies...
302+
303+
----> 100%
304+
305+
╭─────────────────────── Success ───────────────────────╮
306+
│ ✨ FastAPI project 'my-fullstack-project' created! │
307+
│ │
308+
│ Generated files: │
309+
│ • main.py (with all selected features) │
310+
│ • src/config/database.py │
311+
│ • src/config/auth.py │
312+
│ • tests/conftest.py │
313+
│ • Dockerfile │
314+
│ • docker-compose.yml │
315+
│ • pyproject.toml / requirements.txt │
316+
╰───────────────────────────────────────────────────────╯
317+
```
318+
319+
</div>
320+
321+
The interactive mode provides:
322+
- **Guided selection** for databases, authentication, background tasks, caching, monitoring, and more
323+
- **Auto-generated code** for selected features (main.py, config files, Docker files)
324+
- **Smart dependency management** with automatic pip compatibility
325+
- **Feature validation** to prevent incompatible combinations
326+
- **Always Empty project** as base for maximum flexibility
327+
170328
### Add a new route to the FastAPI project
171329

172330
`FastAPI-fastkit` makes it easy to expand your FastAPI project.

0 commit comments

Comments
 (0)