Environment Variables¶
Set environment variables before running the build or start scripts. The webapp
loads variables from packages/webapp/.env via Vite’s import.meta.env and
respects system environment variables. The server reads directly from
process.env.
Web application¶
APPLICATION_SERVER_VERSIONBoolean flag exposed to the UI. When truthy the application surfaces server backed features such as diagram sharing and collaboration. Defaults to
truein the Vite config if not provided.DEPLOYMENT_URLBase URL used to derive API endpoints (
BASE_URL) and WebSocket URLs. Required when hosting behind a reverse proxy. Defaults toundefinedin development which makes the webapp rely on relative URLs.BACKEND_URLHTTP endpoint exposed by the BESSER backend that serves code generation. Defaults to
http://localhost:9000/besser_apiwhenNODE_ENVisdevelopment; otherwise the UI expects this variable to be set explicitly.SENTRY_DSNOptional DSN for Sentry browser monitoring.
POSTHOG_HOST/POSTHOG_KEYOptional analytics configuration for PostHog. Leave unset to disable tracking.
UML_BOT_WS_URLWebSocket endpoint used by the UML agent widget. Defaults to
ws://localhost:8765in development or<WS_PROTOCOL>://<DEPLOYMENT_HOST>otherwise.
Server¶
DEPLOYMENT_URLUsed to rewrite absolute URLs inside the compiled webapp and to give Sentry a meaningful environment tag.
SENTRY_DSNOptional DSN for server-side error reporting.
APOLLON_REDIS_URLWhen set, enables Redis-based storage for shared diagrams instead of the filesystem. Should be a standard Redis connection string (
redis://user:pass@host:port).APOLLON_REDIS_DIAGRAM_TTLOptional TTL (parsed with the
mspackage, e.g.30d) applied to stored diagrams when using Redis.APOLLON_REDIS_MIGRATE_FROM_FILEIf defined, migrates diagrams from file storage into Redis during start-up. Set to any truthy value to enable the migration.
Common¶
NODE_ENVDrives Vite’s development vs production configuration and influences the default
BACKEND_URLand WebSocket URL selection.
Set variables inline when running scripts, e.g.:
DEPLOYMENT_URL=https://editor.example.com \
BACKEND_URL=https://api.example.com/besser_api \
npm run build
Or create packages/webapp/.env for development:
DEPLOYMENT_URL=http://localhost:8080
BACKEND_URL=http://localhost:9000/besser_api