How harshaprasadreddy13/restaurant-full-stack works
This repository implements a restaurant ordering application: customers browse food, manage a cart, place and review orders, while admins manage food and orders; account registration, login, and password recovery support those flows. The frontend route table and authentication implementation are excerpted, but most controllers, domain services, and customer/admin screens are not. Accordingly, unverified frontend-to-API and backend service links are dashed; solid edges are limited to relationships visible in excerpts or the SOURCE INDEX.
Main entry points: api.js HTTP client · AppRoutes.jsx Web routes · AuthServiceImpl.java Account and recovery · FoodRepository.java Food and order stores
Components 27
Customer and admin web app
- Web routes
restaurant-frontend-fixed/restaurant-frontend/src/routes/AppRoutes.jsx - Navigation
restaurant-frontend-fixed/restaurant-frontend/src/components/Navbar.jsx - Login and signup
restaurant-frontend-fixed/restaurant-frontend/src/pages/auth/Login.jsx - Food browsing
restaurant-frontend-fixed/restaurant-frontend/src/pages/customer/Home.jsx - Cart and checkout
restaurant-frontend-fixed/restaurant-frontend/src/pages/customer/Cart.jsx - Order history
restaurant-frontend-fixed/restaurant-frontend/src/pages/customer/OrderHistory.jsx - Admin console
restaurant-frontend-fixed/restaurant-frontend/src/pages/admin/Admin.jsx - Session state
restaurant-frontend-fixed/restaurant-frontend/src/context/AuthContext.jsx - HTTP client
restaurant-frontend-fixed/restaurant-frontend/src/api/api.js
Backend API
- Authentication API
restaurant-backend-fixed/restaurant/src/main/java/com/hotel/restaurant/controller/AuthController.java - Food API
restaurant-backend-fixed/restaurant/src/main/java/com/hotel/restaurant/controller/FoodController.java - Cart API
restaurant-backend-fixed/restaurant/src/main/java/com/hotel/restaurant/controller/CartController.java - Order API
restaurant-backend-fixed/restaurant/src/main/java/com/hotel/restaurant/controller/OrderController.java - Admin API
restaurant-backend-fixed/restaurant/src/main/java/com/hotel/restaurant/controller/AdminController.java
Identity and access
- Account and recovery
restaurant-backend-fixed/restaurant/src/main/java/com/hotel/restaurant/service/impl/AuthServiceImpl.java - JWT service
restaurant-backend-fixed/restaurant/src/main/java/com/hotel/restaurant/security/jwt/JwtService.java - User identity lookup
restaurant-backend-fixed/restaurant/src/main/java/com/hotel/restaurant/security/userDetails/CustomUserDetailsService.java
Food and ordering
- Food catalog
restaurant-backend-fixed/restaurant/src/main/java/com/hotel/restaurant/service/impl/FoodServiceImpl.java - Cart management
restaurant-backend-fixed/restaurant/src/main/java/com/hotel/restaurant/service/impl/CartServiceImpl.java - Order processing
restaurant-backend-fixed/restaurant/src/main/java/com/hotel/restaurant/service/impl/OrderServiceImpl.java - Admin operations
restaurant-backend-fixed/restaurant/src/main/java/com/hotel/restaurant/service/impl/AdminServiceImpl.java
Persistence and integrations
- User records
restaurant-backend-fixed/restaurant/src/main/java/com/hotel/restaurant/enitity/User.java - User repository
restaurant-backend-fixed/restaurant/src/main/java/com/hotel/restaurant/repository/UserRepository.java - Food and order stores
restaurant-backend-fixed/restaurant/src/main/java/com/hotel/restaurant/repository/FoodRepository.java - Email delivery
restaurant-backend-fixed/restaurant/src/main/java/com/hotel/restaurant/email/MailService.java - Image storage
restaurant-backend-fixed/restaurant/src/main/java/com/hotel/restaurant/service/impl/FileStorageServiceImpl.java
Other components
- Customer or admin
Connections 33
- Customer or admin → Web routes: uses
- Web routes → Navigation: renders
restaurant-frontend-fixed/restaurant-frontend/src/routes/AppRoutes.jsx - Web routes → Login and signup: routes to
restaurant-frontend-fixed/restaurant-frontend/src/routes/AppRoutes.jsx - Web routes → Food browsing: routes to
restaurant-frontend-fixed/restaurant-frontend/src/routes/AppRoutes.jsx - Web routes → Cart and checkout: routes to
restaurant-frontend-fixed/restaurant-frontend/src/routes/AppRoutes.jsx - Web routes → Order history: routes to
restaurant-frontend-fixed/restaurant-frontend/src/routes/AppRoutes.jsx - Web routes → Admin console: routes to
restaurant-frontend-fixed/restaurant-frontend/src/routes/AppRoutes.jsx - Login and signup → Session state: updates session
- Login and signup → HTTP client: submits credentials
- Food browsing → HTTP client: requests food
- Cart and checkout → HTTP client: manages cart
- Order history → HTTP client: requests orders
- Admin console → HTTP client: manages catalog
- HTTP client → Authentication API: HTTP requests
- HTTP client → Food API: HTTP requests
- HTTP client → Cart API: HTTP requests
- HTTP client → Order API: HTTP requests
- HTTP client → Admin API: HTTP requests
- Authentication API → Account and recovery: delegates
- Food API → Food catalog: delegates
- Cart API → Cart management: delegates
- Order API → Order processing: delegates
- Admin API → Admin operations: delegates
- Account and recovery → User repository: reads and writes
restaurant-backend-fixed/restaurant/src/main/java/com/hotel/restaurant/service/impl/AuthServiceImpl.java - Account and recovery → JWT service: creates token
restaurant-backend-fixed/restaurant/src/main/java/com/hotel/restaurant/service/impl/AuthServiceImpl.java - Account and recovery → Email delivery: sends reset OTP
restaurant-backend-fixed/restaurant/src/main/java/com/hotel/restaurant/service/impl/AuthServiceImpl.java - User identity lookup → User repository: looks up user
restaurant-backend-fixed/restaurant/src/main/java/com/hotel/restaurant/security/userDetails/CustomUserDetailsService.java - User repository → User records: loads records
restaurant-backend-fixed/restaurant/src/main/java/com/hotel/restaurant/security/userDetails/CustomUserDetailsService.java - Food catalog → Food and order stores: uses catalog
- Cart management → Food and order stores: uses order stores
- Order processing → Food and order stores: uses order stores
- Admin operations → Food and order stores: uses catalog
- Food catalog → Image storage: stores images