Skip to content
optivemPublic

About

Electrician site-to-office demo: Serbian voice notes to German paperwork (invented data)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Electro

A phone-first demo web app for an invented electrical contractor ("Волтана д.о.о."): field reports, hours and billing, measurements, defects and worker papers, in Serbian Cyrillic and German. AI suggests, a person decides. All data is invented.

Part of Optivem demos. This repo follows the demo-app standard.

Develop

npm install
npm run dev          # dev server
npm run check:i18n   # translations and module registry only
npm run build        # i18n check, type-check and build to dist/
npm test             # Playwright smoke test (first time: npx playwright install chromium)

Set language and theme with a query string, for example /?lang=de&theme=dark.

How it is built

  • src/screens/<slug>/: one folder per module (index.tsx, data.ts, logic.ts, style.css, i18n/{sr,de}.json), discovered as the route /<slug>.
  • src/registry/modules.ts: the modules by area (Терен, Канцеларија, Планирање); sidebar and home follow it.
  • src/module-template/: shared building blocks (page header, steps, KPI tiles, card-on-phone tables, AI suggestion queue with confidence, decisions and audit log, validation messages).
  • src/mocks/: Mock Service Worker answers /api/<slug> in the browser; decisions persist in localStorage.
  • Tailwind 4, Radix and shadcn-style src/components/ui/; theme tokens --t-* in src/styles/theme.css (light and dark).

Details: docs/components.md and docs/demo-constraints.md.

Deploy

Cloudflare Pages: build command npm run build, output directory dist. public/_redirects sends every path to index.html for client-side routing, and public/mockServiceWorker.js is served as a static file so the mock API works on the live site.

About

Electrician site-to-office demo: Serbian voice notes to German paperwork (invented data)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages