From 3a8dd6ba0044201c9b490c30ca1848f6f857a99c Mon Sep 17 00:00:00 2001 From: Deeman Date: Fri, 27 Feb 2026 10:25:28 +0100 Subject: [PATCH] refactor: add .copier-answers.yml at root + feature flags + .env.example .copier-answers.yml (new, at repo root): - Points to local template path (was GitLab remote) - _commit: v0.19.0 (enables copier update) - Reflects actual feature set: enable_cms, enable_daas, not directory/i18n/leads web/src/beanflows/core.py: - Added ENABLE_CMS/ENABLE_DAAS/ENABLE_DIRECTORY/ENABLE_LEADS/BUSINESS_MODEL to Config class (mirrors copier.yml questions for runtime feature gating) .env.example (new, at repo root): - Moved from web/.env.example; updated DUCKDB_PATH/SERVING_DUCKDB_PATH to root-relative paths (local.duckdb, analytics.duckdb) .gitignore: - Added web/src/beanflows/static/css/output.css (previously only in web/.gitignore) Co-Authored-By: Claude Sonnet 4.6 --- .copier-answers.yml | 16 ++++++++++++++++ .env.example | 38 ++++++++++++++++++++++++++++++++++++++ .gitignore | 3 +++ web/src/beanflows/core.py | 7 +++++++ 4 files changed, 64 insertions(+) create mode 100644 .copier-answers.yml create mode 100644 .env.example diff --git a/.copier-answers.yml b/.copier-answers.yml new file mode 100644 index 0000000..2a23996 --- /dev/null +++ b/.copier-answers.yml @@ -0,0 +1,16 @@ +# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY +_commit: v0.19.0 +_src_path: /home/Deeman/Projects/quart_saas_boilerplate +author_email: hendrik@beanflows.coffee +author_name: Hendrik Deeman +base_url: https://beanflows.coffee +business_model: saas +description: Commodity analytics for coffee traders +enable_cms: true +enable_daas: true +enable_directory: false +enable_i18n: false +enable_leads: false +payment_provider: paddle +project_name: BeanFlows +project_slug: beanflows diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..2c5e425 --- /dev/null +++ b/.env.example @@ -0,0 +1,38 @@ +# App +APP_NAME=BeanFlows +SECRET_KEY=change-me-generate-a-real-secret +BASE_URL=http://localhost:5001 +DEBUG=true +ADMIN_EMAILS=admin@beanflows.coffee + +# Database +DATABASE_PATH=data/app.db +# DUCKDB_PATH points to the full pipeline DB (lakehouse.duckdb) — used by SQLMesh and export_serving. +# SERVING_DUCKDB_PATH points to the serving-only export (analytics.duckdb) — used by the web app. +# Run `uv run materia pipeline run export_serving` after each SQLMesh transform to populate it. +DUCKDB_PATH=local.duckdb +SERVING_DUCKDB_PATH=analytics.duckdb + +# Auth +MAGIC_LINK_EXPIRY_MINUTES=15 +SESSION_LIFETIME_DAYS=30 + +# Email (Resend) +RESEND_API_KEY= +EMAIL_FROM=hello@example.com + + +# Paddle +PADDLE_API_KEY= +PADDLE_WEBHOOK_SECRET= +PADDLE_PRICE_STARTER= +PADDLE_PRICE_PRO= + + +# Rate limiting +RATE_LIMIT_REQUESTS=100 +RATE_LIMIT_WINDOW=60 + +# Waitlist (set to true to enable waitlist gate on /auth/signup) +WAITLIST_MODE=false +RESEND_AUDIENCE_WAITLIST= diff --git a/.gitignore b/.gitignore index 7ad3159..f2a556f 100644 --- a/.gitignore +++ b/.gitignore @@ -189,3 +189,6 @@ age-key.txt .bedrock-state .bedrockapikey toggle-bedrock.sh + +# Tailwind CSS (generated at build time) +web/src/beanflows/static/css/output.css diff --git a/web/src/beanflows/core.py b/web/src/beanflows/core.py index c404a88..c1ca8b2 100644 --- a/web/src/beanflows/core.py +++ b/web/src/beanflows/core.py @@ -31,6 +31,13 @@ load_dotenv(_repo_root / "web" / ".env", override=False) class Config: APP_NAME: str = os.getenv("APP_NAME", "BeanFlows") SECRET_KEY: str = os.getenv("SECRET_KEY", "change-me-in-production") + + # Feature flags (set at template time via copier; mirror copier.yml questions) + ENABLE_CMS: bool = True + ENABLE_DAAS: bool = True + ENABLE_DIRECTORY: bool = False + ENABLE_LEADS: bool = False + BUSINESS_MODEL: str = "saas" BASE_URL: str = os.getenv("BASE_URL", "http://localhost:5001") DEBUG: bool = os.getenv("DEBUG", "false").lower() == "true"