# Demo build (static, no database)

This folder is a self-contained copy of the project for customer demos. It runs
**without a database**: all content comes from a JSON snapshot of the real
database (`lib/demo-data.json`), and a small in-memory Prisma mock
(`lib/prisma.ts`) answers every query. Nothing is persisted.

## What's different from the real site

- `lib/prisma.ts` — mock Prisma client over `lib/demo-data.json` (reads only).
- `lib/auth.ts` — admin login accepts any e-mail/password (returns a canned
  admin). The login page pre-fills `admin@example.com` / `admin123`.
- `.env` — no `DATABASE_URL`; static `NEXTAUTH_SECRET` only.
- Forms (newsletter / contact / devis) respond `201 ok` but write to memory.

Everything else is identical: layout, pages, admin dashboard, translations, SEO.

## Run it

The `node_modules` folder is a symlink to the parent project's — install
dependencies at the repo root first, then:

```bash
cd demo
npm run build
npm run start -- -p 3001   # http://localhost:3001
```

For development: `npm run dev -- -p 3001`.

## Refresh the data snapshot

Re-export the real DB into `lib/demo-data.json`. The snapshot covers: adminUser,
siteSetting, service(+translations), category(+), product(+), author(+), tag(+),
post(+), project(+), testimonial(+), faq(+), quoteRequest, contactMessage,
newsletterSubscriber, and the `postTag` junction.

## Caveats

- Quote/contact/message rows were empty in the snapshot (0 rows).
- Editing/saving in the admin echoes success but discards changes — expected
  for a demo.