Lantern โ Scaffold Notes โ
This file describes the current scaffold and how to work with it.
Web scaffold โ
- Vite + React
- PWA enabled via
vite-plugin-pwa(configured invite.config.mjs) - Tailwind CSS configured (
tailwind.config.cjs,postcss.config.cjs,src/tailwind.css) - Storybook for component development (
npm run storybook) - Vitest + Testing Library for unit tests (
vitest.config.js,test.setup.js)
Key files โ
- Root:
package.json,index.html,.gitignore - App shell & routing:
src/main.jsx,src/App.jsx(hash-based routes) - Merchants:
src/screens/merchant/MerchantDashboard.jsx,src/screens/merchant/OfferForm.jsx - Firebase setup:
src/firebase.js - Shared helpers:
src/lib/(auth/profile services, encryption, device helpers) - PWA:
public/manifest.webmanifest,public/icons/*,vite.config.mjs - Tests:
vitest.config.js,test.setup.js,src/__tests__/ - Storybook docs:
docs/storybook/*
Commands โ
npm installโ install dependenciesnpm run devโ run dev server (Vite)npm run buildโ production buildnpm run previewโ preview built site (best for PWA testing)npm run storybookโ run Storybook on http://localhost:6006npm testโ run unit tests (Vitest)npm run lintโ lintsrcnpm run lint:fixโ autofix lint issuesnpm run formatโ format source filesnpm run format:checkโ check formatting onlynpm run test:coverageโ run tests with coverage
Mobile (next) โ
- Recommended: Initialize an Expo project in
/mobile/withnpx create-expo-app mobile. - Share UI logic where possible; consider monorepo structure later.
PWA (web) โ
- Installable behavior on supported browsers; service worker generated at build time.
- See
./PWA.mdfor local testing instructions.
Suggested backend approaches โ
- Realtime: Firebase or Supabase for quick prototypes
- Custom backend: Node.js + Express + WebSocket (or Socket.IO)