How business8281/citylifes_management_app works
This is a hostel and property management product with an Expo mobile/web client, a Firestore-backed Node API, and Firebase Functions. Owners configure properties and hostels, manage rooms, tenants, operations, and reports; tenants can find and join a hostel/property and use tenant workflows. The client also supports authentication, KYC, subscriptions and payments, agreements, and notifications. Source excerpts establish some wiring, while several product areas are represented by their exact tree directories because their screen implementations were not sampled.
Main entry points: server.js HTTP server and routing · AuthContext.tsx Session and identity · firebase.ts Hostel data access · (tabs) Management workspace
Components 30
Client workflows
- Sign-in and roles
frontend/app/(auth) - Owner setup and billing
frontend/app/(owner) - Tenant search and checkout
frontend/app/(tenant) - Management workspace
frontend/app/(tabs) - Tenant dashboards
frontend/components/tenant
Client foundations
- Session and identity
frontend/contexts/AuthContext.tsx - Hostel data access
frontend/lib/firebase.ts - Property data access
frontend/lib/propertyDb.ts - Client notifications
frontend/lib/notifications.ts - Local storage
frontend/lib/storage.ts - Agreement PDF
frontend/utils/pdfGenerator.ts - Screen layout
frontend/components/layout/ScreenWrapper.tsx - Loading skeleton
frontend/components/common/Skeleton.tsx - Responsive theme
frontend/utils/theme.ts
Node API
- HTTP server and routing
backend-node/server.js - Hostel routes
backend-node/routes/owner/hostels.js - Room routes
backend-node/routes/owner/rooms.js - Tenant routes
backend-node/routes/owner/tenants.js - Operations routes
backend-node/routes/owner/operations.js - Report routes
backend-node/routes/owner/reports.js - Scheduled jobs
backend-node/cron.js
Firebase services
- Functions API router
functions/src/api.ts - Function entry points
functions/src/index.ts - Notification services
functions/src/notifications.ts - FCM delivery
functions/src/sendFCMNotification.ts - Room routes
functions/src/routes/rooms.js - Operations routes
functions/src/routes/operations.js - Other domain routes
functions/src/routes
Property data
- Firebase Firestore
Other components
- Owners and tenants
Connections 37
- Owners and tenants → Sign-in and roles: sign in
- Owners and tenants → Owner setup and billing: configure account
- Owners and tenants → Tenant search and checkout: find and join
- Owners and tenants → Management workspace: manage lodging
- Sign-in and roles → Session and identity: uses identity
frontend/app/(auth)/index.tsx - Owner setup and billing → Session and identity: uses session
frontend/app/(owner)/managers.tsx - Tenant search and checkout → Hostel data access: searches hostels
frontend/app/(tenant)/hostel-search.tsx - Tenant search and checkout → Property data access: reads properties
frontend/app/(tenant)/hostel-search.tsx - Management workspace → Hostel data access: loads tenant data
frontend/app/(tabs)/tenants.tsx - Management workspace → Property data access: accesses property data
frontend/app/(tabs)/tenants.tsx - Management workspace → Client notifications: uses notifications
frontend/app/(tabs)/tenants.tsx - Management workspace → Agreement PDF: generates documents
frontend/app/(tabs)/tenants.tsx - Session and identity → Hostel data access: syncs profiles
frontend/contexts/AuthContext.tsx - Session and identity → Property data access: loads assignments
frontend/contexts/AuthContext.tsx - Session and identity → Local storage: uses storage
frontend/contexts/AuthContext.tsx - Session and identity → Client notifications: uses notifications
frontend/contexts/AuthContext.tsx - Property data access → Hostel data access: uses Firestore client
frontend/lib/propertyDb.ts - Hostel data access → Firebase Firestore: reads and writes
frontend/lib/firebase.ts - Property data access → Firebase Firestore: reads and writes
frontend/lib/propertyDb.ts - Client notifications → Hostel data access: uses data client
frontend/lib/notifications.ts - Screen layout → Responsive theme: uses colors
frontend/components/layout/ScreenWrapper.tsx - Loading skeleton → Responsive theme: uses theme
frontend/components/common/Skeleton.tsx - Tenant dashboards → Loading skeleton: renders loading
frontend/components/tenant/HostelTenantDashboard.tsx - HTTP server and routing → Hostel routes: mounts routes
backend-node/server.js - HTTP server and routing → Room routes: mounts routes
backend-node/server.js - HTTP server and routing → Tenant routes: mounts routes
backend-node/server.js - HTTP server and routing → Operations routes: mounts routes
backend-node/server.js - HTTP server and routing → Report routes: mounts routes
backend-node/server.js - HTTP server and routing → Scheduled jobs: starts scheduler
backend-node/server.js - Function entry points → Functions API router: registers API
functions/src/index.ts - Function entry points → Notification services: imports services
functions/src/index.ts - Function entry points → FCM delivery: imports sender
functions/src/index.ts - Functions API router → Room routes: mounts routes
functions/src/api.ts - Functions API router → Operations routes: mounts routes
functions/src/api.ts - Functions API router → Other domain routes: mounts routes
functions/src/api.ts - Notification services → Firebase Firestore: uses data store
- FCM delivery → Firebase Firestore: uses messaging data