How sbalsara05/burrow-housing works
Burrow Housing is a housing marketplace for listing and discovering rentals, managing favorites and renter interest, and completing sublease agreements. The principal workflow runs from property search and listing details through an interest or chat interaction to an agreement, signature, and rent payment. The repository separates a React/Redux client from an Express/MongoDB API, with distinct authentication, property, ambassador, contract, and payment capabilities. Edges reflect excerpts, SOURCE INDEX references, or the README; client-to-API links are dashed because the sampled material does not establish their request wiring.
Main entry points: server.js HTTP API · favoritesRoutes.js Favorites · contractController.js Contract lifecycle · stripeController.js Rent payments
Components 28
Housing client
- Web application
homy/src/App.tsx - Pages and routes
homy/src/navigation/Navigation.tsx - Client state
homy/src/redux/slices/store.ts - Search and listing UI
homy/src/components/inner-listing/listing-14/ListingFourteenArea.tsx - Dashboard workflows
homy/src/components/dashboard/add-property/AddPropertyBody.tsx - Chat experience
homy/src/components/dashboard/chat/ChatProvider.tsx - Agreement screens
homy/src/components/dashboard/agreements/AgreementsBody.tsx
Marketplace API
- HTTP API
backend/server.js - Authentication
backend/middlewares/authMiddleware.js - Property listings
backend/controllers/propertyController.js - Property records
backend/models/propertyModel.js - User records
backend/models/userModel.js - Favorites
backend/routes/favoritesRoutes.js - Ambassador requests
backend/controllers/ambassadorRequestController.js - Ambassador request records
backend/models/ambassadorRequestModel.js
Agreements and payment
- Contract lifecycle
backend/controllers/contractController.js - Contract records
backend/models/contractModel.js - Rent payments
backend/controllers/stripeController.js - Stripe service
backend/services/stripeService.js
Messaging and notifications
- Chat integration
backend/controllers/chatController.js - Stream webhook
backend/controllers/streamWebhookController.js - Notification records
backend/models/notificationModel.js - Email notification enqueue
backend/utils/notificationEmailHelper.js - Email queue
backend/queues/emailQueue.js - Email delivery
backend/services/emailService.js
Other components
- Renter or lister
- Brevo email service
- MongoDB
Connections 36
- Renter or lister → Web application: uses
- Web application → Pages and routes: loads routes
homy/src/App.tsx - Web application → Client state: uses state
homy/src/App.tsx - Renter or lister → Search and listing UI: searches listings
- Renter or lister → Dashboard workflows: manages housing
- Renter or lister → Chat experience: messages
- Renter or lister → Agreement screens: reviews agreements
- Search and listing UI → HTTP API: requests listings
- Dashboard workflows → HTTP API: submits changes
- Chat experience → HTTP API: uses chat API
- Agreement screens → HTTP API: uses contract API
- HTTP API → Authentication: mounts routes
backend/server.js - HTTP API → Property listings: mounts routes
backend/server.js - HTTP API → Favorites: mounts routes
backend/server.js - HTTP API → Ambassador requests: mounts routes
backend/server.js - HTTP API → Contract lifecycle: mounts routes
backend/server.js - HTTP API → Rent payments: mounts routes
backend/server.js - HTTP API → Chat integration: mounts routes
backend/server.js - HTTP API → Stream webhook: routes webhook
backend/server.js - Favorites → Authentication: authenticates requests
backend/routes/favoritesRoutes.js - Favorites → User records: reads and updates
backend/routes/favoritesRoutes.js - Favorites → Property records: looks up property
backend/routes/favoritesRoutes.js - Property listings → Property records: reads and writes
backend/controllers/propertyController.js - Property listings → User records: updates lister
backend/controllers/propertyController.js - Ambassador requests → Ambassador request records: manages requests
backend/controllers/ambassadorRequestController.js - Contract lifecycle → Contract records: manages contracts
backend/controllers/contractController.js - Contract lifecycle → Property records: loads property
backend/controllers/contractController.js - Contract lifecycle → User records: loads parties
backend/controllers/contractController.js - Rent payments → Contract records: updates payment state
backend/controllers/stripeController.js - Rent payments → Stripe service: creates payment intents
backend/controllers/stripeController.js - Rent payments → Notification records: creates payment notices
backend/controllers/stripeController.js - Stream webhook → Notification records: creates chat notices
backend/controllers/streamWebhookController.js - Email notification enqueue → Email queue: queues email
backend/utils/notificationEmailHelper.js - Email queue → Email delivery: sends notification
backend/queues/emailQueue.js - Email delivery → Brevo email service: delivers email
- Authentication → MongoDB: checks token revocation