Skip to content

Repository files navigation

Operator quiz template

Starter for a short humanitarian-role quiz: seven field scenarios, one of five roles, lead capture, QR source tags, and a CSV export.

This is a template, not a production site. Swap logos, copy, privacy text, and database settings before you publish anything. Scene and role images are colour placeholders.

Made by The Good AI Lab.

Stack

  • Vite + React frontend
  • Express (app.cjs) serving the built app and /api/*
  • MySQL / MariaDB for leads (schema.sql)

Local run

cp .env.example .env
npm install
npm run db:local   # Homebrew MySQL: creates quiz_template (user quiz / password quiz)
npm run dev

Open http://localhost:8080

CSV export is behind HTTP Basic auth (EXPORT_USER / EXPORT_PASSWORD in .env). The QR helper lives at /admin/qr.

Customise

  • Branding: src/pages/Landing.tsx, src/pages/Quiz.tsx, src/assets/
  • Roles and stories: src/lib/quiz/roles.ts
  • Questions: src/lib/quiz/questions.ts
  • Privacy copy: src/components/quiz/ConsentModal.tsx
  • Lead capture: app.cjs, schema.sql

License

MIT

About

Template for a humanitarian operator-role quiz (Vite + Express + MySQL).

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages