How betheashvin/roomatch_fyp works
RooMatch is a furniture catalog and room-planning application. Users browse furniture, sign in or continue as a guest, arrange products in a room, validate fit, and save layouts to an account. The frontend also supports 2D/3D room editing and account dashboards; the backend provides catalog, authentication, saved-layout, and geometry-validation APIs. The source index supports the main frontend/backend links, but several UI and persistence details were not excerpted, so those relationships are omitted where unverified.
Main entry points: api.ts API client · Editor.tsx Room editor · App.tsx Web routes · catalog_repo.py Catalog repository
Components 24
Catalog discovery
- Web routes
frontend/src/App.tsx - Furniture catalog
frontend/src/catalog/CatalogPage.tsx
Room planning
- Room editor
frontend/src/editor/Editor.tsx - Editor state
frontend/src/editor/useEditor.ts - Room canvas
frontend/src/editor/RoomCanvas.tsx - 3D room view
frontend/src/editor/RoomScene3D.tsx - Draft persistence
frontend/src/editor/studioDraft.ts
Accounts and access
- Sign-in and registration
frontend/src/auth/AuthPage.tsx - Session context
frontend/src/auth/AuthContext.tsx - Saved-layout dashboard
frontend/src/dashboard/Dashboard.tsx
Backend services
- Catalog API
backend/app/routers/catalog.py - Catalog repository
backend/app/services/catalog_repo.py - Catalog records
backend/app/models/catalog.py - API client
frontend/src/lib/api.ts - Fit validation API
backend/app/routers/validate.py - Geometry engine
backend/app/services/geometry_engine.py - Saved layouts API
backend/app/routers/layouts.py - Layout records
backend/app/models/saved_layout.py - Authentication API
backend/app/routers/auth.py - Session service
backend/app/services/auth.py - Email delivery
backend/app/services/email.py - Database access
backend/app/database.py
Other components
- Visitor or planner
- SQL database
Connections 32
- Visitor or planner → Web routes: uses
- Web routes → Furniture catalog: routes to
frontend/src/App.tsx - Web routes → Room editor: routes to
frontend/src/App.tsx - Web routes → Sign-in and registration: routes to
frontend/src/App.tsx - Web routes → Saved-layout dashboard: routes to
frontend/src/App.tsx - Furniture catalog → API client: fetches catalog
frontend/src/catalog/CatalogPage.tsx - API client → Catalog API: requests catalog
- Catalog API → Catalog repository: queries
backend/app/routers/catalog.py - Catalog repository → Catalog records: maps records
backend/app/services/catalog_repo.py - Catalog repository → Database access: uses sessions
backend/app/services/catalog_repo.py - Database access → SQL database: connects
backend/app/database.py - Room editor → Editor state: manages state
frontend/src/editor/Editor.tsx - Room editor → Room canvas: renders
frontend/src/editor/Editor.tsx - Room editor → 3D room view: renders
frontend/src/editor/Editor.tsx - 3D room view → Editor state: uses state
frontend/src/editor/RoomScene3D.tsx - Room editor → Draft persistence: uses drafts
frontend/src/editor/Editor.tsx - Room editor → API client: calls API
frontend/src/editor/Editor.tsx - API client → Fit validation API: submits validation
- Fit validation API → Geometry engine: validates placements
backend/app/routers/validate.py - Fit validation API → Catalog repository: loads products
backend/app/routers/validate.py - Room editor → API client: saves layouts
frontend/src/editor/Editor.tsx - API client → Saved layouts API: requests layouts
- Saved layouts API → Layout records: reads and writes
backend/app/routers/layouts.py - Saved layouts API → Database access: uses sessions
backend/app/routers/layouts.py - Sign-in and registration → API client: submits credentials
frontend/src/auth/AuthPage.tsx - Session context → API client: checks session
frontend/src/auth/AuthContext.tsx - Session context → Web routes: guards routes
frontend/src/App.tsx - API client → Authentication API: requests auth
- Authentication API → Session service: uses sessions
backend/app/routers/auth.py - Authentication API → Email delivery: sends email
backend/app/routers/auth.py - Session service → Database access: uses sessions
backend/app/services/auth.py - Saved-layout dashboard → API client: loads layouts
frontend/src/dashboard/Dashboard.tsx