Skip to content

Local Dev Setup

This guide walks you through setting up the Sema Link frontend app on your local machine.

Prerequisites

  • Node.js 22+ — installed via Homebrew (brew install node@22)
  • Git — with SSH access to the Sema-Link GitHub org
  • npm — comes with Node

Node.js PATH Issue

If npm is not found after installing Node via Homebrew, add this to your ~/.zshrc:

sh
export PATH="/usr/local/opt/node@22/bin:$PATH"

Then run source ~/.zshrc.

1. Clone the Repo

sh
git clone git@github.com:Sema-Link/semalink-frontend.git
cd semalink-frontend

2. Install Dependencies

sh
npm install

3. Create Your Environment File

sh
cp .env.example .env.local

Open .env.local and fill in the values. For local development against mock data, you can leave the VITE_CF_ACCESS_* values as placeholders.

sh
VITE_API_BASE_URL=https://staging-arc.semalink.africa
VITE_CF_ACCESS_CLIENT_ID=your-client-id-here
VITE_CF_ACCESS_CLIENT_SECRET=your-client-secret-here
VITE_ENV=staging

See Environment Variables for a full description of each variable.

4. Start the Dev Server

sh
npm run dev

The app will be available at http://localhost:5173 (or the next available port if 5173 is in use).

Available Scripts

CommandDescription
npm run devStart local dev server with hot reload
npm run buildType-check and build for production
npm run previewPreview the production build locally
npm run test:unitRun unit tests with Vitest
npm run lintLint and auto-fix with ESLint + oxlint
npm run formatFormat source files with Prettier

Internal use only — Sema Link Engineering