BaBel+‘s server reads all configuration exclusively from environment variables, loaded viaDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/DrDigett/Babel/llms.txt
Use this file to discover all available pages before exploring further.
dotenv in development and injected directly by the hosting platform (e.g., Render) in production. To get started locally, copy the example template to create your own env file:
.env.example
packages/server/.env.example covers the optional variables and placeholders for the required ones. Note that DATABASE_URL is not included in the example file — you must add it manually since it contains your database credentials.
.env.example (monorepo root) documents the client-side variable VITE_API_URL alongside GROQ_API_KEY and JWT_SECRET. See VITE_API_URL below for details.
Variables
Only
DATABASE_URL and GROQ_API_KEY are truly required. If either is missing, the server throws a descriptive error at startup and refuses to start — no silent failures.PostgreSQL connection string used by Drizzle ORM to connect to the database. If absent, the server throws:For a free cloud database, see Render PostgreSQL or Neon.
API key for the Groq inference service, used to power AI node classification. If absent, the server throws:Obtain a key at https://console.groq.com.
The port on which the Hono HTTP server listens. Change this if port 3000 is already in use on your machine or if your hosting provider assigns a specific port.
The allowed CORS origin returned in
Access-Control-Allow-Origin headers. The wildcard default * is convenient for development but should be narrowed to your frontend URL in production.Secret used for signing JWT tokens. Authentication is not yet implemented in the current version of BaBel+, but this secret will be used once auth is added. The default value is intentionally insecure and must be replaced in production.
Controls the server’s runtime mode. When set to
production, the Hono server serves the pre-built React SPA from packages/client/dist as static assets. In development, Vite handles the frontend on its own dev server and proxies /api/* requests to the Hono server on port 3000.Legacy path for SQLite storage from an earlier version of BaBel+. This variable is read by
config.ts but is unused in the current PostgreSQL implementation. You can safely omit it.Client-side only — not read by the server. Set in the monorepo root
.env or the client package to tell the Vite dev server where to proxy API requests. Defaults to http://localhost:3000 in local development. In a production Render deployment where the frontend and API share the same domain this variable is not needed.Development vs Production
Development
In development, the monorepo runs two processes side by side: the Hono API server and the Vite dev server for the React client.Create your env file
Copy
packages/server/.env.example to packages/server/.env and fill in DATABASE_URL and GROQ_API_KEY.Start both servers
From the monorepo root, run:This uses
concurrently to start @babel-plus/server (Hono on port 3000) and @babel-plus/client (Vite on its default port 5173) simultaneously.Production
In production, the server process handles both the API and static file serving for the React SPA.Set production variables
Ensure
NODE_ENV=production, a strong JWT_SECRET, and a production CORS_ORIGIN are set in your environment. On Render, these are configured in the service’s Environment tab — no .env file is needed.Build all packages
tsc for the server and Vite’s production build for the client, writing the compiled SPA to packages/client/dist.