Skip to the article
Aniq-UI

E-CommerceRun the store locally

Run the store locally

Install and start each app with Node.js and Yarn, one terminal per app.

For the Full Stack package

Before you start: install Node.js 22 or newer and run corepack enable once. No database server is needed.

View requirements

Open every terminal where the commands below expect it: inside e-commerce-1 for the full stack, or next to the app's folder for a single-app package.

AppFolderAddress
APIback-endlocalhost:8000Local
Storefrontstorefrontlocalhost:3030Local
Admin dashboardadmin-dashboardlocalhost:3031Local

Start the API first: both frontends read all of their data from it.

Start the API

  1. Install and configure

    .env.example works as it is for local development.

    Terminal
    corepack enable
    cd back-end
    yarn install
    cp .env.example .env
    Having trouble?
  2. Create the database

    yarn seed creates database.sqlite, its tables and the demo store. Running it again adds only what is missing.

    Terminalin back-end
    yarn seed
  3. Start the server

    Terminalin back-end
    yarn dev

    Expected result: localhost:8000/api/healthLocal answers {"status":"ok"}.

    Having trouble?

Start the storefront

In a second terminal:

  1. Install and configure

    The copied .env points the storefront at the API on port 8000.

    Terminal
    cd storefront
    yarn install
    cp .env.example .env
  2. Start it

    Terminalin storefront
    yarn dev

    Expected result: localhost:3030Local opens the shop in English; Arabic is at /ar.

    Having trouble?

Start the storefront

The API is not part of this package. Do not create a .env file yet: without one, the storefront runs on its built-in sample store.

  1. Install

    Terminal
    corepack enable
    cd storefront
    yarn install
    Having trouble?
  2. Start it

    Terminalin storefront
    yarn dev

    Expected result: localhost:3030Local opens the shop with a "Sample data" notice. Any email and password sign you in as the sample shopper, and what you change is kept in the browser.

When you have the template's API running, create .env from .env.example and set NEXT_PUBLIC_API_BASE_URL to its address. That is what switches the sample store off.

Configuration

Start the admin dashboard

In a third terminal:

  1. Install and configure

    Terminal
    cd admin-dashboard
    yarn install
    cp .env.example .env
  2. Start it and sign in

    Terminalin admin-dashboard
    yarn dev

    Expected result: localhost:3031Local opens the sign-in form, prefilled with the Super Admin: admin@example.com with the password Admin@123.

    Having trouble?

Start the admin dashboard

The API is not part of this package. Do not create a .env file yet: without one, the dashboard runs on its built-in sample store.

  1. Install

    Terminal
    corepack enable
    cd admin-dashboard
    yarn install
    Having trouble?
  2. Start it and sign in

    Terminalin admin-dashboard
    yarn dev

    Expected result: localhost:3031Local opens the sign-in form, prefilled with admin@example.com and Admin@123. On the sample store any valid email with a password of at least 6 characters signs you in as the Super Admin, and your changes are kept in the browser.

The AI assistant and the AI studio stay unavailable on the sample store, because both need the API's keys. Everything else works.

Configuration

Production build

The same folders, built once and then started. First set back-end/.env for production: with NODE_ENV=production the API creates no tables on start, and it refuses to start while JWT_SECRET is empty or still the example value, or while CORS_ORIGIN is empty.

back-end/.env
NODE_ENV=production
JWT_SECRET=<a long random string>
CORS_ORIGIN=http://localhost:3030,http://localhost:3031
FRONTEND_URL=http://localhost:3031

Generate the secret with node -e "console.log(require('crypto').randomBytes(48).toString('hex'))". Then build the API, create its tables once, and start it. yarn db:sync:prod creates empty tables; yarn seed:prod in its place adds the demo store and its accounts.

Terminalin back-end
yarn build
yarn db:sync:prod
yarn start:prod

Each frontend, the storefront on 3030 and the admin on 3031 (the same two commands in admin-dashboard):

Terminalin storefront
yarn build
yarn start

The frontends compile their .env in at build time, so run yarn build again after changing it. Before you deploy anywhere public, read the production checklist.

Start over with fresh demo data

Stop the API, then delete the database file and seed it again. This deletes everything you created.

Terminalin back-end
rm -f database.sqlite* && yarn seed

In PowerShell:

Terminalin back-end
Remove-Item database.sqlite*; yarn seed

Next

Was this helpful?

Checked against the 2026-10-07 release

Stuck on a step?

Find a fix before you start over.

Troubleshooting

Cookie Preferences

We use cookies to enhance your browsing experience, analyze site traffic, and personalize content. By clicking "Accept All", you consent to our use of cookies for analytics and personalized advertising.