|
Some checks failed
Veza CI / Notify on failure (push) Blocked by required conditions
Veza CI / Rust (Stream Server) (push) Successful in 3m47s
Security Scan / Secret Scanning (gitleaks) (push) Successful in 50s
Veza CI / Backend (Go) (push) Successful in 5m25s
Veza CI / Frontend (Web) (push) Has been cancelled
E2E Playwright / e2e (full) (push) Has been cancelled
CI runtime audit:
- vitest: ~6min on 12-core R720 — `maxThreads: 2` AND
`fileParallelism: false` made the 285-file suite essentially
file-serial.
- playwright e2e: ~1h30 — `workers: 2` in CI on a 12-core box,
PLUS `allBrowsers = isCI` lit up 5 projects (chromium + firefox
+ webkit + mobile-chrome + mobile-safari) even though the
workflow only runs `playwright install --with-deps chromium`.
Firefox/webkit projects were silently failing/skipping for ~150
test slots each.
- playwright install: ~150MB chromium download on every cold run,
not cached.
Three knobs flipped:
(1) apps/web/vitest.config.ts
- `fileParallelism: false` → `true`
- `maxThreads: 2` → `6`
Local bench: 344s → 130s (≈2.7× speedup). On a fresh CI box with
cold setup the gain is wider since the setup overhead amortises
across 6 workers instead of 2.
(2) tests/e2e/playwright.config.ts
- `allBrowsers = isCI || PLAYWRIGHT_ALL=1` → `PLAYWRIGHT_ALL=1`
only. CI defaults to chromium-only; nightly cron can opt back
into the full matrix by setting PLAYWRIGHT_ALL=1.
- `workers: 2` (CI) → `6`. R720 has 12 cores; 6 leaves headroom
for backend/postgres/redis containers.
(3) .github/workflows/e2e.yml
- Cache `~/.cache/ms-playwright` keyed on the resolved
Playwright version. Cache hit → run `playwright install-deps`
(apt-get only, ~5s). Cache miss → full install (~30-60s,
first run after a Playwright bump).
Combined ETA on the e2e workflow: ~10-15min vs ~1h30. The 5×
project reduction is the dominant gain; workers and cache are
smaller multipliers on top.
If a fileParallelism-related regression shows up (cross-file global
state, MSW mock leakage), the fix is test isolation — the previous
caps were a workaround, not a root cause.
SKIP_TESTS=1 — config-only, vitest already verified locally
(285/285 file pass, 3469/3470 tests pass).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| .husky | ||
| .storybook | ||
| dev_audit/frontend | ||
| docs | ||
| lighthouse-reports | ||
| public | ||
| scripts | ||
| src | ||
| visual-tests | ||
| .dockerignore | ||
| .env.example | ||
| .env.storybook | ||
| .gitignore | ||
| .prettierignore | ||
| .prettierrc.json | ||
| .size-limit.json | ||
| all_components.txt | ||
| analyze_lint.py | ||
| covered_components.txt | ||
| Dockerfile | ||
| Dockerfile.dev | ||
| Dockerfile.production | ||
| e2e_test_output.json | ||
| env.remote-r720.example | ||
| eslint.config.js | ||
| full_test_result.txt | ||
| index.html | ||
| jest.config.js | ||
| lint_results.txt | ||
| lint_results_2.txt | ||
| lint_results_3.txt | ||
| lint_results_final.txt | ||
| lint_results_final_v2.txt | ||
| lostpixel.config.ts | ||
| nginx.conf | ||
| nginx.production.conf | ||
| openapitools.json | ||
| orval.config.ts | ||
| package.json | ||
| postcss.config.js | ||
| README.md | ||
| RUNTIME_ISSUES.json | ||
| stryker.config.mjs | ||
| tailwind.config.ts | ||
| tsconfig.app.json | ||
| tsconfig.json | ||
| tsconfig.node.json | ||
| tsconfig.tsbuildinfo | ||
| vite.config.ts | ||
| vitest.config.ts | ||
| vitest.shims.d.ts | ||
| vitest.storybook.config.ts | ||
Veza Frontend
React + TypeScript frontend application for the Veza audio collaboration platform.
Quick Start
Prerequisites
- Node.js 18+ and npm
- Backend API running (see
veza-backend-api/README.md)
Installation
npm install
Development
npm run dev
The application will be available at http://localhost:5173.
Building
npm run build
Setup Steps
1. Environment Variables
Copy .env.example to .env and configure:
# API Configuration
VITE_API_URL=http://localhost:8080/api/v1
VITE_WS_URL=ws://localhost:8081
VITE_STREAM_URL=http://localhost:8082
# Optional: Enable MSW mocks for development
VITE_USE_MSW=0
See .env.example for all available environment variables.
2. Type Generation
TypeScript types are generated from the OpenAPI specification. To regenerate types:
npm run generate:types
This script:
- Reads
veza-backend-api/openapi.yaml - Generates TypeScript types to
src/types/generated/ - Creates barrel exports for easy importing
Note: Types are automatically generated in CI/CD before type checking.
3. Validation
Validate types and schemas:
# Type checking
npm run validate:types
# Schema validation
npm run validate:schemas
# Both
npm run validate:all
Available Scripts
Development
npm run dev- Start development servernpm run dev:lab- Start with lab environment (real database)npm run dev:mocks- Start with MSW mocks enabled
Building
npm run build- Build for productionnpm run preview- Preview production build
Testing
npm test- Run unit tests (Vitest)npm run test:ui- Run tests with UInpm run test:e2e- Run E2E tests (Playwright)
Code Quality
npm run lint- Run ESLintnpm run lint:fix- Fix ESLint issuesnpm run lint:ui- Run ESLint onsrc/componentsandsrc/featuresonlynpm run report:arbitrary- Report Tailwind arbitrary values (w-[...], gap-[...], etc.) for migrationnpm run typecheck- Type check without emitting filesnpm run fmt- Format code with Prettier
Type Generation & Validation
npm run generate:types- Generate TypeScript types from OpenAPI specnpm run validate:schemas- Validate Zod schemasnpm run validate:types- Type checknpm run validate:all- Run all validations
Project Structure
apps/web/
├── src/
│ ├── components/ # Reusable UI components
│ ├── features/ # Feature modules (auth, tracks, playlists, etc.)
│ ├── hooks/ # Custom React hooks
│ ├── services/ # API clients and services
│ ├── stores/ # Zustand state management (UI state stores)
│ │ # Note: Feature stores (auth, chat) are in features/*/store/
│ ├── types/ # TypeScript types
│ │ └── generated/ # Auto-generated types from OpenAPI
│ ├── utils/ # Utility functions
│ └── styles/ # Global styles and design tokens
├── e2e/ # End-to-end tests (Playwright)
├── scripts/ # Build and utility scripts
└── public/ # Static assets
Design System
The application uses the Kodo design system. Single source of truth for layout, spacing, shadows, and transitions: docs/DESIGN_TOKENS.md. Shell layout: docs/APP_SHELL.md.
- Colors: Kodo color palette (see
src/styles/COLOR_USAGE.md) - Components: Design system components in
src/components/ui/ - Typography: Type scale and hierarchy (see
docs/DESIGN_TOKENS.md,src/styles/TYPOGRAPHY_GUIDE.md) - Spacing: Spacing scale (see
docs/SPACING_GUIDE.md) — no arbitrary values (e.g.w-[300px],gap-[7px]) without justification.
Visual regression: npm run visual:capture, npm run visual:compare, npm run visual:update (see visual-tests/README.md). Arbitrary values report: npm run report:arbitrary to list Tailwind arbitrary patterns for migration. New full-layout page: see docs/FULL_LAYOUT_PAGE.md.
ESLint Rules
The project enforces:
- Typography: Use type scale classes (text-xs, text-sm, etc.) instead of arbitrary sizes
- Spacing: Use spacing scale (gap-0 through gap-24) instead of arbitrary values
- Colors: Use Kodo design system colors instead of Tailwind defaults
- Components: Use design system Button component instead of native
<button>
See eslint.config.js for full rule configuration.
Contributing
- Follow the existing code style
- Run
npm run validate:allbefore committing - Ensure all tests pass:
npm test - Type generation runs automatically in CI/CD
Documentation
- Architecture Guide:
docs/ARCHITECTURE.md(MUST READ) - Component Usage:
src/components/COMPONENT_USAGE.md - Color Usage:
src/styles/COLOR_USAGE.md - Typography:
src/styles/TYPOGRAPHY_GUIDE.md - Spacing:
src/styles/SPACING_GUIDE.md
Troubleshooting
Type Generation Fails
Ensure veza-backend-api/openapi.yaml exists and is valid:
cd ../../veza-backend-api
swag init # Generate OpenAPI spec
Build Errors
-
Clear node_modules and reinstall:
rm -rf node_modules package-lock.json npm install -
Clear Vite cache:
rm -rf node_modules/.vite
Type Errors
Run type generation and validation:
npm run generate:types
npm run validate:types