New react app for seahaven
Find a file
2026-06-17 09:35:34 -03:00
.cursor/rules docs: translate pt-BR docs and Cursor rules to English 2026-06-15 09:59:40 -03:00
.github/workflows ci: add GitHub Actions workflow for lint and build 2026-06-12 11:41:00 -03:00
.husky chore: add eslint, prettier, husky and commitlint tooling 2026-06-12 11:40:01 -03:00
config feat(build): fail build on misconfigured absolute VITE_API_URL 2026-06-17 09:35:34 -03:00
docs fix(api): align frontend contracts with backend review findings 2026-06-16 11:52:39 -03:00
e2e/auth fix(auth): restore JWT and align CRUD with backend routes 2026-06-15 11:17:40 -03:00
public build: migrate from CRA to Vite with TypeScript config 2026-06-12 11:41:03 -03:00
src refactor(api): extract shared API prefix URL resolution 2026-06-17 09:34:39 -03:00
.env chore(env): switch tracked env vars to Vite prefixes 2026-06-16 09:15:31 -03:00
.env.development chore(env): switch tracked env vars to Vite prefixes 2026-06-16 09:15:31 -03:00
.env.example docs(env): document VITE_API_URL must include /api suffix 2026-06-17 09:32:43 -03:00
.env.production chore(env): switch tracked env vars to Vite prefixes 2026-06-16 09:15:31 -03:00
.gitignore chore: remove migration scripts and unused generouted router 2026-06-15 10:18:23 -03:00
.prettierignore chore: add eslint, prettier, husky and commitlint tooling 2026-06-12 11:40:01 -03:00
.prettierrc chore: add eslint, prettier, husky and commitlint tooling 2026-06-12 11:40:01 -03:00
commitlint.config.js chore: add eslint, prettier, husky and commitlint tooling 2026-06-12 11:40:01 -03:00
eslint.config.js fix: scope ESLint to new components and hooks directories 2026-06-12 11:43:33 -03:00
index.html build: migrate from CRA to Vite with TypeScript config 2026-06-12 11:41:03 -03:00
package-lock.json build: migrate from CRA to Vite with TypeScript config 2026-06-12 11:41:03 -03:00
package.json chore: remove migration scripts and unused generouted router 2026-06-15 10:18:23 -03:00
playwright.config.ts test: add Vitest setup and Playwright login e2e spec 2026-06-12 11:56:51 -03:00
README.md docs(env): document VITE_API_URL must include /api suffix 2026-06-17 09:32:43 -03:00
tsconfig.json build: migrate from CRA to Vite with TypeScript config 2026-06-12 11:41:03 -03:00
tsconfig.node.json feat(build): fail build on misconfigured absolute VITE_API_URL 2026-06-17 09:35:34 -03:00
vite.config.ts feat(build): fail build on misconfigured absolute VITE_API_URL 2026-06-17 09:35:34 -03:00
vitest.config.ts build: migrate from CRA to Vite with TypeScript config 2026-06-12 11:41:03 -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).