Ayush Synapse reads all configuration from environment variables, which are loaded by python-dotenv from aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/sagar-grv/ayush-synapse/llms.txt
Use this file to discover all available pages before exploring further.
.env file in the project root if one is present. No code changes are needed to switch between development and production modes — every behaviour is controlled by the variables described below.
To get started, copy the provided example file:
.env to match your environment before starting the server.
Environment Variable Reference
Secret key used to sign and verify JSON Web Tokens. In production this must be a long, randomly generated string.Default (demo only):
namaste-icd11-mvp-demo-secret-key-2025Generate a strong value with:Enables Flask debug mode, which activates the interactive debugger and auto-reloader. Never enable in production — the debugger exposes an interactive Python console.Default:
FalseThe network interface the Flask development server binds to.
0.0.0.0 listens on all interfaces (required for Docker). Use 127.0.0.1 to restrict to localhost only.Default: 0.0.0.0The TCP port the Flask server listens on.Default:
5000Comma-separated list of allowed CORS origins sent in
Access-Control-Allow-Origin response headers. Use * only for local development; set explicit origins in production.Default: *Example (production): https://app.example.com,https://admin.example.comWhen
True, the application runs in MVP demo mode: seed data is loaded, all features are unlocked, and demo tokens are accepted without a real user database.Default: TrueWhen
True, demo users can access all protected endpoints using a token obtained from POST /auth/login without any additional provisioning. Set to false to require real user accounts.Default: TrueSQLAlchemy connection string for the application database. Defaults to a local SQLite file suitable for development and single-instance Docker deployments. Switch to PostgreSQL for production.Default:
sqlite:///ayush_synapse.dbPostgreSQL format: postgresql://user:password@host:5432/ayush_synapsePython logging level. Accepted values:
DEBUG, INFO, WARNING, ERROR, CRITICAL.Default: INFOPath to the log file. Relative paths are resolved from the project root. Set to an empty string or omit to log to stdout only.Default:
app.logBackend used by Flask-Limiter to store rate-limit counters.
memory:// is process-local and lost on restart; use a Redis URL (redis://host:6379/0) for multi-process or multi-container deployments.Default: memory://Production Checklist
Generate a Strong JWT_SECRET_KEY
Replace the demo key with a cryptographically random secret. Treat it like a database password — store it in a secrets manager or CI/CD secret store, never in source control.Add the output to your
.env or inject it as an environment variable in your deployment platform:Point DATABASE_URL at PostgreSQL
SQLite is single-writer and file-based — it cannot support concurrent connections from multiple workers or containers. Switch to PostgreSQL for any production workload:Ensure
psycopg2-binary (already in requirements.txt) is available in your runtime environment.Restrict CORS_ORIGINS
Replace the wildcard with a comma-separated allowlist of the exact origins your front-end is served from:
Disable Flask Debug Mode
Confirm
FLASK_DEBUG is explicitly set to False. This prevents the Werkzeug interactive debugger from being accessible over the network: