How galih1250/apotek works
Apotek is a pharmacy storefront with customer accounts, product discovery and administration, and online payment processing. A customer browses or searches the catalog, opens a product, and submits a payment; the store delegates payment creation to the payment controller, which coordinates transaction state and Midtrans. Customers can view payment results and history, while callbacks update transactions and invoice handling stores or serves PDFs. The tree and excerpts support these main flows; several route and view connections are documented only by the source index, so uncertain links are omitted.
Main entry points: PaymentController.php Payment workflow · web.php Web routes · StoreController.php Store browsing · ProductController.php Product administration
Components 22
Storefront
- Web routes
apotek/routes/web.php - Store browsing
apotek/app/Http/Controllers/StoreController.php - Store views
apotek/resources/views/store
Commerce and payments
- Payment workflow
apotek/app/Http/Controllers/PaymentController.php - Transactions
apotek/app/Models/Transaction.php - Midtrans adapter
apotek/app/Services/MidtransService.php - Payment views
apotek/resources/views/payment - Invoice storage
Accounts
- Auth routes
apotek/routes/auth.php - Registration
apotek/app/Http/Controllers/Auth/RegisteredUserController.php - Login
apotek/app/Http/Controllers/Auth/AuthenticatedSessionController.php - Login validation
apotek/app/Http/Requests/Auth/LoginRequest.php - reCAPTCHA rule
apotek/app/Rules/RecaptchaV2.php - User accounts
apotek/app/Models/User.php - Profile management
apotek/app/Http/Controllers/ProfileController.php
Catalog administration
- Product catalog
apotek/app/Models/Product.php - Categories
apotek/app/Models/Category.php - Product administration
apotek/app/Http/Controllers/ProductController.php - Admin views
apotek/resources/views/admin
Other components
- Customer
- Midtrans
- Invoice PDF source
Connections 28
- Customer → Web routes: sends requests
apotek/routes/web.php - Web routes → Store browsing: routes to
apotek/routes/web.php - Store browsing → Product catalog: queries
apotek/app/Http/Controllers/StoreController.php - Store browsing → Categories: queries
apotek/app/Http/Controllers/StoreController.php - Store browsing → Store views: renders
apotek/app/Http/Controllers/StoreController.php - Web routes → Product administration: routes to
apotek/routes/web.php - Product administration → Product catalog: creates and updates
apotek/app/Http/Controllers/ProductController.php - Product administration → Categories: queries
apotek/app/Http/Controllers/ProductController.php - Product administration → Admin views: renders
apotek/app/Http/Controllers/ProductController.php - Customer → Auth routes: sends requests
apotek/routes/auth.php - Auth routes → Registration: routes to
apotek/routes/auth.php - Auth routes → Login: routes to
apotek/routes/auth.php - Registration → User accounts: creates account
apotek/app/Http/Controllers/Auth/RegisteredUserController.php - Registration → reCAPTCHA rule: validates with
apotek/app/Http/Controllers/Auth/RegisteredUserController.php - Login → Login validation: authenticates through
apotek/app/Http/Controllers/Auth/AuthenticatedSessionController.php - Login validation → reCAPTCHA rule: uses rule
apotek/app/Http/Requests/Auth/LoginRequest.php - Web routes → Profile management: routes to
apotek/routes/web.php - Profile management → User accounts: updates
apotek/app/Http/Controllers/ProfileController.php - Web routes → Payment workflow: routes to
apotek/routes/web.php - Store browsing → Payment workflow: delegates payment
apotek/app/Http/Controllers/StoreController.php - Payment workflow → Transactions: reads and updates
apotek/app/Http/Controllers/PaymentController.php - Payment workflow → User accounts: reads
apotek/app/Http/Controllers/PaymentController.php - Payment workflow → Midtrans adapter: requests payment status
apotek/app/Http/Controllers/PaymentController.php - Midtrans adapter → Midtrans: calls payment API
apotek/app/Services/MidtransService.php - Payment workflow → Payment views: renders results
apotek/app/Http/Controllers/PaymentController.php - Payment workflow → Invoice storage: stores and reads PDFs
apotek/app/Http/Controllers/PaymentController.php - Payment workflow → Invoice PDF source: fetches invoice
apotek/app/Http/Controllers/PaymentController.php - Payment workflow → Midtrans: receives notifications