Skip to main content

Configuration Reference

Complete reference for the Hydra-based configuration system in Syntropy Journals.

Overview

Configuration is managed via Hydra with 13 YAML groups composed by a root default.yaml. Each group can have a typed Python schema (dataclass) for type-safe access. Values support environment variable overrides via OmegaConf interpolation (${oc.env:VAR_NAME,default}). Config root: syntropy_journals/app/config/ Schema root: syntropy_journals/app/config/schemas/ Access pattern: from syntropy_journals.app.hydra_config import get_app_config, get_llm_config, ...

Composition Order

Groups are loaded in this order (later overrides earlier):
#GroupSchemaDescription
1appschemas/app.pyApp identity, database, auth, features, notifications
2contentschemas/content.pyBranding, landing page, chat copy, navigation, SEO
3legalvia schemas/content.pyPrivacy Policy and Terms of Service full text
4llmschemas/llm.pyLLM providers, agent config, vector DB, memory
5uischemas/ui.pyColors, typography, component CSS classes
6headschemas/head.pyMeta tags, analytics, favicons, external scripts
7catalog(none)Product catalog display, categories, pricing
8users(none)User types, seed users, default settings
9subscription(none)Plans (Free/Hobby/Pro), billing, payment config
10adminschemas/admin.pyAdmin panel config, permissions, table names
11integrations(none)HubSpot, Ghost, Stripe, PostHog, Bland.ai, MCP, CDN
12diet(none)Diet scoring weights, model config, thresholds
13demo(none)Demo/seed data config (NOT auto-composed)

Environment Variable Quick Reference

All env vars that override config values, grouped by concern.

App Identity

Env VarConfig PathDefaultDescription
APP_ENVapp.environmentDEVRuntime environment (DEV/test/prod)
REFLEX_DEPLOY_URLapp.deploy_urlhttp://localhost:3000Public frontend URL
REFLEX_API_URLapp.api_urlhttp://0.0.0.0:8000Backend API URL
LOG_LEVELapp.log_levelDEBUGPython log level
GTM_ONLYapp.gtm_only_modefalseGTM-only landing page mode

Database

Env VarConfig PathDefaultDescription
REFLEX_DB_URLapp.database.urlsqlite:///app.dbPostgreSQL connection URL
DB_USERNAMEapp.database.usernamepostgresDB username
DB_PASSWORDapp.database.password""DB password
AUTO_MIGRATEapp.database.auto_migratetrueRun Alembic on startup

Authentication (Clerk)

Env VarConfig PathDefaultDescription
CLERK_PUBLISHABLE_KEYapp.auth.clerk.publishable_key""Clerk frontend key
CLERK_SECRET_KEYapp.auth.clerk.secret_key""Clerk backend key
CLERK_AUTHORIZED_DOMAINSapp.auth.clerk.authorized_domainslocalhost:3000,*Allowed sign-in domains
MOCK_LOGINapp.auth.clerk.mock_loginfalseDev-only mock auth bypass

LLM & AI

Env VarConfig PathDefaultDescription
OPENAI_API_KEYllm.openai_api_key""OpenAI API key
OPENROUTER_API_KEYllm.openrouter_api_key""OpenRouter API key
CEREBRAS_API_KEYllm.cerebras_api_key""Cerebras API key
LLM_PROVIDERllm.provideropenrouterPrimary LLM provider
LLM_MODELllm.modelnvidia/nemotron-3-nano-30b-a3b:freePrimary LLM model
LLM_MAX_TOKENSllm.max_token_limit8192Max context tokens
LLM_TEMPERATUREllm.temperature0.7Sampling temperature
MOCK_LLMllm.mock_llmfalseUse mock LLM responses
MOCK_TRANSCRIPTIONllm.mock_transcriptionfalseMock voice transcription

Vector Database

