How primum01/project-protos works
TwinSpace appears to be a real-estate 3D-tour and listing website with an authenticated admin console for managing listings and related operations. The main visitor flow is route selection, published-listing retrieval, then listing or tour viewing, with a Matterport embed for the 3D experience. Admins authenticate, select a single active working session, and use the console’s management and reporting pages. The README is only the Vite template, and most page, API, and data-layer implementations were not sampled; uncertain connections are omitted.
Main entry points: router.tsx Route dispatcher · marketing Listing and tour views · App.tsx React app · TourPreviewMockup.tsx Matterport tour embed
Components 20
Public experience
- Site visitor
- React app
src/app/App.tsx - Route dispatcher
src/app/router.tsx - Marketing pages
src/pages/marketing - Listing and tour views
src/pages/marketing - Matterport tour embed
src/components/marketing/TourPreviewMockup.tsx
Admin console
- Admin access guard
src/components/admin/AuthGuard.tsx - Auth state hook
src/hooks/useAuth.ts - Session selection
src/pages/admin/SessionSelect.tsx - Session coordination
src/contexts/SessionContext.tsx - Admin data context
src/contexts/AdminDataContext.tsx - Admin operations
src/pages/admin
Application data
- Published listings
src/hooks/useListings.ts - Listing access
src/lib/firebase/listings.ts - Session access
src/lib/firebase/sessions.ts
External services
- Contact endpoint
api/contact.ts - Payment endpoint
api/payments/create.ts - Firestore
- Firebase Auth
- Matterport
Connections 18
- Site visitor → React app: opens site
- React app → Route dispatcher: renders routes
- Route dispatcher → Marketing pages: dispatches public routes
- Route dispatcher → Listing and tour views: dispatches detail routes
- Listing and tour views → Published listings: loads listings
- Published listings → Listing access: subscribes
- Listing access → Firestore: reads listings
- Listing and tour views → Matterport tour embed: shows tour preview
- Matterport tour embed → Matterport: embeds viewer
- Route dispatcher → Admin access guard: protects admin routes
- Admin access guard → Auth state hook: checks admin
- Auth state hook → Firebase Auth: observes auth
- Route dispatcher → Session selection: dispatches session route
- Route dispatcher → Admin data context: provides admin data
- Route dispatcher → Admin operations: dispatches admin routes
- Session selection → Session coordination: selects session
- Session coordination → Session access: manages sessions
- Session access → Firestore: reads and writes