Skip to content

First-time Setup

Preconditions

Prerequisites installed.

Clone

git clone https://github.com/Thirunk/akshaya-group-global.git
cd akshaya-group-global

Install

npm install
Installs all 7 apps + 2 shared packages + the API Worker in one pass (npm workspaces).

Environment file (optional)

copy .env.example .env
The only variable, VITE_API_BASE_URL, is currently unused by any app's source (see Applications overview "Note on environment variables") - this step is optional and has no observable effect on npm run dev:* today.

Run one app

npm run dev:corporate
Opens a Vite dev server (default http://localhost:5173, check the terminal output for the exact port - Vite auto-increments if that port is taken).

Run the API Worker locally (only if the app you're working on calls it)

npm run dev:api
Starts wrangler dev for workers/api - includes a local D1 emulator (no network, no production credentials needed) and a local R2 emulator.

Apply migrations to the local D1 emulator

cd workers/api
npm run db:local
Never touches production - see Cloudflare → D1 for the local/remote distinction.

Validation

npm run build        # builds all 7 apps - same as CI's "Build applications" step
npm test              # Vitest - same as CI's "Unit tests" step

Expected result

Both commands exit 0, matching what .github/workflows/ci.yml's validate job runs on every PR.

If something goes wrong

See Troubleshooting.