Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
strategy:
matrix:
python-version:
- "3.13" # max
- "3.12"
- "3.11"
- "3.10"
- "3.9"
- "3.8" # min
- "3.14" # max
- "3.13"
- "3.12" # min requirements
- "3.11" # supported, but full functionality not guaranteed
- "3.10" # supported, but full functionality not guaranteed
- "3.9" # supported, but full functionality not guaranteed
fail-fast: false
steps:
- name: Checkout code
Expand Down
54 changes: 54 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,59 @@
# Changelog

## v1.2.0 (2025-11-27)

### Features

- **(Breaking Change) Add `fastkit init --interactive` feature**: Revolutionary feature-by-feature project builder
- `fastkit init --interactive` now provides guided project setup with intelligent feature selection
- Always uses Empty project (fastapi-empty template) as base template to prevent conflicts with DynamicConfigGenerator
- Interactive project configuration with validation and compatibility warnings
- Real-time dependency collection based on selected features
- Confirmation summary before project creation

- **Dynamic Code Generation**: Intelligent code generation based on feature selections
- Integrated DynamicConfigGenerator for automatic code scaffolding
- Generates `main.py` with selected features (auth, database, monitoring, etc.)
- Creates database configuration files for PostgreSQL, MySQL, MongoDB, SQLite
- Generates authentication setup for JWT, OAuth2, FastAPI-Users
- Auto-generates test configuration (pytest with optional coverage)
- Docker deployment files (Dockerfile, docker-compose.yml) generation

- **Enhanced Dependency Management**: Multi-format dependency file generation
- Automatically generates both package-manager-specific files AND requirements.txt
- Ensures pip compatibility regardless of selected package manager
- Dependencies correctly reflect all selected stack features
- Smart dependency deduplication and version management

### Improvements

- **Interactive CLI Experience**:
- Step-by-step feature selection with descriptions. Each selection step proceeds in the following order below:
- Database selection (PostgreSQL, MySQL, MongoDB, Redis, SQLite)
- Authentication options (JWT, OAuth2, FastAPI-Users, Session-based)
- Background tasks (Celery, Dramatiq)
- Caching layer (Redis, fastapi-cache2)
- Monitoring integration (Loguru, OpenTelemetry, Prometheus)
- Testing framework (Basic, Coverage, Advanced)
- Utilities (CORS, Rate-Limiting, Pagination, WebSocket)
- Deployment configuration (Docker, docker-compose)
- Package manager selection (pip, uv, pdm, poetry)
- Custom package addition support

### Technical

- **Interactive Backend Architecture**:
- `InteractiveConfigBuilder`: Orchestrates full interactive flow
- `DynamicConfigGenerator`: Generates feature-specific code
- `DependencyCollector`: Intelligently collects stack dependencies
- Input validators with comprehensive error handling
- Multi-select prompts for utilities and deployment options
- Feature compatibility validation system

### Documentation

- Add AI translation support of user guides(docs/ folder sources that mkdocs renders)

## v1.1.5 (2025-09-14)

### Improvements
Expand Down
50 changes: 16 additions & 34 deletions requirements-docs.txt
Original file line number Diff line number Diff line change
@@ -1,56 +1,38 @@
# This file is @generated by PDM.
# Please do not edit it manually.

annotated-types==0.7.0
anthropic==0.74.0
anyio==4.11.0
babel==2.17.0
backrefs==6.1
certifi==2025.11.12
charset-normalizer==3.4.4
click==8.3.1
backrefs==5.9
certifi==2025.6.15
charset-normalizer==3.4.2
click==8.1.8
colorama==0.4.6
cyclic==1.0.0
distro==1.9.0
docstring-parser==0.17.0
ghp-import==2.1.0
h11==0.16.0
httpcore==1.0.9
httpx==0.28.1
idna==3.11
idna==3.10
jinja2==3.1.6
jiter==0.12.0
markdown==3.10
markdown-it-py==4.0.0
markupsafe==3.0.3
markdown==3.8.2
markdown-it-py==3.0.0
markupsafe==3.0.2
mdurl==0.1.2
mdx-include==1.4.2
mergedeep==1.3.4
mkdocs==1.6.1
mkdocs-get-deps==0.2.0
mkdocs-material==9.7.0
mkdocs-material==9.6.14
mkdocs-material-extensions==1.3.1
mkdocs-static-i18n==1.3.0
openai==2.8.1
packaging==25.0
packaging==24.2
paginate==0.5.7
pathspec==0.12.1
platformdirs==4.5.0
pydantic==2.12.4
pydantic-core==2.41.5
pygments==2.19.2
pymdown-extensions==10.17.1
platformdirs==4.3.6
pygments==2.19.1
pymdown-extensions==10.16
python-dateutil==2.9.0.post0
pyyaml==6.0.3
pyyaml==6.0.2
pyyaml-env-tag==1.1
rcslice==1.1.0
requests==2.32.5
rich==14.2.0
requests==2.32.4
rich==13.9.4
six==1.17.0
sniffio==1.3.1
tqdm==4.67.1
types-pyyaml==6.0.12.20250915
typing-extensions==4.15.0
typing-inspection==0.4.2
urllib3==2.5.0
watchdog==6.0.0
4 changes: 1 addition & 3 deletions scripts/coverage-report.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ NC='\033[0m' # No Color
# Script options
OPEN_HTML=false
SHOW_MISSING=true
MIN_COVERAGE=70
MIN_COVERAGE=80
OUTPUT_FORMAT="term"

