This document provides quick reference for AI coding agents working on the SOVD Web UI project.
| Command | Description |
|---|---|
npm run dev |
Start development server (port 5173) |
npm run build |
Build for production |
npm test |
Run tests with Vitest |
npm run test:ui |
Run tests with Vitest UI |
npm run test:coverage |
Run tests with coverage report |
npm run lint |
Run ESLint |
npm run format |
Format code with Prettier |
npm run format:check |
Check formatting without writing |
npm run typecheck |
Run TypeScript type checking |
React 19 + Vite + TypeScript SPA for browsing SOVD entity trees from ros2_medkit gateway.
| File | Purpose |
|---|---|
src/lib/sovd-api.ts |
Typed HTTP client for gateway REST API |
src/lib/store.ts |
Zustand state management |
src/lib/types.ts |
TypeScript interfaces for API types |
src/lib/schema-utils.ts |
JSON Schema utilities |
src/components/ |
React components |
src/components/ui/ |
shadcn/ui primitives |
- Base URL:
http://localhost:8080/api/v1 - Key endpoints:
GET /areas- List areasGET /components- List componentsGET /apps- List appsGET /components/{id}/data- Component data topicsGET /components/{id}/operations- Component operationsGET /components/{id}/configurations- Component configurations
- State Management: Zustand with persist middleware
- API Layer: Custom
SovdApiClientclass with typed methods - Component Structure: Feature-based organization
- Styling: Tailwind CSS 4 + shadcn/ui components
- Tests are co-located with source files:
*.test.ts/*.test.tsx - Integration tests:
src/test/integration/ - Use
@testing-library/reactfor component tests - Use
vitestfor unit tests
- Use TypeScript strict mode
- Prefer interfaces over types
- Use
@/path alias for imports from src - Format with Prettier before commit (automatic via husky)