How monalisonalkar2006/surtwala-canteen-frontend works
SurtwalaCanteen is an Angular canteen-ordering application with customer, admin, and staff areas. The visible customer journey runs from browsing food to managing a cart and checkout, with separate order, favorites, and review views. Authentication uses mock login and browser storage in the sampled service; the routes gate role-specific areas. Admin and staff capabilities are preserved as routed feature areas. Some feature-to-service links and backend behavior are not shown in the excerpts, so those relationships are omitted rather than inferred.
Main entry points: app.routes.ts Role routes · cart.service.ts Cart state · login.component.ts Login · register.component.ts Registration
Components 21
Application Entry
- App shell
src/app/app.ts - Role routes
src/app/app.routes.ts
Identity & Access
- Login
src/app/features/auth/login/login.component.ts - Registration
src/app/features/auth/register/register.component.ts - Authentication
src/app/core/services/auth.service.ts - Auth guard
src/app/core/guards/auth.guard.ts
Customer Ordering
- Home & discovery
src/app/features/customer/home/home.component.ts - Food menu
src/app/features/customer/menu/menu.component.ts - Cart view
src/app/features/customer/cart/cart.component.ts - Checkout
src/app/features/customer/checkout/checkout.component.ts - Customer orders
src/app/features/customer/orders/orders.component.ts - Favorites
src/app/features/customer/favorites/favorites.component.ts - Customer reviews
src/app/features/customer/reviews/reviews.component.ts
Canteen Operations
- Admin features
src/app/features/admin - Staff features
src/app/features/staff
Shared Services
- Cart state
src/app/core/services/cart.service.ts - Menu service
src/app/core/services/menu.service.ts - Order service
src/app/core/services/order.service.ts - Review service
src/app/core/services/review.service.ts - Notifications
src/app/core/services/notification.service.ts
Other components
- User
Connections 24
- User → App shell: opens
src/app/app.ts - App shell → Role routes: hosts routes
src/app/app.ts - Role routes → Login: routes to
src/app/app.routes.ts - Role routes → Registration: routes to
src/app/app.routes.ts - Login → Authentication: uses
src/app/features/auth/login/login.component.ts - Registration → Authentication: uses
src/app/features/auth/register/register.component.ts - Role routes → Auth guard: guards access
src/app/app.routes.ts - Auth guard → Authentication: checks identity
src/app/core/guards/auth.guard.ts - Role routes → Home & discovery: routes to
src/app/app.routes.ts - Role routes → Food menu: routes to
src/app/app.routes.ts - Role routes → Cart view: routes to
src/app/app.routes.ts - Role routes → Checkout: routes to
src/app/app.routes.ts - Role routes → Customer orders: routes to
src/app/app.routes.ts - Role routes → Favorites: routes to
src/app/app.routes.ts - Role routes → Customer reviews: routes to
src/app/app.routes.ts - Role routes → Admin features: routes to
src/app/app.routes.ts - Role routes → Staff features: routes to
src/app/app.routes.ts - Home & discovery → Cart state: adds food
src/app/features/customer/home/home.component.ts - Food menu → Cart state: adds food
src/app/features/customer/menu/menu.component.ts - Cart view → Cart state: manages cart
src/app/features/customer/cart/cart.component.ts - Checkout → Cart state: reads cart
src/app/features/customer/checkout/checkout.component.ts - Login → Notifications: notifies
src/app/features/auth/login/login.component.ts - Registration → Notifications: notifies
src/app/features/auth/register/register.component.ts - Cart view → Notifications: notifies
src/app/features/customer/cart/cart.component.ts