# Help function
Expand Down Expand Up @@ -134,8 +134,6 @@ else
echo -e "${GREEN}ℹ️ Changes detected in fastapi_project_template - running all tests${NC}"
fi

echo ""

# Run tests with coverage
if pytest $PYTEST_ARGS; then
echo ""
Expand Down
2 changes: 1 addition & 1 deletion scripts/coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -x
echo "Running tests with coverage..."

# Run tests with coverage
pytest --cov=src/fastapi_fastkit --cov-report=term-missing --cov-report=html --cov-report=xml --cov-fail-under=70
pytest --cov=src/fastapi_fastkit --cov-report=term-missing --cov-report=html --cov-report=xml --cov-fail-under=80

coverage_exit_code=$?

Expand Down
16 changes: 2 additions & 14 deletions scripts/translate.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,12 @@ class TranslationConfig:
target_langs: List[str] = field(
default_factory=lambda: ["ko", "ja", "zh", "es", "fr", "de"]
)
_docs_dir: Optional[Path] = field(default=None, repr=False)
api_provider: str = "openai"
docs_dir: Path = Path(__file__).parent.parent / "docs" / source_lang
api_provider: str = "openai" # openai, anthropic, etc.
api_key: Optional[str] = None
create_pr: bool = True
branch_prefix: str = "translation"

@property
def docs_dir(self) -> Path:
"""Get docs directory path."""
if self._docs_dir is None:
return Path(__file__).parent.parent / "docs" / self.source_lang
return self._docs_dir

@docs_dir.setter
def docs_dir(self, value: Path) -> None:
"""Set docs directory path."""
self._docs_dir = value


class TranslationAPI:
"""Base class for translation API providers."""
Expand Down
2 changes: 1 addition & 1 deletion src/fastapi_fastkit/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.1.5"
__version__ = "1.2.0"
51 changes: 51 additions & 0 deletions src/fastapi_fastkit/backend/interactive/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# --------------------------------------------------------------------------
# Interactive module for FastAPI-fastkit
#
# Provides interactive prompts and configuration building for dynamic
# project creation.
#
# @author bnbong bbbong9@gmail.com
# --------------------------------------------------------------------------
from .config_builder import InteractiveConfigBuilder
from .prompts import (
prompt_additional_features,
prompt_authentication_selection,
prompt_basic_info,
prompt_caching_selection,
prompt_custom_packages,
prompt_database_selection,
prompt_deployment_options,
prompt_monitoring_selection,
prompt_package_manager_selection,
prompt_template_selection,
prompt_testing_selection,
prompt_utilities_selection,
)
from .selectors import confirm_selections, multi_select_prompt, render_selection_table
from .validators import (
sanitize_custom_packages,
validate_feature_compatibility,
validate_package_name,
)

__all__ = [
"InteractiveConfigBuilder",
"prompt_basic_info",
"prompt_template_selection",
"prompt_database_selection",
"prompt_authentication_selection",
"prompt_additional_features",
"prompt_testing_selection",
"prompt_deployment_options",
"prompt_custom_packages",
"prompt_caching_selection",
"prompt_monitoring_selection",
"prompt_utilities_selection",
"prompt_package_manager_selection",
"render_selection_table",
"multi_select_prompt",
"confirm_selections",
"validate_package_name",
"validate_feature_compatibility",
"sanitize_custom_packages",
]
Loading
Loading