Emergency guide · Keep this findable

If something breaks, start here

One page that tells the next person where the Med&X portal lives, how to tell if it's healthy, what to do when it isn't, and how to get the data back. No prior knowledge assumed.

01

Where everything runs

The whole system is four moving parts. Two servers (the portals), one database, one code home. All free-tier or low-cost, all reachable from a browser.

Member portal
medx-user-portal.onrender.com — the app members log into. Runs on Render (service medx-user-portal, Node, free plan).
Admin portal
The team's control room. Runs on Render (service medx-admin-portal, Node, free plan). This handbook is served from it.
Database
Turso — cloud SQLite that holds every registration, member, and payment. Both portals share it in production via TURSO_DATABASE_URL.
Marketing website
Netlifymedx-website-preview.netlify.app. The public site, separate from the portals.
Code
GitHubgithub.com/alen-ops99/medx-portal (branch main). Pushing to main auto-deploys both Render services.
Payments
Stripe (card payments) and FIRAapp.fira.finance (Croatian invoicing). Keys live in Render's environment settings, not in the code.
Secrets live in
Render dashboard → each service → Environment. Stripe, FIRA, Turso, Resend (email), Publer, and VAPID keys are all set there. Never in GitHub.
Plain version: GitHub is the recipe, Render cooks it into two live websites, Turso is the fridge that stores everything, Netlify is the public storefront.
02

Check that it's up

Two-minute health check, no login needed.

  1. Open the member portal in a browser. If the login screen loads, the app is up. (First hit after a quiet spell can take ~30s — that's the free-tier waking up, not a fault.)
  2. Add /health to a portal address in the browser bar. A page that says OK / healthy means the server and database are talking. An error means the server is down or can't reach Turso.
  3. Sign into the admin portal → System Health for the fuller picture — database, email, payments, and recent errors in one screen.
  4. Open the Render dashboard — a green "Live" badge on each service is the source of truth. Red or "Deploy failed" tells you where to look.
03

If the portal is down

Work top to bottom. Stop as soon as it's back.

  1. Wait 30 seconds and reload. The free tier sleeps after 15 minutes idle, and the first visitor wakes it. This is the single most common "outage" and it's not one.
  2. Check Render. If the service is "Live" but slow, it's just waking. If it says Deploy failed, a recent code change broke the boot.
  3. Read the logs. In Render, open the service → Logs. The error at the bottom usually names the problem (a missing key, a database it can't reach).
  4. Roll back if a deploy caused it. In Render → the service → Events / Manual Deploy, choose Rollback to the last version that was Live. The portal comes back on the previous working code.
  5. Restart if it's stuck. Render → the service → Manual Deploy → Clear build cache & deploy, or use Restart. Boots that crash on /health auto-roll-back, so a restart is safe.
  6. Still down? Check Turso (section 05) is reachable, then contact Alen (section 06) with a screenshot of the Render log.
Don't push new code to fix a live outage under pressure — rollback first, calm the fire, then fix properly. A push to main redeploys both portals.
Safety net: Render only sends traffic to a new version once /health returns OK. A broken deploy keeps the old, working version live automatically.
04

Who has access

Keep this list current — it's how a new person knows who to ask for a login.

Render, Netlify, Turso, GitHub
Alen Juginovic — owner of the hosting + code accounts. First call for infrastructure.
Admin portal (Full admin)
Alen, plus anyone granted Full admin in Team Access. Full admins can add or revoke others.
Admin portal (Scanner staff)
Event volunteers — check-in tools + System Health only. Added and removed in Team Access.
Payments — Stripe
Med&X Stripe account (Alen). Refunds and payment history live in the Stripe dashboard.
Invoicing — FIRA
app.fira.finance — Med&X account. Holds the secret key used for Croatian invoices.
One person, one login. To give someone access, use Team Access in the admin portal (see the Handbook, task 10) — never share a password. When someone leaves, Revoke them the same day.
05

Backups & restore

All the real data (registrations, members, payments) lives in the Turso database. Backing it up means saving a copy of that database. Restoring means loading a copy back. You do this from a terminal with the Turso CLI.

First-time setup (once per computer):

# Install the Turso CLI, then log in
curl -sSfL https://get.tur.so/install.sh | bash
turso auth login

Make a backup (do this before anything risky):

# List databases to confirm the name
turso db list

# Dump the live database to a timestamped file on your machine
turso db shell <database-name> .dump > medx-backup-$(date +%Y%m%d).sql

Restore from a backup (only if data was lost):

# SAFEST: create a NEW database from the dump and verify it first
turso db create medx-restore-test
turso db shell medx-restore-test < medx-backup-20260704.sql

# Check the restored copy looks right, THEN point the portals at it
# by updating TURSO_DATABASE_URL in Render for both services.
Never overwrite the live database directly to "fix" it. Always restore into a new database, confirm it's correct, then switch the portals over in Render. If in doubt, back up first and call Alen before restoring.
Turso keeps its own point-in-time history on the dashboard — you can often recover a recent state there without a manual dump. Check app.turso.tech first.
06

Support contacts

Owner / first call
Alen Juginovic, MDjuginovic.alen@gmail.com. Everything infrastructure, payments, and access.
Med&X leadership
Miro Vukovic, MD — vp@medx.hr · Pjero Bacic, MD — pjero.bacic@medx.hr
Hosting — Render
render.com/docs · support via the Render dashboard.
Database — Turso
Website — Netlify
app.netlify.com · support via the Netlify dashboard.
Payments
Stripe — dashboard.stripe.com · FIRA — app.fira.finance