40227-vm/frontend/docs/shared-app-types.md
Dmitri d4a5378adf Refactor: migrate frontend to Vite/React, add product backend modules
Frontend:
- Replace Next.js with Vite + React + TypeScript
- Add new component architecture (app-shell, sidebar, dashboard modules)
- Implement product modules: FRAME, safety protocols, walkthrough checkin,
  campus/staff attendance, personality quiz, sign language, classroom timer
- Add shadcn/ui component library with Tailwind CSS
- Remove legacy generated components, stores, and pages

Backend:
- Add product migrations: frame_entries, user_progress, safety_quiz_results,
  walkthrough_checkins, communication_events, personality_quiz_results,
  campus_attendance_config/summaries, staff_attendance_records, content_catalog
- Add corresponding models, services, and routes
- Implement cookie-based auth with refresh token rotation
- Add content catalog seeder with product content
- Migrate to ESLint flat config
- Switch from yarn to npm

Infrastructure:
- Update .gitignore for new tooling
- Add project documentation (CLAUDE.md, docs/)
- Remove deprecated config files and yarn.lock

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-06-09 15:18:23 +02:00

866 B

Shared App Types

Purpose

UI-facing product types live in frontend/src/shared/types/app.ts.

Contents

frontend/src/shared/types/app.ts contains cross-module product types such as:

  • UserRole
  • CampusId
  • CampusInfo
  • StaffProfile
  • ModuleId
  • Module
  • ZoneColor
  • cross-module static catalog item types used by the current UI

Backend DTO contracts remain in dedicated files under frontend/src/shared/types/, for example auth.ts, frame.ts, campusAttendance.ts, and documents.ts.

Rules

  • New shared UI/product types should go in frontend/src/shared/types/app.ts only when they are genuinely cross-module.
  • Backend request/response DTOs should stay in feature-specific shared type files.
  • Feature-local view model types should stay in the relevant frontend/src/business/<module>/types.ts or component types.ts file.