How zenhosta/niagakita-toko-online works
NiagaKita is a PHP online store. Shoppers browse products, manage a cart, and reach checkout; checkout supports manual or RajaOngkir shipping and a WhatsApp-based order flow documented in the README. Admins manage the catalog, discounts, stock, orders, and storefront appearance. Installation initializes the database and locks the installer. The sampled code supports the main request, catalog, cart, shipping, admin, and setup links; unsampled order, authentication, and stock-opname details are represented only at their documented subsystem paths.
Main entry points: Router.php Router · StoreController.php Store actions · Database.php Database access · AdminController.php Admin actions
Components 21
Request runtime
- Web entry
public/index.php - Bootstrap
bootstrap/app.php - Application
app/Core/Application.php - Router
app/Core/Router.php - Web routes
routes/web.php - Database access
app/Core/Database.php
Storefront shopping
- Store actions
app/Controllers/StoreController.php - Store pages
app/Views/storefront - Session cart
app/Controllers/StoreController.php - Checkout and orders
app/Controllers/StoreController.php
Store management
- Admin actions
app/Controllers/AdminController.php - Appearance settings
app/Controllers/AppearanceController.php - Admin pages
app/Views/admin - Authentication
app/Controllers/AuthController.php - Login throttling
app/Services/LoginThrottle.php
Setup and integrations
- Web installer
app/Controllers/InstallController.php - Shipping service
app/Services/RajaOngkirService.php
Other components
- Shopper
- WhatsApp ordering
- RajaOngkir API
- MySQL store
Connections 27
- Shopper → Web entry: requests pages
- Web entry → Bootstrap: loads app
- Bootstrap → Application: creates
- Bootstrap → Web routes: registers routes
- Application → Router: dispatches
- Router → Store actions: dispatches store routes
- Router → Admin actions: dispatches admin routes
- Router → Appearance settings: dispatches appearance routes
- Router → Authentication: dispatches auth routes
- Router → Web installer: dispatches install routes
- Store actions → Database access: queries catalog
- Store actions → Session cart: updates cart
- Session cart → Database access: loads cart items
- Store actions → Checkout and orders: starts checkout
- Checkout and orders → Shipping service: requests rates
- Shipping service → RajaOngkir API: calls API
- Checkout and orders → WhatsApp ordering: continues order
- Store actions → Store pages: renders pages
- Admin actions → Database access: reads and writes
- Appearance settings → Database access: saves settings
- Admin actions → Admin pages: renders pages
- Appearance settings → Admin pages: renders settings
- Authentication → Login throttling: checks attempts
- Authentication → Database access: checks credentials
- Web installer → Database access: creates schema and data
- Store actions → MySQL store: reads product data
- Admin actions → MySQL store: manages store data