How tanvir-100/rental-platform works
Keyhold connects tenants and property owners through account/property setup, maintenance tracking, and amenity booking. Dashboards use REST data and receive targeted live maintenance updates; booking availability is checked in the interface and enforced atomically by the backend. The graph reflects documented behavior plus sampled entry points; detailed wiring inside unsampled route handlers is intentionally limited to what the README establishes.
Main entry points: server.js Express and Socket server · App.jsx Role dashboards · axios.js Authenticated API client · TenantDashboard.jsx Tenant dashboard
Components 25
Web client
- Role dashboards
frontend/src/App.jsx - Login and registration
frontend/src/context/AuthContext.jsx - Tenant dashboard
frontend/src/pages/TenantDashboard.jsx - Owner dashboard
frontend/src/pages/OwnerDashboard.jsx - Maintenance forms and lists
frontend/src/components/MaintenanceForm.jsx - Amenity slot booking
frontend/src/components/AmenityBookingPanel.jsx - Authenticated API client
frontend/src/api/axios.js - Socket connection
frontend/src/context/SocketContext.jsx
API and access
- Express and Socket server
backend/server.js - Authentication routes
backend/routes/auth.js - JWT and role checks
backend/middleware/auth.js
Rental operations
- Property routes
backend/routes/properties.js - Maintenance requests
backend/routes/maintenance.js - Amenity management
backend/routes/amenities.js - Booking and conflict checks
backend/routes/bookings.js - Tenant management
backend/routes/users.js
Persistence and realtime
- User records
backend/models/User.js - Property records
backend/models/Property.js - Maintenance records
backend/models/MaintenanceRequest.js - Amenity records
backend/models/Amenity.js - Booking records
backend/models/AmenityBooking.js
Other components
- Tenant
- Property owner
- MongoDB
- Socket.io transport
Connections 40
- Tenant → Role dashboards: uses
- Property owner → Role dashboards: uses
- Role dashboards → Login and registration: routes to
- Role dashboards → Tenant dashboard: routes to
- Role dashboards → Owner dashboard: routes to
- Login and registration → Authenticated API client: sends credentials
- Tenant dashboard → Authenticated API client: requests data
- Owner dashboard → Authenticated API client: requests data
- Tenant dashboard → Maintenance forms and lists: renders
- Tenant dashboard → Amenity slot booking: renders
- Amenity slot booking → Authenticated API client: loads and books
- Maintenance forms and lists → Authenticated API client: submits requests
- Role dashboards → Socket connection: provides
- Express and Socket server → Authentication routes: mounts
- Express and Socket server → Property routes: mounts
- Express and Socket server → Maintenance requests: mounts
- Express and Socket server → Amenity management: mounts
- Express and Socket server → Booking and conflict checks: mounts
- Express and Socket server → Tenant management: mounts
- Authenticated API client → Express and Socket server: HTTP requests
- Socket connection → Express and Socket server: connects
- Express and Socket server → JWT and role checks: uses
- Authentication routes → User records: reads and creates
- Authentication routes → Property records: creates or reads
- JWT and role checks → User records: loads user
- Property routes → Property records: reads and writes
- Maintenance requests → Maintenance records: reads and writes
- Amenity management → Amenity records: reads and writes
- Booking and conflict checks → Booking records: checks and creates
- Booking and conflict checks → Amenity records: checks amenity
- Tenant management → User records: manages tenants
- User records → MongoDB: persists
- Property records → MongoDB: persists
- Maintenance records → MongoDB: persists
- Amenity records → MongoDB: persists
- Booking records → MongoDB: persists
- Maintenance requests → Socket.io transport: emits updates
- Socket connection → Socket.io transport: joins rooms
- Socket.io transport → Tenant dashboard: delivers live events
- Socket.io transport → Owner dashboard: delivers live events