Architecture Overview
GPUForge · Stack, Deployment, Config · v1
◉ Architecture ◉ Overview

Architecture Overview

Technical stack, deployment model, environment configuration, and runtime behavior.

Tech Stack

Runtime

ComponentTechnologyNotes
RuntimeNode.js 18Single-process Express app
Web FrameworkExpress 4
DatabasePostgreSQL (Neon — serverless)Connection via DATABASE_URL
HostingRenderWeb service, ephemeral filesystem
Migrationsnode-pg-migrateRun on deploy via npm run migrate

Frontend

ComponentTechnology
MarkupVanilla HTML/CSS
TypographySpace Grotesk, JetBrains Mono, DM Sans
AnalyticsGA4 (client-side), Polsia beacon
TrackingMeta Pixel (Facebook)

Build & Deploy

FilePurpose
render.yamlRender service definition — start command, env vars, health check
DockerfileContainer image (used for local dev)
migrate.jsRuns on each deploy: npm run migrate && npm start
polsia.tomlCron schedules (Blaxel-compatible)

Deployment

Startup Sequence

  1. npm run migrate — runs all pending node-pg-migrate migrations in migrations/
  2. npm startserver.js — middleware setup, route mounts, API key seed
  3. If POLSIA_IN_PROCESS_CRONS_ENABLED === 'true' → scheduler daemon starts (30s polling)
  4. app.listen(port) — Render health check ready

Scheduler Daemon (Blaxel Migration Notes)

The in-process scheduler runs via setInterval(runSchedulerCycle, 30000). It is guarded by POLSIA_IN_PROCESS_CRONS_ENABLED === 'true'. On Blaxel shadow, that env is false — Blaxel handles scheduling via polsia.toml [[crons]].

See jobs/scheduler-cycle.js for the standalone cron runner (used by Blaxel).

Health Check

Render health probe at /health — returns { "status": "ok" } with no auth required. The /api/health path also returns healthy — kept for backwards compatibility.

Environment Variables

Required

VariableDescription
DATABASE_URLNeon PostgreSQL connection string. Required — server exits if missing.
PORTListen port (default: 3000)

Optional

VariableDefaultDescription
POLSIA_IN_PROCESS_CRONS_ENABLEDfalseEnable in-process scheduler on Render. Blaxel shadow sets this to false.
POLSIA_ANALYTICS_SLUG""Polsia analytics slug for beacon pixel on landing page.
GOOGLE_ANALYTICS_IDG-GPUFORGEPLACEHOLDERGA4 measurement ID.

Port Reference

PathAuthDescription
/healthNoneRender health probe
/api/healthNoneBackwards-compatible health check
/NoneLanding page
/loginNoneLogin page
/dashboardNone (client-gated)Operator dashboard
/docsNoneAPI Reference
/docs/hubNoneDocumentation hub
/docs/hldNoneHigh-Level Design
/docs/lldNoneLow-Level Design
/docs/architectureNoneArchitecture overview (this page)
/pitchNoneDownloadable pitch deck
/adminNone (client-gated)Admin dashboard
/api/*Bearer tokenAll API endpoints (demo mode if no auth)