# CLAUDE.md This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. ## Project An ERP / work-management system (*toiminnanohjausjärjestelmä*) for a small (5–10 person) Finnish media/marketing company. Stack: Laravel 13, Livewire 4 (single-file components), Flux UI 2 free edition, Tailwind 4, Vite 8, Pest. No domain code exists yet; `/` is a temporary Livewire demo page (`resources/views/pages/⚡home.blade.php`, layout `resources/views/layouts/app.blade.php`). - **The specification is `määrittely.txt`** (Finnish). It defines users/roles, customer jobs (*asiakastyö*) and their fields and enums, time tracking, expenses, Kanban tasks, the service unit → service → work task hierarchy, and billing-material export. It ends with Claude's open questions and a proposed phased plan. Read it before designing any domain feature. - **Language rule:** code (identifiers, tables, columns, enum keys) is in English; the specification and the UI are in Finnish. Keep UI strings in translation files from the start. - **Build in phases, not all at once.** Proposed order: (1) auth, users and roles, lightweight customers, customer jobs, mobile quick intake, time entries; (2) expenses, service units and pricing, billing export; (3) tasks, Kanban, workflow templates; (4) subcontractors, reports, notifications, billing software API. - **Access control is central.** Roles: admin (*pääkäyttäjä*), management (*johto*), employee (*työntekijä*), intern (*harjoittelija*), subcontractor (*alihankkija*). Employees and interns see only the jobs assigned to them and never see money amounts. Interns have an end date after which they can't log in, plus a supervisor. Subcontractors see only their assigned jobs. - **UI targets:** logged-in users only (no public pages besides login). It must work on phones (new-job intake, time entry) and on FullHD desktops. ## Accessibility (WCAG 2.2 AA, EN 301 549) Accessibility is a contractual acceptance criterion. It covers the whole UI: navigation, forms, tables, reports, notifications, dialogs, login, and every business process. Every new or changed view must meet these rules: - Use Flux components first; they ship with correct roles, focus handling and keyboard support. Every form control goes in `flux:field` with a `flux:label` and a `flux:error` (or uses the shorthand `label` prop). Placeholder text is not a label. - Never convey meaning by colour alone. Statuses, priorities (e.g. *kiire* = red), errors and warnings always also have visible text or an icon with text. - Announce dynamic changes: put status text in `role="status"` / `aria-live="polite"` (errors: `role="alert"`), or use Flux toast. Keep button names stable instead of putting changing state in them. - Make everything work with the keyboard alone, with a visible focus indicator and no focus traps. Use `flux:modal` for dialogs, so focus moves in and returns. - The layout (`resources/views/layouts/app.blade.php`) provides a skip link and a `
` landmark. Keep them, and add `