How yiheng-471/final-year-project works
FYP is a Laravel/Inertia perfume storefront with account and address management, product discovery, cart and Stripe checkout, reviews, and questionnaire-based recommendations. The main customer flow is browser requests through web routes to controllers, which read or update domain models; checkout creates order/payment state before opening Stripe Checkout, with a webhook handling payment events. The tree also contains a separate Python ML directory, but the supplied evidence does not establish how it connects to Laravel. Unsampled page and model internals are represented only where the tree or source index supports them.
Main entry points: web.php Web routes · OrderController.php Order checkout · RegisterController.php Registration · User.php User account
Components 28
Storefront experience
- Web routes
FYP/routes/web.php
Commerce domain
- Product catalog
FYP/app/Http/Controllers/ProductController.php - Perfume items
FYP/app/Models/PerfumeItem.php - Cart handling
FYP/app/Http/Controllers/CartController.php - Cart records
FYP/app/Models/Cart.php - Cart items
FYP/app/Models/CartItem.php - Order checkout
FYP/app/Http/Controllers/OrderController.php - Orders
FYP/app/Models/Order.php - Order items
FYP/app/Models/OrderItem.php - Payments
FYP/app/Models/Payment.php - Stripe checkout
FYP/app/Services/StripeCheckoutService.php - Payment webhook
FYP/app/Http/Controllers/StripeWebhookController.php - Review handling
FYP/app/Http/Controllers/ReviewController.php - Perfume reviews
FYP/app/Models/PerfumeReview.php
Customer accounts
- Authentication
FYP/app/Http/Controllers/Auth/LoginController.php - Registration
FYP/app/Http/Controllers/Auth/RegisterController.php - Profile management
FYP/app/Http/Controllers/ProfileController.php - User account
FYP/app/Models/User.php - Addresses
FYP/app/Models/Address.php - States
FYP/app/Models/State.php - Email verification
FYP/app/Http/Controllers/VerificationController.php
Recommendations
- Recommendation flow
FYP/app/Http/Controllers/RecommendationController.php - Preference questionnaire
FYP/app/Http/Controllers/QuestionnaireController.php - Recommendation service
FYP/app/Services/RecommendationService.php - Questionnaire preferences
FYP/app/Models/QuestionnairePreference.php - ML API
ml/api.py
Other components
- Customer
- Stripe
Connections 36
- Customer → Web routes: requests
FYP/routes/web.php - Web routes → Product catalog: routes to
FYP/routes/web.php - Web routes → Cart handling: routes to
FYP/routes/web.php - Web routes → Order checkout: routes to
FYP/routes/web.php - Web routes → Payment webhook: routes to
FYP/routes/web.php - Web routes → Review handling: routes to
FYP/routes/web.php - Web routes → Authentication: routes to
FYP/routes/web.php - Web routes → Registration: routes to
FYP/routes/web.php - Web routes → Profile management: routes to
FYP/routes/web.php - Web routes → Email verification: routes to
FYP/routes/web.php - Web routes → Recommendation flow: routes to
FYP/routes/web.php - Web routes → Preference questionnaire: routes to
FYP/routes/web.php - Product catalog → Perfume items: queries
FYP/app/Http/Controllers/ProductController.php - Cart handling → Cart records: queries
FYP/app/Http/Controllers/CartController.php - Cart handling → Cart items: updates
FYP/app/Http/Controllers/CartController.php - Order checkout → Cart records: loads
FYP/app/Http/Controllers/OrderController.php - Order checkout → Orders: creates
FYP/app/Http/Controllers/OrderController.php - Order checkout → Order items: inserts
FYP/app/Http/Controllers/OrderController.php - Order checkout → Payments: creates
FYP/app/Http/Controllers/OrderController.php - Order checkout → Stripe checkout: opens checkout
FYP/app/Http/Controllers/OrderController.php - Stripe checkout → Stripe: creates session
FYP/app/Services/StripeCheckoutService.php - Payment webhook → Stripe checkout: constructs event
FYP/app/Http/Controllers/StripeWebhookController.php - Payment webhook → Payments: updates
FYP/app/Http/Controllers/StripeWebhookController.php - Review handling → Orders: checks purchase
FYP/app/Http/Controllers/ReviewController.php - Review handling → Perfume reviews: writes
FYP/app/Http/Controllers/ReviewController.php - Authentication → User account: authenticates
FYP/app/Http/Controllers/Auth/LoginController.php - Registration → User account: creates
FYP/app/Http/Controllers/Auth/RegisterController.php - Registration → Addresses: optionally creates
FYP/app/Http/Controllers/Auth/RegisterController.php - Registration → States: loads
FYP/app/Http/Controllers/Auth/RegisterController.php - Profile management → User account: updates
FYP/app/Http/Controllers/ProfileController.php - Profile management → Addresses: manages
FYP/app/Http/Controllers/ProfileController.php - Email verification → User account: verifies
FYP/app/Http/Controllers/VerificationController.php - Recommendation flow → Recommendation service: calls
FYP/app/Http/Controllers/RecommendationController.php - Recommendation flow → Perfume items: queries
FYP/app/Http/Controllers/RecommendationController.php - Recommendation service → Questionnaire preferences: reads
FYP/app/Services/RecommendationService.php - Preference questionnaire → Questionnaire preferences: manages