Skip to content

Phase 4: Project scaffolding — faststack init#7

Merged
manavgup merged 1 commit into
mainfrom
phase-4/project-scaffolding
Mar 30, 2026
Merged

Phase 4: Project scaffolding — faststack init#7
manavgup merged 1 commit into
mainfrom
phase-4/project-scaffolding

Conversation

@manavgup
Copy link
Copy Markdown
Owner

Summary

  • 8 project templates — pyproject.toml, main.py, config.py, conftest.py, Dockerfile, docker-compose.yml, alembic.ini, async alembic env.py
  • faststack init <name> — scaffolds a complete project with all directories, __init__.py files, .env, .project-config.yaml
  • --entities flag — pre-define entities from YAML, auto-includes routers in main.py
  • Async Alembic — generated env.py uses create_async_engine with auto-model discovery

Test coverage

35 new tests (281 total)

How to test

make check                           # 281 tests pass
faststack init my-test-app           # generates full project structure
ls -la my-test-app/                  # verify files
cat my-test-app/app/main.py          # verify setup_app() call
cat my-test-app/alembic/env.py       # verify async engine
rm -rf my-test-app                   # cleanup

Part of

Phase 4 in #1

🤖 Generated with Claude Code

- 8 Jinja2 project templates: pyproject.toml, main.py, config.py,
  conftest.py, Dockerfile, docker-compose.yml, alembic.ini, alembic env.py
- cli/cmd_init.py: `faststack init <name>` scaffolds complete project
  with directory structure, __init__.py files, .env, .project-config.yaml
- Supports --entities flag for YAML-based entity pre-definition
- Generated alembic/env.py uses async engine with auto-model discovery

35 new tests (281 total) covering:
- Project scaffolding structure and file existence
- Generated Python files parse without syntax errors
- Template rendering with sample variables
- --entities flag includes entity routers in main.py
- Error handling for existing directories

Part of Phase 4 in #1

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@manavgup manavgup merged commit 08e7a63 into main Mar 30, 2026
4 checks passed
@manavgup manavgup deleted the phase-4/project-scaffolding branch March 30, 2026 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant