BaBel+ ships with aDocumentation 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.
render.yaml Blueprint that provisions a Node.js web service and a managed PostgreSQL database on Render’s free tier in a single click. No manual service wiring is required — Render reads the Blueprint, creates both resources, and automatically injects the database connection string into the web service’s environment.
render.yaml
The Blueprint file at the repository root defines the full infrastructure:render.yaml
| Block | Purpose |
|---|---|
services[0] | The babel-plus-api Node.js web service that runs the Hono server and serves the compiled React SPA as static files in production. |
buildCommand | Installs all dependencies (including devDependencies for TypeScript compilation) then runs npm run build to compile both the server and client packages. |
startCommand | Runs npm start, which calls tsx src/index.ts in the server package — applying migrations and seeding before the HTTP server begins listening. |
healthCheckPath | Render polls GET /api/health to determine service health. The endpoint returns {"status":"ok"}. |
DATABASE_URL | Automatically populated from the babel-plus-db managed database’s connection string — no manual copy-pasting required. |
JWT_SECRET | Auto-generated by Render on first deploy, ensuring a unique secret per deployment. |
GROQ_API_KEY | Set to placeholder in the Blueprint; you must replace this with your real key before the AI endpoints will function (see Step 4 below). |
databases[0] | Provisions a free-tier Render PostgreSQL instance named babel-plus-db with a database called babel. |
Deploy steps
Fork or push the repository to your GitHub account
Render Blueprints require access to a GitHub (or GitLab) repository. Fork https://github.com/DrDigett/Babel to your account, or push a local clone to a new repository you control.
Create a new Blueprint on Render
In the Render dashboard, click New → Blueprint and connect your GitHub account if you haven’t already. Select the forked or pushed BaBel+ repository from the list.
Render provisions the services automatically
Render reads
render.yaml from the repository root and creates two resources in parallel:- babel-plus-api — the Node.js web service.
- babel-plus-db — the managed PostgreSQL database.
DATABASE_URL is wired between them automatically via the fromDatabase reference; you do not need to copy the connection string manually.Add your Groq API key
The Blueprint sets
GROQ_API_KEY to placeholder as a safe default. Before triggering a deploy, update this value:- Open the babel-plus-api service in the Render dashboard.
- Navigate to Environment → Environment Variables.
- Find
GROQ_API_KEYand replaceplaceholderwith your real key (starts withgsk_). - Save the changes.
Trigger a deploy
Click Manual Deploy → Deploy latest commit (or push a new commit to trigger an automatic deploy). Render will run the build command:This compiles both the server TypeScript and the Vite client bundle. Build output for the SPA lands in
packages/client/dist.First-start bootstrap
On the first start, the Hono server’s
bootstrap() function runs automatically and:- Runs migrations — creates the
nodes,relations,lists, andlist_nodestables via raw SQL (CREATE TABLE IF NOT EXISTS). - Seeds the database — if the
nodestable is empty, inserts ~20 philosophy and film nodes with pre-built relations. - Starts the HTTP server — binds to
0.0.0.0on the configured port and begins serving the React SPA frompackages/client/dist(becauseNODE_ENV=production).
GET /api/health returns {"status":"ok"}, Render marks the service as live and your BaBel+ instance is publicly accessible.Health check
The Hono server exposes a lightweight health endpoint that Render polls continuously:healthCheckPath: /api/health to decide whether to route traffic to a newly deployed instance and to detect crashes in running instances.
Manual / self-hosted deployment
You can run BaBel+ on any machine with Node.js ≥ 18 and access to a PostgreSQL database, without Render.Set environment variables
Export the required variables in your shell or create a
packages/server/.env file:Build all packages
From the monorepo root, compile the server TypeScript and bundle the React client:This runs
tsc for the server and vite build for the client. The client bundle is emitted to packages/client/dist.npm start under PM2 or as a systemd service so the process restarts automatically on crash or reboot.