Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/tutosrive/factus_challenge/llms.txt

Use this file to discover all available pages before exploring further.

The reference deployment for Factus Challenge uses three cloud services working together: Koyeb hosts the Node.js + Express backend (bc-v1/), Render serves the static vanilla-JS frontend (fr-v1/), and Azure Database for PostgreSQL provides the persistent data store. Each service is independent — you can swap any one of them for an alternative without changing the others, as long as the environment variables and the backend URL in fr-v1/resources/assets/config.json are updated accordingly.
Koyeb is a serverless platform for containerised and Git-based workloads. It offers zero-cold-start Node.js hosting, automatic HTTPS, and a first-class environment variable panel — making it a good fit for a long-running Express server that must hold an OAuth token in memory between requests.
1

Create a new Koyeb service

In the Koyeb dashboard, choose Create Service → Web Service and connect your GitHub repository. When prompted for the source directory, set it to bc-v1/.
2

Configure build and run commands

SettingValue
Build commandnpm install
Run commandnpm start
npm start executes node ./src/main.js as defined in bc-v1/package.json.
3

Add environment variables

In the Environment Variables section of the Koyeb service settings, add every variable listed in the Environment reference. The minimum required set is:
url_api
client_id
client_secret
email
password
DB_USER
DB_HOST
DB_NAME
DB_PASSWORD
DB_SSL
Mark client_secret, password, and DB_PASSWORD as secret so Koyeb masks them in the dashboard.
4

Deploy

Click Deploy. Koyeb builds the service, installs dependencies with npm install, and starts the Express server. Once the health check passes you will see a public HTTPS URL in the format https://your-service-name.koyeb.app. Save this URL — you need it when configuring the frontend.
Koyeb runs production workloads as plain node processes, not via node --env-file .env. Do not rely on a .env file in production — use Koyeb’s built-in environment variable panel exclusively. The --env-file flag is only used by the dev, test, fact, and token npm scripts for local development.

Alternative Hosting Options

The three services above are the reference deployment, but the application has no hard dependency on any of them. Any hosting that can run Node.js 22 and expose environment variables will work.
LayerReferenceAlternatives
BackendKoyebRailway, Fly.io, Heroku, any VPS with Node.js 22+
FrontendRender (Static Site)Vercel, Netlify, GitHub Pages, Cloudflare Pages
DatabaseAzure Database for PostgreSQLSupabase, Neon, Railway PostgreSQL, self-hosted
For local development, spin up a PostgreSQL instance with Docker so you don’t need a cloud database at all:
docker run \
  --name factus-pg \
  -e POSTGRES_PASSWORD=yourpass \
  -e POSTGRES_USER=youruser \
  -e POSTGRES_DB=factus \
  -p 5432:5432 \
  postgres:16
Then set DB_HOST=localhost, DB_SSL=false (or omit DB_SSL) in your local .env file and start the backend with npm run dev.

Build docs developers (and LLMs) love