Env VarConfig PathDefaultDescription
MILVUS_URIllm.vector_db.uri""Milvus/Zilliz connection URI
MILVUS_API_KEYllm.vector_db.api_key""Milvus/Zilliz API key
VECTOR_DB_TYPEllm.vector_db.typemilvusVector DB provider
EMBEDDING_MODELllm.vector_db.embedding_modeltext-embedding-ada-002Embedding model

Memory (Graphiti / Neo4j)

Env VarConfig PathDefaultDescription
GRAPHITI_API_URLllm.memory.long_term.api_url""Graphiti REST API URL
NEO4J_URIllm.memory.long_term.neo4j_uri""Neo4j connection URI
NEO4J_USERllm.memory.long_term.neo4j_userneo4jNeo4j username
NEO4J_PASSWORD(referenced by name)Neo4j password
GRAPHITI_GROUP_IDllm.memory.long_term.group_id""Graphiti tenant group
GRAPHITI_TIMEOUTllm.memory.long_term.timeout_seconds10HTTP timeout

Integrations

Env VarConfig PathDefaultDescription
HUBSPOT_API_KEYintegrations.hubspot.api_key""HubSpot API key
GHOST_API_URLintegrations.ghost.api_url""Ghost CMS API URL
GHOST_CONTENT_API_KEYintegrations.ghost.content_api_key""Ghost content key
POSTHOG_PROJECT_API_KEYintegrations.posthog.api_key""PostHog project key
POSTHOG_HOSTintegrations.posthog.hosthttps://us.i.posthog.comPostHog ingest host
POSTHOG_ENABLEDintegrations.posthog.enabledtrueEnable PostHog
CALL_LOGS_BASE_URLintegrations.call_logs.api_urlBland.ai URLCall logs endpoint
CALL_LOGS_API_KEYintegrations.call_logs.api_token""Bland.ai API token
ASSETS_CDN_BASE_URLintegrations.assets.cdn_base_url""CDN base URL
MCP_SERVER_URLintegrations.mcp.server_urlProduction URLMCP server base URL

Diet Engine

Env VarConfig PathDefaultDescription
DIET_ENABLEDapp.diet.enabledfalseEnable DIET pipeline
DIET_USE_REAL_LLMapp.diet.pipeline.use_real_llmtrueReal vs mock LLM for DIET
DIET_LLM_MODELapp.diet.llm.modeldeepseek/deepseek-chat-v3-0324:freeDIET pipeline LLM model
DIET_LLM_PROVIDERapp.diet.llm.provideropenrouterDIET pipeline LLM provider
DIET_MODEL_PROVIDERdiet.model.providercerebrasDiet scoring LLM provider
DIET_MODELdiet.model.modelqwen-3-235b-a22b-instruct-2507Diet scoring LLM model
DIET_LOOKBACK_DAYSdiet.scoring.lookback_days30Scoring history window

Feature Flags

Env VarConfig PathDefaultDescription
PARTNER_PORTAL_ENABLEDapp.features.partner_portaltruePartner portal feature
ASK_THE_SHRINE_ENABLEDapp.features.ask_the_shrinetrueLanding chat feature

Testing

Env VarConfig PathDefaultDescription
TEST_CLERK_USER_IDapp.testing.test_clerk_user_iduser_test_001Test user ID
TEST_SESSION_IDapp.testing.test_session_idUUID stringTest session ID

Group Details

app — Application Identity & Core

File: config/app/default.yaml | Schema: schemas/app.py Core application metadata, database connection, Clerk authentication, feature flags, notification config, catalog settings, voice line, and test fixtures. Key dataclasses: AppConfig, DatabaseConfig, AuthConfig, ClerkConfig, SessionConfig Access: get_app_config() returns the full app group.

content — Branding & Copy

