How asm-hanif/flatmate works
FlatMate is a property marketplace: seekers discover listings and can favorite, request, or message owners; owners publish and manage listings and respond to requests. Accounts and profiles support both roles, with notifications and email alongside the marketplace workflow. Mira offers property recommendations, price advice, and chat. The graph reflects documented capabilities and sampled route/controller behavior; unsampled route wiring is represented only where the repository structure and README support it.
Main entry points: db.js PostgreSQL · botController.js Assistant API · mailService.js Email delivery · server.js Express application
Components 28
Property discovery
- Browse listings
Frontend/js/flats.js - Listing routes
Backend/server/routes/flatRoutes.js - Listing management
Backend/server/controllers/flatController.js - Requests dashboard
Frontend/js/requests.js - Request management
Backend/server/controllers/requestController.js
Accounts and engagement
- Sign-in and account
Frontend/js/auth.js - Authentication
Backend/server/controllers/authController.js - Profile
Frontend/js/profile.js - Profile management
Backend/server/controllers/profileController.js - Favorites
Frontend/js/flats.js - Favorite management
Backend/server/controllers/favoriteController.js - Property chat
Frontend/js/chat.js - Conversation API
Backend/server/routes/chatRoutes.js - Notifications
Backend/server/controllers/notificationController.js - Contact and inquiry
Backend/server/controllers/contactController.js - Email delivery
Backend/server/services/mailService.js
Mira assistant
- Mira chat
Frontend/js/bot.js - Assistant API
Backend/server/controllers/botController.js - Flat recommendations
Backend/ai/recommendEngine.js - Price advisor
Backend/ai/priceModel.js - Location rate data
Backend/ai/data/locationRates.js - Optional LLM chat
Backend/ai/llmService.js
Application platform
- Express application
Backend/server.js - PostgreSQL
Backend/server/db.js
Other components
- Home seeker
- Property owner
- SMTP email provider
- LLM API
Connections 44
- Home seeker → Browse listings: browses
- Property owner → Browse listings: manages listings
- Browse listings → Listing routes: requests listings
- Listing routes → Listing management: dispatches
- Listing management → PostgreSQL: reads and writes
- Home seeker → Requests dashboard: submits requests
- Property owner → Requests dashboard: manages requests
- Requests dashboard → Request management: requests actions
- Request management → PostgreSQL: reads and writes
- Request management → Notifications: creates notifications
- Home seeker → Sign-in and account: registers or signs in
- Property owner → Sign-in and account: registers or signs in
- Sign-in and account → Authentication: submits credentials
- Authentication → PostgreSQL: reads and writes
- Home seeker → Profile: edits profile
- Property owner → Profile: edits profile
- Profile → Profile management: requests profile
- Profile management → PostgreSQL: reads and writes
- Home seeker → Favorites: saves properties
- Favorites → Favorite management: requests favorites
- Favorite management → PostgreSQL: reads and writes
- Home seeker → Property chat: messages owner
- Property owner → Property chat: replies to seeker
- Property chat → Conversation API: requests conversations
- Conversation API → PostgreSQL: reads and writes
- Notifications → PostgreSQL: reads and writes
- Home seeker → Contact and inquiry: sends inquiry
- Contact and inquiry → Email delivery: sends email
- Authentication → Email delivery: sends reset email
- Email delivery → SMTP email provider: delivers mail
- Email delivery → PostgreSQL: no direct access
- Home seeker → Mira chat: asks Mira
- Property owner → Mira chat: asks Mira
- Mira chat → Assistant API: submits prompt
- Assistant API → Flat recommendations: requests matches
- Assistant API → Price advisor: requests valuation
- Assistant API → Optional LLM chat: requests chat
- Flat recommendations → PostgreSQL: queries listings
- Price advisor → Location rate data: uses rate data
- Price advisor → PostgreSQL: reads comparable listings
- Optional LLM chat → LLM API: calls chat API
- Express application → Listing routes: mounts routes
- Express application → Conversation API: mounts routes
- Express application → PostgreSQL: initializes database