1. Install the packages
You need Node.js 22 or newer (see Requirements). In the project folder:
npm install
2. Create your settings file
cp .env.example .env
Open .env and change at least these two lines:
AUTH_SECRET="paste-a-long-random-string-here"
OWNER_PASSWORD="a-strong-password-for-the-owner"
Generate a good secret with:
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
Every variable is explained in Environment variables.
3. Create the database and the sample restaurant
npm run setup
This runs three steps: prisma generate (the database client), prisma db push (creates the tables in prisma/sufra.db) and npm run db:seed (the sample menu, the settings and the first owner account). Running it again is safe: the seed only fills what is empty.
To start over with a clean database:
npm run db:reset
4. Run it
npm run dev
| Address | What |
|---|---|
| http://localhost:3301 | redirects to the Arabic site /ar |
| http://localhost:3301/en | English site |
| http://localhost:3301/en/dashboard | staff dashboard (sign in with OWNER_EMAIL / OWNER_PASSWORD) |
5. Check that everything works
npm run lint # TypeScript, no errors expected
npm test # unit tests for prices, order flow and opening hours
npm run build # production build
Production
For a real restaurant run the production build behind HTTPS. The full steps (a server with PM2 and Nginx, or Docker, and moving to PostgreSQL) are in Manual setup and deployment.