This is a tiny Vite + React (TypeScript) app with a mock Express API so you can test camera/mic capture and chunked uploads locally on macOS with VS Code.
- Node 18+ (macOS):
node -v - VS Code (or any editor)
- Camera + Microphone permissions granted to your browser
cd lectra-capture-demo
npm install
npm run start:all- API: http://localhost:8787
- Web: http://localhost:5173 (proxy
/api→ API)
- The mock API stores chunks under your system temp dir and simply reports how many it got on finalize.
- The front-end avoids accessing
processat runtime; it uses layered fallbacks for API base resolution. - To run the tiny resolver tests in the browser console:
window.__LECTRA_RUN_TESTS__ = true location.reload()
- If the preview stays black on Safari, click once in the page to give a user gesture, then Start.
- If you run the API elsewhere, set a meta tag in index.html:
Or set
<meta name="lectra-api-base" content="https://api.your.app">
window.__LECTRA_API_BASE__in the console before the app mounts.