veza/apps/web
senke 44349ec444
Some checks failed
Veza CI / Rust (Stream Server) (push) Successful in 5m35s
E2E Playwright / e2e (full) (push) Failing after 9m56s
Veza CI / Frontend (Web) (push) Failing after 15m21s
Veza CI / Notify on failure (push) Successful in 4s
Veza CI / Backend (Go) (push) Failing after 4m44s
Security Scan / Secret Scanning (gitleaks) (push) Failing after 39s
feat(search): faceted filters (genre/key/BPM/year) + FacetSidebar UI (W4 Day 18)
Backend
- services/search_service.go : new SearchFilters struct (Genre,
  MusicalKey, BPMMin, BPMMax, YearFrom, YearTo) + appendTrackFacets
  helper that composes additional AND clauses onto the existing FTS
  WHERE condition. Filters apply ONLY to the track query — users +
  playlists ignore them silently (no relevant columns).
- handlers/search_handlers.go : new parseSearchFilters reads + bounds-
  checks query params (BPM in [1,999], year in [1900,2100], min<=max).
  Search() now passes filters into the service ; OTel span attribute
  search.filtered surfaces whether facets were applied.
- elasticsearch/search_service.go : signature updated to match the
  interface ; ES path doesn't translate facets yet (different filter
  DSL needed) — logs a warning when facets arrive on this path.
- handlers/search_handlers_test.go : MockSearchService.Search updated
  + 4 mock.On call sites pass mock.Anything for the new filters arg.

Frontend
- services/api/search.ts : new SearchFacets shape ; searchApi.search
  accepts an opts.facets bag. When non-empty, bypasses orval's typed
  getSearch (its GetSearchParams pre-dates the new query params) and
  uses apiClient.get directly with snake_case keys matching the
  backend's parseSearchFilters().
- features/search/components/FacetSidebar.tsx (new) : sidebar with
  genre + musical_key inputs (datalist suggestions), BPM min/max
  pair, year from/to pair. Stateless ; SearchPage owns state.
  data-testids on every control for E2E.
- features/search/components/search-page/useSearchPage.ts : facets
  state stored in URL (genre, musical_key, bpm_min, bpm_max,
  year_from, year_to) so deep links reproduce the result set.
  300 ms debounce on facet changes.
- features/search/components/search-page/SearchPage.tsx : layout
  switches to a 2-column grid (sidebar + results) when query is
  non-empty ; discovery view keeps the full width when empty.

Collateral cleanup
- internal/api/routes_users.go : removed unused strconv + time
  imports that were blocking the build (pre-existing dead imports
  surfaced by the SearchServiceInterface signature change).

E2E
- tests/e2e/32-faceted-search.spec.ts : 4 tests. (36) backend rejects
  bpm_min > bpm_max with 400. (37) out-of-range BPM rejected. (38)
  valid range returns 200 with a tracks array. (39) UI — typing in
  the sidebar updates URL query params within the 300 ms debounce.

Acceptance (Day 18) : promtool not relevant ; backend test suite
green for handlers + services + api ; TS strict pass ; E2E spec
covers the gates the roadmap acceptance asked for. The 'rock + BPM
120-130 = restricted results' assertion needs seed data with measurable
BPM (none today) — flagged in the spec as a follow-up to un-skip
once seed BPM data lands.

