Initial template

This commit is contained in:
hh
2026-09-08 19:17:12 +02:00
commit c0724dc291
87 changed files with 2583 additions and 0 deletions
+98
View File
@@ -0,0 +1,98 @@
_subdirectory: template
_templates_suffix: .jinja
_answers_file: .copier-answers.backend.yml
_envops:
keep_trailing_newline: true
project_name:
type: str
help: Project name
project_slug:
type: str
help: Package name, snake_case
default: "{{ project_name | lower | replace(' ', '_') | replace('-', '_') | replace('.', '_') }}"
project_description:
type: str
default: "{{ project_name }}"
author_name:
type: str
default: ""
author_email:
type: str
default: ""
backend_services:
type: str
multiselect: true
help: Services, each runs as python -m <module> from one image
choices:
FastAPI api: api
aiogram bot: aiogram_bot
kurigram userbot: kurigram_userbot
taskiq worker: taskiq_worker
APScheduler scheduler: scheduler
default:
- aiogram_bot
database:
type: str
choices:
none: none
MongoDB (Beanie): mongo
PostgreSQL (SQLModel + Alembic): postgres
default: mongo
use_dishka:
type: bool
when: "{{ database != 'postgres' }}"
help: Dishka dependency injection
default: true
use_redis:
type: bool
help: Redis for cache, FSM storage and the taskiq broker
default: false
taskiq_broker:
type: str
when: "{{ 'taskiq_worker' in backend_services }}"
choices:
in-memory: memory
Redis: redis
default: memory
include_payments:
type: bool
when: "{{ 'aiogram_bot' in backend_services }}"
help: CryptoPay (aiosend) deposit and withdraw handlers
default: false
use_llm:
type: bool
help: pydantic-ai agent with Gemini
default: false
dynamic_config:
type: bool
when: "{{ database != 'none' }}"
help: DynamicConfig stored in the database with scripts/config/edit.py
default: "{{ database != 'none' }}"
serve_spa:
type: bool
when: "{{ 'api' in backend_services }}"
help: Serve the frontend build from the api as a SPA
default: false
install_deps:
type: bool
help: uv sync after generation
default: true
_tasks:
- "{% if _copier_operation == 'copy' and install_deps %}sh -c 'cd backend && uv sync'{% else %}true{% endif %}"
- "{% if install_deps %}sh -c 'cd backend && uv run ruff format -q'{% else %}true{% endif %}"