Skip to the article
Aniq-UI

KinoraRun Kinora locally

Run Kinora 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.9 or newer (22 for the Backend package alone) and run corepack enable once. No database server is needed.

View requirements

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

AppFolderAddress
APIback-endlocalhost:8000Local
Dashboarddashboardlocalhost:3030Local

Start the API first: with the steps below the dashboard reads all of its 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 data. 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 API

  1. Install and configure

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

    Terminal
    corepack enable
    cd kinora-fitness-backend
    yarn install
    cp .env.example .env
    Having trouble?
  2. Create the database

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

    Terminalin kinora-fitness-backend
    yarn seed
  3. Start the server

    Terminalin kinora-fitness-backend
    yarn dev

    Expected result: localhost:8000/api/healthLocal answers {"status":"ok"}. The seed printed the accounts to sign in with.

    Having trouble?

Start the dashboard

In a second terminal:

  1. Install and configure

    Terminal
    cd dashboard
    yarn install
    cp .env.example .env
  2. Point it at the API

    Open dashboard/.env and fill in the two API lines, which are empty in the example. Left empty, the dashboard runs on its built-in sample data instead of the API.

    dashboard/.env
    NEXT_PUBLIC_API_BASE_URL=http://localhost:8000/api
    NEXT_PUBLIC_WEBSOCKET_BASE_URL=http://localhost:8000
  3. Start it and sign in

    Terminalin dashboard
    yarn dev

    Expected result: localhost:3030Local opens the sign-in form, filled in with the Head Coach: headcoach@example.com with the password Coach@123. /en/auth/login?as=client fills in the member, member@example.com with Member@123. Arabic is at /ar.

    Having trouble?

Start the 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 data.

  1. Install

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

    Terminalin kinora-fitness-dashboard
    yarn dev

    Expected result: localhost:3030Local opens the sign-in form with a "Sample data" notice. The password is not checked (the form still asks for at least 6 characters), 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 data off.

Configuration

Production build

The same folders, built once and then started. First set back-end/.env for production. With NODE_ENV=production the API never rewrites the schema on its own: it runs the migrations as it starts. 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
FRONTEND_URL=http://localhost:3030

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, or after it, adds the demo data and its accounts.

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

Then the dashboard, on 3030:

Terminalin dashboard
yarn build
yarn start

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

Production build

Built once, then started. First set .env for production. With NODE_ENV=production the API never rewrites the schema on its own: it runs the migrations as it starts. It refuses to start while JWT_SECRET is empty or still the example value, or while CORS_ORIGIN is empty.

.env
NODE_ENV=production
JWT_SECRET=<a long random string>
CORS_ORIGIN=https://app.your-domain.com

Generate the secret with node -e "console.log(require('crypto').randomBytes(48).toString('hex'))". CORS_ORIGIN lists the addresses of the dashboards that call the API, comma separated. Then build, create the tables once, and start. yarn db:sync:prod creates empty tables; yarn seed:prod in its place, or after it, adds the demo data and its accounts.

Terminalin kinora-fitness-backend
yarn build
yarn db:sync:prod
yarn start:prod

Production build

Built once, then started on 3030. With no .env the production build runs on the sample data exactly as yarn dev does.

Terminalin kinora-fitness-dashboard
yarn build
yarn start

The dashboard compiles its .env in at build time, so run yarn build again after changing it.

Start over with fresh demo data

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

Terminal
rm -f database.sqlite* && yarn seed

In PowerShell:

Terminal
Remove-Item database.sqlite*; yarn seed

Next

Was this helpful?

Checked against the 2026-10-08 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.