How deeksha0219/madlab1 works
MADLAB1 is a campus food-ordering mobile app with a small Express backend. Its principal user flow is account setup and role selection, browsing canteen food by category, adding items to a cart, and proceeding through payment, confirmation, and order history. The app also exposes profile/account screens and separate admin/library menu screens. The backend provides OTP endpoints and in-memory cart and order routes. The excerpts show Firestore reads/writes from selected browsing screens, but do not establish how the other screens or backend APIs connect; those links are omitted.
Main entry points: AppNavigator.tsx App navigation · Studentstyles.ts Screen styles · CartScreen.tsx Cart screen · HomeScreen.tsx Food home
Components 23
Mobile app
- App entry
App.tsx - App navigation
src/navigation/AppNavigator.tsx - Splash
src/screens/SplashScreen.tsx - Account setup
src/screens/AccountScreen.tsx - Role login
src/screens/LoginScreen.tsx - Profile
src/screens/ProfilScreen.tsx
Food browsing
- Food home
src/screens/HomeScreen.tsx - Food category
src/screens/CategoryScreen.tsx - Admin block menu
src/screens/MMAdminBlockScreen.tsx - Admin category
src/screens/MMAdminCategoryScreen.tsx - Library menu
src/screens/MMLibraryScreen.tsx - Library category
src/screens/MMLibraryCategoryScreen.tsx
Cart and orders
- Cart screen
src/screens/CartScreen.tsx - Payment
src/screens/PaymentScreen.tsx - Order confirmation
src/screens/OrderConfirmedScreen.tsx - Order history
src/screens/OrderHistoryScreen.tsx
Backend services
- Express server
backend/server.js - Cart routes
backend/routes/cartRoutes.js - Order routes
backend/routes/orderRoutes.js
Shared UI state
- Cart context
src/screens/CartContext.tsx - Screen styles
src/styles/Studentstyles.ts
Other components
- Student
- Cloud Firestore
Connections 36
- Student → App entry: uses
- App entry → App navigation: renders
App.tsx - App entry → Cart context: wraps with
App.tsx - App navigation → Splash: routes to
src/navigation/AppNavigator.tsx - App navigation → Account setup: routes to
src/navigation/AppNavigator.tsx - App navigation → Role login: routes to
src/navigation/AppNavigator.tsx - App navigation → Profile: routes to
src/navigation/AppNavigator.tsx - App navigation → Food home: routes to
src/navigation/AppNavigator.tsx - App navigation → Food category: routes to
src/navigation/AppNavigator.tsx - App navigation → Cart screen: routes to
src/navigation/AppNavigator.tsx - App navigation → Payment: routes to
src/navigation/AppNavigator.tsx - App navigation → Order confirmation: routes to
src/navigation/AppNavigator.tsx - App navigation → Order history: routes to
src/navigation/AppNavigator.tsx - App navigation → Admin block menu: routes to
src/navigation/AppNavigator.tsx - App navigation → Admin category: routes to
src/navigation/AppNavigator.tsx - App navigation → Library menu: routes to
src/navigation/AppNavigator.tsx - App navigation → Library category: routes to
src/navigation/AppNavigator.tsx - Food home → Cloud Firestore: updates cart
src/screens/HomeScreen.tsx - Food category → Cloud Firestore: reads menu; updates cart
src/screens/CategoryScreen.tsx - Library menu → Cloud Firestore: updates cart
src/screens/MMLibraryScreen.tsx - Food home → Cart screen: opens cart
src/screens/HomeScreen.tsx - Food category → Cart screen: opens cart
src/screens/CategoryScreen.tsx - Library menu → Cart screen: opens cart
src/screens/MMLibraryScreen.tsx - Express server → Cart routes: mounts routes
backend/server.js - Express server → Order routes: mounts routes
backend/server.js - Account setup → Screen styles: uses styles
src/screens/AccountScreen.tsx - Role login → Screen styles: uses styles
src/screens/LoginScreen.tsx - Food home → Screen styles: uses styles
src/screens/HomeScreen.tsx - Food category → Screen styles: uses styles
src/screens/CategoryScreen.tsx - Admin block menu → Screen styles: uses styles
src/screens/MMAdminBlockScreen.tsx - Admin category → Screen styles: uses styles
src/screens/MMAdminCategoryScreen.tsx - Library menu → Screen styles: uses styles
src/screens/MMLibraryScreen.tsx - Library category → Screen styles: uses styles
src/screens/MMLibraryCategoryScreen.tsx - Cart screen → Screen styles: uses styles
src/screens/CartScreen.tsx - Order confirmation → Screen styles: uses styles
src/screens/OrderConfirmedScreen.tsx - Order history → Screen styles: uses styles
src/screens/OrderHistoryScreen.tsx