W4 progress : Day 16 done · Day 17 done · Day 18 done · Day 19
(HAProxy sticky WS) pending · Day 20 (k6 nightly) pending.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 10:33:35 +02:00
..
.husky state-ownership: delete unused optimisticStoreUpdates.ts file 2026-01-15 19:26:53 +01:00
.storybook feat(ui): add SUMI design system components, seasonal hooks, and i18n updates 2026-03-31 19:15:54 +02:00
dev_audit/frontend fix: UI remediation Phase 1 (S0-S5) + Phase 2 Sprint 6 shadow system 2026-02-12 10:13:44 +01:00
docs feat(branding): scaffold Logo component + Sumi icons + brand assets pipeline (Sprint 3) 2026-04-27 17:08:17 +02:00
lighthouse-reports
public feat(pwa): tighten sw.js to roadmap strategy spec + version stamper (W4 Day 16) 2026-04-29 09:43:09 +02:00
scripts feat(pwa): tighten sw.js to roadmap strategy spec + version stamper (W4 Day 16) 2026-04-29 09:43:09 +02:00
src feat(search): faceted filters (genre/key/BPM/year) + FacetSidebar UI (W4 Day 18) 2026-04-29 10:33:35 +02:00
visual-tests stabilisation commit: while implementing v0.10.5 2026-03-09 19:36:33 +01:00
.dockerignore
.env.example feat(chat): Sprint 4 -- Docker cleanup, frontend migration to Go WS 2026-02-22 20:46:58 +01:00
.env.storybook feat(player): integrate HLS streaming with ABR quality switching 2026-02-22 21:24:40 +01:00
.gitignore fix: UI remediation Phase 1 (S0-S5) + Phase 2 Sprint 6 shadow system 2026-02-12 10:13:44 +01:00
.prettierignore
.prettierrc.json
.size-limit.json chore(cleanup): remove orphan code + archive disabled workflows + .playwright-mcp 2026-04-20 20:33:40 +02:00
all_components.txt docs: update Welcome.mdx and deprecate Kodo references in docs 2026-02-17 17:05:33 +01:00
analyze_lint.py stabilisation commit A 2026-01-07 19:39:21 +01:00
covered_components.txt docs: update Welcome.mdx and deprecate Kodo references in docs 2026-02-17 17:05:33 +01:00
Dockerfile
Dockerfile.dev
Dockerfile.production chore: consolidate CI, E2E, backend and frontend updates 2026-02-17 16:43:21 +01:00
e2e_test_output.json stabilisation commit A 2026-01-07 19:39:21 +01:00
env.remote-r720.example stabilisation commit: while implementing v0.10.5 2026-03-09 19:36:33 +01:00
eslint.config.js feat(eslint): forbid hardcoded hex colors in apps/web (Sprint 2 follow-up #3) 2026-04-27 16:44:58 +02:00
full_test_result.txt
index.html feat(branding): scaffold Logo component + Sumi icons + brand assets pipeline (Sprint 3) 2026-04-27 17:08:17 +02:00
jest.config.js
lint_results.txt feat: Visual masterpiece - true light mode & premium UI 2026-01-11 02:32:21 +01:00
lint_results_2.txt feat: Visual masterpiece - true light mode & premium UI 2026-01-11 02:32:21 +01:00
lint_results_3.txt feat: Visual masterpiece - true light mode & premium UI 2026-01-11 02:32:21 +01:00
lint_results_final.txt feat: Visual masterpiece - true light mode & premium UI 2026-01-11 02:32:21 +01:00
lint_results_final_v2.txt feat: Visual masterpiece - true light mode & premium UI 2026-01-11 02:32:21 +01:00
lostpixel.config.ts chore(cleanup): remove orphan code + archive disabled workflows + .playwright-mcp 2026-04-20 20:33:40 +02:00
nginx.conf
nginx.production.conf fix(v0.12.6): apply all pentest remediations — 36 findings across 36 files 2026-03-14 00:44:46 +01:00
openapitools.json api-contracts: install openapi-generator-cli and create type generation script 2026-01-11 16:30:43 +01:00
orval.config.ts chore(web): install orval + mutator for OpenAPI code generation (v1.0.8 P1) 2026-04-24 00:18:14 +02:00
package.json feat(pwa): tighten sw.js to roadmap strategy spec + version stamper (W4 Day 16) 2026-04-29 09:43:09 +02:00
postcss.config.js
README.md feat(web): UI premium Discord/Spotify-like — tokens, shadows, focus, layout 2026-02-08 17:15:58 +01:00
RUNTIME_ISSUES.json
stryker.config.mjs chore(cleanup): remove orphan code + archive disabled workflows + .playwright-mcp 2026-04-20 20:33:40 +02:00
tailwind.config.ts refactor: Phase 8 — Update docs, ESLint, Storybook config for SUMI 2026-02-12 02:15:11 +01:00
tsconfig.app.json chore: enable noUncheckedIndexedAccess, isolate ghost MSW handlers, document go-clamd tech debt 2026-02-12 23:12:35 +01:00
tsconfig.json fix(web): enable noUncheckedIndexedAccess in tsconfig 2026-02-11 22:56:26 +01:00
tsconfig.node.json
tsconfig.tsbuildinfo
vite.config.ts fix: stabilize frontend — 98 TS errors to 0, align API endpoints, optimize bundle 2026-03-24 21:18:49 +01:00
vitest.config.ts perf(ci): cut frontend unit + e2e wall time ~5-10× (vitest threads + chromium-only + browser cache) 2026-04-27 16:04:52 +02:00
vitest.shims.d.ts feat: global update including storybook setup and backend fixes 2026-02-02 19:34:14 +01:00
vitest.storybook.config.ts chore: add vitest storybook config generated by pre-commit hook 2026-04-01 01:41:05 +02:00

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 server
  • npm run dev:lab - Start with lab environment (real database)
  • npm run dev:mocks - Start with MSW mocks enabled

Building

  • npm run build - Build for production
  • npm run preview - Preview production build

Testing

  • npm test - Run unit tests (Vitest)
  • npm run test:ui - Run tests with UI
  • npm run test:e2e - Run E2E tests (Playwright)

Code Quality

  • npm run lint - Run ESLint
  • npm run lint:fix - Fix ESLint issues
  • npm run lint:ui - Run ESLint on src/components and src/features only
  • npm run report:arbitrary - Report Tailwind arbitrary values (w-[...], gap-[...], etc.) for migration
  • npm run typecheck - Type check without emitting files
  • npm run fmt - Format code with Prettier

Type Generation & Validation

  • npm run generate:types - Generate TypeScript types from OpenAPI spec
  • npm run validate:schemas - Validate Zod schemas
  • npm run validate:types - Type check
  • npm 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

  1. Follow the existing code style
  2. Run npm run validate:all before committing
  3. Ensure all tests pass: npm test
  4. 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

  1. Clear node_modules and reinstall:

    rm -rf node_modules package-lock.json
    npm install
    
  2. Clear Vite cache:

    rm -rf node_modules/.vite
    

Type Errors

Run type generation and validation:

npm run generate:types
npm run validate:types