Installation

From the downloaded folder to a running store on your computer in about five minutes.

Before you start

You need Node.js 20.9 or newer and npm. Nothing else: the database is a SQLite file created inside the project. See Requirements for production servers and PostgreSQL.

1. Install the packages

npm install

2. Create your settings file

cp .env.example .env

Open .env and change at least these two lines:

  • AUTH_SECRET: a long random string that signs the sign-in cookies. Generate one with node -e "console.log(require('crypto').randomBytes(32).toString('hex'))".
  • OWNER_PASSWORD: the password of the first owner account (OWNER_EMAIL).

All variables are explained in Environment variables.

3. Create the database and the sample store

npm run setup

This runs three steps: prisma generate (the database client), prisma db push (creates prisma/souq.db with all tables) and node prisma/seed.mjs (the sample store and the owner account). Running the seed again is safe: it only fills what is empty.

4. Start

npm run dev

The port is 3302. To change it, edit the dev and start scripts in package.json and SITE_URL in .env.

5. Check that everything works

npm test                      # unit tests of pricing, filters, order rules and permissions
npm run build && npm start    # production build on port 3302
python scripts/e2e_api.py     # end-to-end API test against the running server
python scripts/check_pages.py # every page in both languages, and every docs link

e2e_api.py places a few test orders. Run it on a fresh demo database, not on a live store.

Starting over

To return to the sample store, stop the server, delete prisma/souq.db and run npm run setup again.

Demo mode

For a public demo, set DEMO_HINT="1" (shows the owner login on the sign-in page) and SEED_DEMO_SHOPPER="1" (creates a shopper account with orders and a wishlist). Never use either on a real store.