1. Install the packages
You need Node.js 22.18 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 lines:
AUTH_SECRET="paste-a-long-random-string-here"
OWNER_EMAIL="you@your-company.com"
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 company
npm run setup
This runs prisma generate (the database client), prisma db push (creates the tables in prisma/nuzul.db) and npm run db:seed (settings, destinations, stays, sample bookings, reviews, inquiries and the owner account). Running it again is safe: the seed only fills what is empty.
The sample bookings are spread around the day you run the seed, so the calendar and the overview always look alive. To start over with a clean database:
npm run db:reset
4. Run it
npm run dev
| Address | What |
|---|---|
| http://localhost:3304 | redirects to the Arabic site /ar |
| http://localhost:3304/en | English site |
| http://localhost:3304/en/dashboard | booking dashboard (sign in with OWNER_EMAIL / OWNER_PASSWORD) |
| http://localhost:3304/en/docs | this documentation |
The seed also creates a sample admin and two hosts (maryam@, saif@, laila@nuzul.example) with random passwords nobody knows. Give them a real password in Dashboard > Admins if you want to try the other roles, or deactivate them.
5. Check that everything works
npm run lint # TypeScript, no errors expected
npm test # unit tests: nights, overlaps, seasonal prices, totals, roles
npm run build # production build
python scripts/e2e_api.py # with the server running: about 95 end-to-end checks
The end-to-end test books, blocks and cancels nights on the sample data, so run it on a demo database, never on your real one.
Production
Run the production build behind HTTPS. The full steps (a server with PM2 and Nginx, backups, moving to PostgreSQL) are in Manual setup and deployment.