File: config/content/default.yaml | Schema: schemas/content.py All user-facing text: branding (company name, taglines, product names), landing page content (hero, features, testimonials, stats, preset questions), chat configuration (AI name, system prompt, welcome/error messages, document sources for RAG), navigation links, social profiles, legal contact info, and SEO defaults. Key dataclasses: ContentConfig, BrandingConfig, LandingConfig, ChatConfig, NavigationConfig, SocialConfig, LegalConfig, SEOConfig Access: get_content_config(), get_branding_config(), get_chat_config() File: config/legal/default.yaml | Schema: via schemas/content.py Full legal document text stored as structured YAML. Privacy Policy has 11 sections; Terms of Service has 14 named sections. Also contains consent link text and URLs. No env overrides — all content requires legal review before changes. Access: get_legal_config()

llm — AI Stack

File: config/llm/default.yaml | Schema: schemas/llm.py LLM provider config (OpenRouter, OpenAI, Cerebras), fallback chain (3 models tried in order), agent system prompt and tool capabilities (8 tools), vector DB settings (Milvus/Zilliz), memory config (short-term trimming, long-term Graphiti/Neo4j, conversation summarization, audit log), LangGraph checkpoint backend, and external routing (OpenClaw). Key dataclasses: LLMConfig, VectorDBConfig, AgentConfig, RouterConfig, MemoryConfig, CheckpointConfig Access: get_llm_config(), get_agent_config()

ui — Design Tokens

File: config/ui/default.yaml | Schema: schemas/ui.py Color palette (primary, secondary, neutral), gradients (brand, SMB, background), typography (font families, sizes, weights), and component CSS classes (buttons, cards, forms). No env overrides — design tokens are static. Access: get_ui_config(), get_theme_config()

head — HTML Head & Analytics

File: config/head/default.yaml | Schema: schemas/head.py Site verification tokens (Impact, Google, Facebook), meta tags (viewport, OG, Twitter), font preconnects, stylesheets, analytics (GA4 + GTM), inline scripts (Apollo.io tracker), and favicon config. Access: get_head_config()

catalog — Product Display

File: config/catalog/default.yaml | Schema: (none — raw DictConfig) Catalog UI settings: items per page, sort options, price range, category definitions, feature toggles (search, pagination, favorites), and empty/loading/error messages. Access: get_app_config().catalog (inline) or get_catalog_config()

users — User Types & Seed Data

File: config/users/default.yaml | Schema: (none) User type enums (GUEST, USER, ADMIN, SUPER_ADMIN), initial seed users (2 admins), and default user settings (avatar, subscription, theme, locale). Access: get_users_config()

subscription — Plans & Billing

File: config/subscription/default.yaml | Schema: (none) Three subscription plans (Free, Hobby 9.99,Pro9.99, Pro 29.99) with feature lists and limits (chat rounds, Shrine Energy, history days, API access). Default billing settings (trial period, grace period, auto-downgrade). Payment provider config (Stripe enabled, PayPal disabled). Access: get_subscription_config()

admin — Admin Panel

File: config/admin/default.yaml | Schema: schemas/admin.py Admin panel metadata, super-admin email list, DB table names, and seed config entry. Access: get_admin_config()

integrations — External Services

File: config/integrations/default.yaml | Schema: (none) Connection details and API keys for: HubSpot, Ghost CMS, Stripe, PostHog, Bland.ai (voice calls), MCP server (rate limits, allowed hosts/origins), and CDN assets. Access: get_integrations_config()

diet — Diet Scoring

File: config/diet/default.yaml | Schema: (none) Scoring weights (dietary 30%, consistency 25%, check-in 25%, device 20%), lookback window, trend calculation, LLM model for diet insights, and score thresholds (good >= 7, warning >= 4). Access: get_diet_config()

demo — Demo/Seed Data

File: config/demo/default.yaml | Schema: (none) Demo Clerk user ID for seed data. Not auto-composed — must be explicitly included.

Adding New Configuration

  1. Create config/<group>/default.yaml with your fields
  2. Add - <group> to config/default.yaml defaults list
  3. (Optional) Create schemas/<group>.py with a typed dataclass
  4. Add get_<group>_config() accessor to hydra_config.py
  5. Use env overrides: field: ${oc.env:MY_VAR,default_value}