This repo is a monorepo that hosts multiple Nexus AI codebases while keeping Railway deployments stable.
apps/web: the app Railway should deploy (Vite/React)apps/pearson_nexus_ai_new: imported codebase kept side-by-sideapps/legacy-project: older server bits kept for referencepackages/*: future shared packages
From repo root:
npm install
npm run devDeploys are pinned to apps/web via:
- Root
Dockerfile: buildsapps/weband runs the Express server (/api/*) + servesdist/ railway.toml: forcesDOCKERFILEbuilder and only triggers deploys whenapps/web/**(or Docker/workspace files) change
Canonical names:
VITE_SUPABASE_URL
VITE_SUPABASE_ANON_KEYCopy apps/web/.env.example to apps/web/.env and fill in your values.
If you use Supabase OAuth providers, also set redirect URLs in Supabase Dashboard:
- Site URL:
https://YOUR-RAILWAY-DOMAIN - Additional Redirect URLs:
https://YOUR-RAILWAY-DOMAIN/**
The app includes a mobile-first capture screen at /m:
- Installable PWA (Add to Home Screen)
- Works offline after first visit (service worker caches the app shell + Vite assets)
- Offline queue stored in IndexedDB
- Manual Sync button (desktop + mobile)
POST /api/sync can be gated by a shared secret:
- Set Railway → Variables →
SYNC_SHARED_SECRETto a strong random value - On each device, paste that same value into:
- Desktop: Admin → Integrations → Offline Sync
- Mobile:
/m→ Sync Settings
Notes:
- This is a prototype auth mechanism (shared secret). Use Supabase/Auth for per-user auth later.
- If
SYNC_SHARED_SECRETis not set,/api/syncaccepts requests without auth (dev-friendly).