Local development setup
From zero to a running dev server with seeded demo data.
1 min read Updated 5/28/2026developer
Prerequisites
- Node.js 20+ (LTS recommended)
- Git + a clone of the Restora 360 repo
- A modern browser (Chrome / Firefox / Safari)
- (Optional) a Stripe test account if you want to test real card flows
Install + seed
Shell
# Clone the repo
git clone https://github.com/ZHF-AB/restora.git
cd restora
# Install dependencies
npm install
# Seed demo data (recommended)
node scripts/seed-platform-owners.js
node scripts/seed-web-designers.js
node scripts/seed-sales-agents.js
node scripts/seed-bazar-test.js
node scripts/seed-multi-location.js
# Start the dev server
npm run devOpen http://localhost:3000 — you should land on the marketing site.
Environment variables
Create a .env.local at the repo root with whichever of these you actually need. Restora 360 runs in DEV mode when any of the secrets below are unset — payment intents are simulated rather than real.
Shell
# Required for production; dev defaults are inferred when missing
SESSION_SECRET=your-256-bit-random-string
# Optional — when unset, Restora 360 simulates Stripe in DEV mode
STRIPE_SECRET_KEY=sk_test_...
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...
# Optional — when unset, emails are logged to console rather than sent
RESEND_API_KEY=re_...
RESEND_FROM="Restora 360 <donotreply@restora360.com>"
RESEND_REPLY_TO=
# Optional — when unset, defaults to http://localhost:3000
NEXT_PUBLIC_SITE_URL=https://yourdomain.com
# Optional — guards the /api/cron/* endpoints
CRON_SECRET=any-long-random-stringAccessing tenant subdomains locally
Tenant storefronts live at subdomain.localhost:3000 (modern browsers route *.localhost to 127.0.0.1 automatically).
Available demo tenants after seeding:
luigi.localhost:3000— Luigi's Pizzeria (canonical demo)chain-hq.localhost:3000→chain-uppsala.localhost:3000— multi-location chainkarachi-kitchen.localhost:3000,bombay-bites.localhost:3000, … — 15 Food Bazar restaurants
See demo-accounts.html in the repo root for the full list with credentials.
Common commands
Shell
# Run TypeScript type-checking
npx tsc --noEmit
# Production build
npm run build
# Re-seed (idempotent — safe to re-run)
node scripts/seed-platform-owners.js
# Run a specific seeder fresh
node scripts/seed-multi-location.jsFrequently asked
- MongoDB, in every environment including local development — there are no flat files. The database is named by the path component of `MONGO_DB_CONNECTION_URL` (e.g. `.../restora`); nothing else selects it. Each tenant is one document in `tenant_data` keyed by `tenantId`, platform-wide singletons live in `platform_data` keyed by slug, and the POS uses typed per-entity collections (`pos_tickets`, `pos_registers`, …).
- Drop the database the URI names (`mongosh "$MONGO_DB_CONNECTION_URL" --eval 'db.dropDatabase()'`) and re-run the seed scripts. There is no `/databases/` directory to delete — the JSON flat-file store was removed and `ui/src/lib/db/no-file-database.test.ts` fails the build if it comes back.