How manasoko/homehaven works
HomeHaven is a real-estate marketplace: visitors discover and filter listings, inspect property and agent details, then contact agents; registered users and agents manage accounts and listings through a protected dashboard. The backend provides authentication, listing and agent APIs, persistent MySQL-backed domain data, and session-authenticated real-time messaging. The README documents OAuth, password reset, delivery states, and read receipts; unsampled implementation details are represented as capabilities without asserting uncertain call paths.
Main entry points: server.ts HTTP and socket server · index.ts API routes · App.tsx App shell · publicRoutes.tsx Property discovery
Components 25
Web experience
- App shell
frontend/src/App.tsx - Property discovery
frontend/src/routes/publicRoutes.tsx - Property pages
frontend/src/pages/public/PropertyPage.tsx - Agent profiles
frontend/src/pages/public/AgentProfilePage.tsx - Account access
frontend/src/routes/authRoutes.tsx - Multi-type registration
frontend/src/components/auth/register/main.tsx - Protected dashboard
frontend/src/routes/dashboardRoutes.tsx - Listing management
frontend/src/pages/dashboard/AddProperty.tsx - Chat interface
frontend/src/components/chat/ChatModal.tsx
Backend API
- HTTP and socket server
backend/src/server.ts - Express app
backend/src/app.ts - API routes
backend/src/routes/index.ts - Authentication handlers
backend/src/controller/auth.ts - Property handlers
backend/src/controller/property.ts - Agent handlers
backend/src/controller/agent.ts - Chat handlers
backend/src/controller/chat.ts - Auth and sessions
backend/src/service/auth.ts - Listing logic
backend/src/service/property.ts
Domain data
- Domain models
backend/src/models/index.ts - MySQL database
- Image hosting
Real-time chat
- Message service
backend/src/service/chat.ts - Conversation events
backend/src/controller/socket/chats.ts - Socket.IO setup
backend/src/sockets/io.ts
Other components
- Visitor or user
Connections 28
- Visitor or user → App shell: uses
- App shell → Property discovery: renders routes
- App shell → Account access: renders routes
- Property discovery → Property pages: routes to
- Property discovery → Agent profiles: routes to
- Visitor or user → Multi-type registration: submits details
- Multi-type registration → Authentication handlers: posts registration
- Visitor or user → Protected dashboard: opens dashboard
- Protected dashboard → Listing management: routes to
- Visitor or user → Chat interface: sends messages
- HTTP and socket server → Express app: creates
- HTTP and socket server → Domain models: initializes
- HTTP and socket server → Socket.IO setup: initializes
- HTTP and socket server → Message service: creates
- HTTP and socket server → Conversation events: dispatches events
- Express app → API routes: mounts API
- Express app → MySQL database: checks connection
- API routes → Authentication handlers: dispatches auth
- API routes → Property handlers: dispatches listings
- API routes → Agent handlers: dispatches profiles
- API routes → Chat handlers: dispatches chat
- Authentication handlers → Auth and sessions: handles auth logic
- Property handlers → Listing logic: handles listing logic
- Domain models → MySQL database: persists domain data
- Listing logic → Image hosting: stores listing images
- Conversation events → Message service: processes messages
- Conversation events → Socket.IO setup: uses rooms
- Message service → Domain models: persists messages