How razannabilwebdev/final-project-pbw works
Groceria is a PHP/MySQL web application for running a small grocery shop. Staff authenticate and enter role-specific dashboards; administrators manage inventory, suppliers, users, reports, and purchasing, while cashiers handle sales and customer records. A sale selects products and a customer, builds a cart, calculates discounts and change, and submits the transaction; reports and dashboards monitor shop activity. The excerpts confirm selected page-to-database and template dependencies. Other business capabilities are documented in the README, but their internal calls were not sampled, so those links are shown as unverified.
Main entry points: koneksi.php MySQL database · transaksi/index.php Sale entry and cart · session.php Session and roles · barang/index.php Inventory and stock
Components 27
Access and Accounts
- Sign in
login.php - Registration
register.php - OTP verification
verify_otp.php - OTP email flow
config/send_otp.php - OTP validation
config/verify_otp.php - User management
user/index.php
Shop Operations
- Admin dashboard
dashboard/admin.php - Cashier dashboard
dashboard/kasir.php - Inventory and stock
barang/index.php - Item editing
barang/edit_barang.php - Item creation
barang/tambah_barang.php - Stock purchasing
barang/pembelian.php - Supplier management
supplier/index.php - Customer and points
pelanggan/index.php
Sales and Reporting
- Sale entry and cart
transaksi/index.php - Product lookup
transaksi/cari_barang.php - Customer lookup
transaksi/cari_pelanggan.php - Transaction processing
transaksi/proses_transaksi.php - Sales history
transaksi/riwayat.php - Receipt printing
transaksi/cetak_struk.php - Sales reports
laporan/laporan.php - Report printing
laporan/cetak_laporan.php
Shared Infrastructure
- MySQL database
config/koneksi.php - Session and roles
config/session.php - Email delivery
config/mailer.php - Navigation and layout
templates/sidebar.php
Other components
- Shop staff
Connections 35
- Shop staff → Sign in: signs in
login.php - Shop staff → Registration: creates account
- Shop staff → OTP verification: submits code
- Sign in → MySQL database: checks account
login.php - Sign in → Session and roles: uses roles
login.php - Registration → MySQL database: saves account
register.php - Registration → Session and roles: uses session
register.php - OTP email flow → MySQL database: checks code
config/send_otp.php - OTP email flow → Email delivery: sends email
config/send_otp.php - OTP verification → OTP validation: submits code
- User management → MySQL database: reads users
user/index.php - User management → Session and roles: checks admin
user/index.php - Admin dashboard → MySQL database: reads metrics
dashboard/admin.php - Cashier dashboard → MySQL database: reads metrics
dashboard/kasir.php - Inventory and stock → MySQL database: reads inventory
barang/index.php - Inventory and stock → Session and roles: checks roles
barang/index.php - Inventory and stock → Navigation and layout: includes navigation
barang/index.php - Item editing → MySQL database: loads item
barang/edit_barang.php - Item creation → MySQL database: writes item
barang/tambah_barang.php - Stock purchasing → MySQL database: uses database
barang/pembelian.php - Supplier management → MySQL database: uses database
supplier/index.php - Customer and points → MySQL database: reads customers
pelanggan/index.php - Customer and points → Session and roles: checks roles
pelanggan/index.php - Sale entry and cart → MySQL database: loads customers
transaksi/index.php - Sale entry and cart → Session and roles: checks login
transaksi/index.php - Sale entry and cart → Product lookup: searches products
- Sale entry and cart → Customer lookup: searches customers
- Sale entry and cart → Transaction processing: posts cart
transaksi/index.php - Transaction processing → MySQL database: records sale
transaksi/proses_transaksi.php - Sales history → MySQL database: reads sales
transaksi/riwayat.php - Receipt printing → MySQL database: reads transaction
transaksi/cetak_struk.php - Sales reports → MySQL database: queries sales
laporan/laporan.php - Sales reports → Report printing: offers print
- Admin dashboard → Navigation and layout: includes navigation
dashboard/admin.php - Cashier dashboard → Navigation and layout: includes navigation
dashboard/kasir.php