How bin0106/phantriduc24ct1-cnpm works
UniLife is a student-life discovery and community SPA: users browse housing, food, second-hand goods, entertainment and study resources, then use account, favorites, contact/chat and profile features; owners can submit listings and admins moderate them. The main src/App.jsx owns navigation and application state, with views and modal components providing the user-facing stages and browser LocalStorage providing persistence. The README also describes a separate demo app and role-based administration. The tree contains no database files, so the documented MySQL design is not represented as a runtime component. Some view and service links are documented or indexed rather than verified in full source.
Main entry points: src/App.jsx Application shell · HomeView.jsx Home discovery · src/App.jsx Demo app shell · PlaceCard.jsx Listing cards
Components 33
Main application
- Application shell
src/App.jsx
Discovery views
- Home discovery
src/views/HomeView.jsx - Housing listings
src/views/HousingView.jsx - Food listings
src/views/FoodView.jsx - Marketplace
src/views/MarketView.jsx - Entertainment
src/views/EntertainmentView.jsx - Study resources
src/views/StudyView.jsx - Saved listings
src/views/FavoritesView.jsx - User profile
src/views/ProfileView.jsx - Admin moderation
src/views/AdminView.jsx
User interactions
- Listing cards
src/components/cards/PlaceCard.jsx - Food card
src/components/cards/FoodCard.jsx - Product card
src/components/cards/ProductCard.jsx - Entertainment card
src/components/cards/EntCard.jsx - Authentication
src/components/modals/AuthModal.jsx - Listing details
src/components/modals/DetailModal.jsx - Messaging
src/components/modals/ChatModal.jsx - Contact details
src/components/modals/ContactModal.jsx - Listing submission
src/components/modals/AddHousingModal.jsx - Market submission
src/components/modals/AddMarketModal.jsx - Notifications
src/components/modals/NotificationModal.jsx
Data and persistence
- Initial content
src/data/initialData.js - Categories and theme
src/data/theme.js - Persistent state
src/hooks/usePersistentState.js - Browser storage
- Auth business logic
src/services/authService.js - Post moderation logic
src/services/postService.js - User account logic
src/services/userService.js
Demo application
- Demo app shell
unilife-demo/src/App.jsx - Demo content
unilife-demo/src/data/mockData.js - Demo administration
unilife-demo/src/components/AdminView.jsx - Demo listing form
unilife-demo/src/components/AddLocationModal.jsx
Other components
- Student or owner
Connections 29
- Student or owner → Application shell: uses
- Application shell → Home discovery: routes to
src/App.jsx - Application shell → Housing listings: routes to
src/App.jsx - Application shell → Food listings: routes to
src/App.jsx - Application shell → Marketplace: routes to
src/App.jsx - Application shell → Entertainment: routes to
src/App.jsx - Application shell → Study resources: routes to
src/App.jsx - Application shell → Saved listings: routes to
src/App.jsx - Application shell → User profile: routes to
src/App.jsx - Application shell → Admin moderation: routes to
src/App.jsx - Application shell → Persistent state: loads and saves
src/App.jsx - Persistent state → Browser storage: reads and writes
src/hooks/usePersistentState.js - Application shell → Initial content: initializes listings
src/App.jsx - Application shell → Authentication: renders
src/App.jsx - Application shell → Messaging: renders
src/App.jsx - Application shell → Notifications: renders
src/App.jsx - Home discovery → Listing cards: renders
src/views/HomeView.jsx - Home discovery → Food card: renders
src/views/HomeView.jsx - Home discovery → Product card: renders
src/views/HomeView.jsx - Housing listings → Listing cards: renders
src/views/HousingView.jsx - Listing cards → Listing details: opens
- Application shell → Listing details: renders
src/App.jsx - Application shell → Contact details: renders
src/App.jsx - Application shell → Listing submission: renders
src/App.jsx - Application shell → Market submission: renders
src/App.jsx - Student or owner → Demo app shell: uses
- Demo app shell → Demo content: loads
unilife-demo/src/App.jsx - Demo app shell → Demo administration: renders
unilife-demo/src/App.jsx - Demo app shell → Demo listing form: renders
unilife-demo/src/App.jsx