shoc-frontend-new/README.md

2 KiB

SeaHaven Admin

Vite + React SPA for SeaHaven facility management (work orders, vendor portal, uplifts, and related admin features).

Requirements

  • Node.js 20+
  • npm 10+

Setup

npm ci
cp .env.example .env

Environment variables

Variable Description Default
VITE_API_URL Backend API base URL (baked into the production build) /api
VITE_API_TARGET Dev proxy target for /api (Vite only) http://localhost:5141

Scripts

Command Description
npm run dev Start Vite dev server on port 3000
npm run build Type-check and production build to dist/
npm run preview Preview production build locally
npm test Run Vitest unit tests
npm run test:watch Run Vitest in watch mode
npm run lint ESLint
npm run lint:fix ESLint with auto-fix
npm run format Prettier write
npm run format:check Prettier check (used in CI)

Architecture

New code lives under src/domain/, src/app/, and src/api/ following the IrisLoan conventions documented in docs/ARCHITECTURE_PLAN.md.

CI

GitHub Actions workflow (.github/workflows/ci.yml) runs on push and pull requests:

  1. npm run format:check
  2. npm run lint
  3. npm run build
  4. npm test

Local pre-commit hooks (Husky + lint-staged) run ESLint and Prettier on staged files.

Development proxy

During npm run dev, requests to /api are proxied to VITE_API_TARGET (see vite.config.ts).