Skip to Content
HomeLink Hub

Running Locally

Ports, commands and the settings each app needs to run on a development machine.

Ports

AppFolderCommandPort
APIservice/npm run dev4000
Tenant web appapp/npm run dev5173
Dashboard and lawyer portalclient-app/npm run dev5174
Admin paneladmin/npm run dev5175
Mobile appmobile-app/npm run ios or npm run androidExpo dev client
This documentationdocs/npm run dev3000

The API only accepts browser requests from the origins listed in its ALLOWED_ORIGINS setting, so a web app started on a different port than the one above is blocked by CORS.

API

cd service
npm install --legacy-peer-deps
npm run dev

--legacy-peer-deps is needed because of a peer dependency clash between the Cloudinary packages. The service reads its configuration from service/.env: the MongoDB connection string, JWT secrets, mail server, and the Pandascrow, Paystack, Cloudinary and Google credentials. Ask a maintainer for a development copy.

Check which database you are pointed at

Starting the service connects to the database named in its environment file. Confirm that it is a development database before you start it, and before you run any script under service/scripts. Test data written to a shared database is hard to remove.

When the service runs outside production it serves its own raw route list at /api/docs (Swagger UI) and /api/docs/openapi.json. This site's API reference is built from the same source and adds descriptions and responses.

Web apps

Each web app reads the API address from its own environment file.

AppVariableExample
app/VITE_API_BASE_URLhttp://localhost:4000
client-app/VITE_API_BASE_URLhttp://localhost:4000
admin/VITE_API_URLhttp://localhost:4000

app/ and client-app/ also need a Google Maps key (VITE_GOOGLE_MAP_API_KEY) for maps and address search, and each app has a variable holding the address of its sibling app for cross-links (VITE_CLIENT_APP_URL, VITE_CONSUMER_APP_URL).

cd app && npm install && npm run dev

Mobile app

cd mobile-app
npm install
npm run ios

The mobile app talks to production by default

The API address is set in mobile-app/constants/api.ts and defaults to the production service. Anything you create from a simulator with that default is real data. Point it at a local or staging API before testing flows that write.

Tests and checks

FolderCommandWhat it runs
service/npm testNode test runner over tests/**/*.test.ts
app/npm testVitest
client-app/, admin/npm run lint, npm run buildESLint and the TypeScript build
mobile-app/npx tsc --noEmit, npm run lintType check and Expo lint

On this page