New react app for seahaven
Find a file
Adam Moussa 4464e76228
Some checks failed
CI / ci (push) Has been cancelled
Convert CI to org reusable workflow caller
Replace the inline 5-job ci.yml with a thin caller of the org reusable
workflow ci-typescript-frontend.yaml. The standards gate, changed-line
guard, format/lint/build, unit tests, and Playwright browser smoke now
live centrally in Sea-Haven-Industries/.github and are maintained once.

Renames ci.yml -> ci.yaml (kebab-case .yaml convention) and triggers on
pull_request and push to main and dev, so this branch keeps CI coverage.

The reusable workflow runs as a single `ci` job, so this caller emits the
`ci / ci` status context. Branch-protection rulesets for main and dev must
have their required checks switched from the old job names (Metadata and
standards, Code quality, Build, Unit tests, Browser smoke) to `ci / ci`.
2026-06-24 16:46:47 -04:00
.cursor/rules Feat/vite typescript migration (#16) 2026-06-18 14:41:17 -03:00
.github Convert CI to org reusable workflow caller 2026-06-24 16:46:47 -04:00
.husky Feat/vite typescript migration (#16) 2026-06-18 14:41:17 -03:00
config Feat/vite typescript migration (#16) 2026-06-18 14:41:17 -03:00
docs Feat/vite typescript migration (#16) 2026-06-18 14:41:17 -03:00
e2e/auth Feat/vite typescript migration (#16) 2026-06-18 14:41:17 -03:00
public Feat/vite typescript migration (#16) 2026-06-18 14:41:17 -03:00
src Feat/vite typescript migration (#16) 2026-06-18 14:41:17 -03:00
.env Feat/vite typescript migration (#16) 2026-06-18 14:41:17 -03:00
.env.development Feat/vite typescript migration (#16) 2026-06-18 14:41:17 -03:00
.env.example Feat/vite typescript migration (#16) 2026-06-18 14:41:17 -03:00
.env.production Feat/vite typescript migration (#16) 2026-06-18 14:41:17 -03:00
.gitignore Feat/vite typescript migration (#16) 2026-06-18 14:41:17 -03:00
.prettierignore Feat/vite typescript migration (#16) 2026-06-18 14:41:17 -03:00
.prettierrc Feat/vite typescript migration (#16) 2026-06-18 14:41:17 -03:00
commitlint.config.js Feat/vite typescript migration (#16) 2026-06-18 14:41:17 -03:00
eslint.config.js Feat/vite typescript migration (#16) 2026-06-18 14:41:17 -03:00
index.html Feat/vite typescript migration (#16) 2026-06-18 14:41:17 -03:00
package-lock.json Feat/vite typescript migration (#16) 2026-06-18 14:41:17 -03:00
package.json Feat/vite typescript migration (#16) 2026-06-18 14:41:17 -03:00
playwright.config.ts Feat/vite typescript migration (#16) 2026-06-18 14:41:17 -03:00
README.md Feat/vite typescript migration (#16) 2026-06-18 14:41:17 -03:00
tsconfig.json Feat/vite typescript migration (#16) 2026-06-18 14:41:17 -03:00
tsconfig.node.json Feat/vite typescript migration (#16) 2026-06-18 14:41:17 -03:00
vite.config.ts Feat/vite typescript migration (#16) 2026-06-18 14:41:17 -03:00
vitest.config.ts Feat/vite typescript migration (#16) 2026-06-18 14:41:17 -03:00

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 Ky API prefix (baked into the production build) /api
VITE_API_TARGET Dev proxy target for /api (Vite only) http://localhost:5141

VITE_API_URL is the full API base prefix. Route paths in API_PATHS do not include /api — only this variable supplies it.

  • Development: use VITE_API_URL=/api. The Vite dev server proxies /api to VITE_API_TARGET.
  • Production: use an absolute URL that ends with /api (e.g. https://api.example.com/api). Absolute URLs without /api will produce broken API requests.

See .env.example and .env.production for reference values.

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).