ParcelKit
Docs/Getting started/Installation

Installation

The quickest way in is install/install.sh (see Install in 10 minutes): it does everything below for you inside Docker. This page is for developers who want the parts running on their own machine, to change the code.

What runs

Part Where Default port
PostgreSQL 16 with PostGIS Docker, or your own 5432
Redis 7 Docker, or your own 6379
API (source/backend, NestJS) npm run start:dev 3000
Console, merchant portal, tracking page (source/admin, Next.js) npm run dev 3200 (3001 in Docker)
Rider app (source/rider-app, Expo) npx expo start —

Prerequisites

  • Node.js 22 LTS
  • Docker Desktop (for PostgreSQL and Redis), or both installed locally. The database needs the PostGIS extension: the migrations enable it.

1. Database and Redis

docker run -d --name parcelkit-pg -p 5432:5432 \
  -e POSTGRES_PASSWORD=change-me -e POSTGRES_DB=parcelkit postgis/postgis:16-3.4
docker run -d --name parcelkit-redis -p 6379:6379 redis:7-alpine

2. The API

cd source/backend
cp .env.example .env        # then edit: DB_PASSWORD, the JWT secrets, DEFAULT_COUNTRY
npm ci
npm run migration:run       # creates every table; safe to run again
npm run seed                # your first admin account (prints its phone number)
npm run start:dev

Check it: curl http://localhost:3000/api/health answers {"status":"ok", …} with the database and Redis up.

Your country. On its first start the API configures the installation for one country — currency, language, dial code, tax, weekends, address shape — from DEFAULT_COUNTRY (a two-letter code), or from the server's time zone when that is not set. It is a one-time choice made on the first boot; change it later under Markets in the console.

Demo network. npm run seed -- --demo adds demo riders, two hubs, three merchants and parcels in every state, in your country's money and cities, through the same services the console uses. Everything is named "(demo)".

3. The console

cd source/admin
npm ci
NEXT_PUBLIC_API_BASE=http://localhost:3000/api npm run dev

Open http://localhost:3200, enter the admin phone the seed printed, and ask for a code. With no SMS provider configured, the code is written to the API's log in English, whatever your market's language (login code for +919955000001 is 123456).

The merchant portal is http://localhost:3200/m and the public tracking page http://localhost:3200/track/<tracking number>: the same app.

NEXT_PUBLIC_API_BASE is built into the console: a production build must be rebuilt after it changes.

4. The rider app

cd source/rider-app
npm ci
EXPO_PUBLIC_API_URL=http://<your LAN address>:3000/api npx expo start

Use your machine's LAN address, not localhost: the phone has to reach it. Background location, the camera scanner and push notifications need a development build (npx expo run:android) rather than Expo Go.

Keys and providers

Every outside service — SMS, maps, payments, WhatsApp, storage — is configured in the console under Providers, never in a file on the server. Each is optional: without SMS the codes go to the log, without a maps key the maps use OpenStreetMap, without a payment account the door takes cash.

source: docs/installation.md (ships identically in the product zip)