How smitsavaliya-ctrl/pgproject works
StayNest helps students and working professionals discover PGs and hostels: visitors search by city and locality, filter listings, inspect property details, and compare or save options. The frontend also exposes authentication, student/owner dashboards, and a standalone admin experience. The Django REST backend documents property discovery and recommendations alongside booking, inquiry, review, complaint, authentication, and admin-statistics endpoints. The README describes a SQLite-backed full-stack setup, but sampled source does not establish how the frontend API module connects to the backend; that wiring is therefore left out.
Main entry points: main.js App router · appState.js Client state · adminDashboard.js Admin dashboard · city.js City results
Components 26
Discovery frontend
- App router
frontend/js/main.js - Home discovery
frontend/js/pages/home.js - Search filters
frontend/js/components/searchBar.js - City results
frontend/js/pages/city.js - Property details
frontend/js/pages/details.js - Compare stays
frontend/js/pages/compare.js - Saved stays
frontend/js/pages/wishlist.js - India map
frontend/js/components/IndiaMap.js - Property catalog
frontend/js/dataset.js - Client state
frontend/js/appState.js
Accounts and management
- Login and registration
frontend/js/pages/auth.js - Student dashboard
frontend/js/pages/studentDashboard.js - Owner dashboard
frontend/js/pages/ownerDashboard.js - Admin dashboard
frontend/js/pages/adminDashboard.js - Listing management
frontend/js/admin/views/adminListingsView.js - Location management
frontend/js/admin/views/adminLocationsView.js - Media management
frontend/js/admin/views/adminMediaView.js
REST backend
- Django API views
backend/api/views.py - API serializers
backend/api/serializers.py - Domain models
backend/api/models.py - Mongo listings API
backend/server.js - Booking records
backend/api/models.py - Inquiry and feedback
backend/api/models.py
Persistence
- SQLite database
backend/staynest_backend/settings.py - MongoDB Atlas
Other components
- Student or renter
Connections 28
- Student or renter → App router: opens app
- App router → Home discovery: routes to
- App router → City results: routes to
- App router → Property details: routes to
- App router → Compare stays: routes to
- App router → Login and registration: routes to
- App router → Student dashboard: routes to
- App router → Owner dashboard: routes to
- App router → Admin dashboard: routes to
- Home discovery → Search filters: renders
- Search filters → Client state: updates query
- City results → Property catalog: displays listings
- City results → Client state: reads query
- Property details → Client state: reads selection
- Compare stays → Client state: reads saved choices
- Saved stays → Client state: reads wishlist
- India map → City results: supports discovery
- Client state → Property catalog: loads catalog
- Admin dashboard → Listing management: renders listings
- Admin dashboard → Location management: renders locations
- Admin dashboard → Media management: renders media
- Listing management → Client state: normalizes listings
- Django API views → Domain models: queries and updates
- Django API views → API serializers: serializes responses
- Domain models → SQLite database: persists records
- Mongo listings API → MongoDB Atlas: reads listings
- Booking records → Domain models: defined in
- Inquiry and feedback → Domain models: defined in