Install dependencies
postinstall also runs prisma generate and fumadocs-mdx, so the Prisma client and the docs index are ready after install.
pnpm installConfigure .env
Space reads one central .env file — never create .env.local or other variants.
| Variable | Purpose |
|---|---|
DATABASE_URL | Postgres connection. Without it the public site renders empty states. |
NEXT_PUBLIC_SITE_URL | Canonical origin for metadata, sitemap and JSON-LD. |
AUTH_SECRET | 32+ random characters; signs the admin session cookie. |
ADMIN_PASSWORD | Shared staff password for /ar/dashboard. |
SPACE_WHATSAPP | WhatsApp number in international format, e.g. 249912345678. |
SPACE_IMAGE_HOSTS | Comma-separated hosts whose images may go through the Next image optimizer. |
Migrate and seed
pnpm db:migrate
SEED_ALLOW=samples pnpm db:seedDevelopment only
The sample seed is for local development. Real content is entered through /dashboard.
Run the dev server
pnpm devOpen http://localhost:3000 — it redirects to /ar.
Scripts
| Command | What it does |
|---|---|
pnpm dev | Dev server on port 3000 |
pnpm build | prisma generate + production build |
pnpm typecheck | Route type generation + tsc --noEmit |
pnpm lint | ESLint |
pnpm db:studio | Prisma Studio |