How bernatzx/ass-1911107 works
This is a PHP geographic information system for mapping clove-tree locations. Its user-facing stages include browsing the home page and interactive map, and (for administrators) managing tree types and mapped locations; authentication controls administrator access. API endpoints dispatch requests to handlers, handlers apply domain checks and operations through models, and models use the MySQL connection. The excerpts show location-list API use and shared-layout wiring; map data-loading details are not shown, so no map-to-data flow is asserted.
Main entry points: header.php Page header · footer.php Shared footer · db.php Database connection · index.php Location list
Components 25
Web interface
- Application entry
index.php - Page header
src/layout/header.php - Role navigation
src/components/navbar.php - Site branding
src/components/logo.php - Shared footer
src/layout/footer.php - Home dashboard
src/views/beranda/index.php - Interactive map
src/views/peta/index.php - Location list
src/views/lokasi/index.php - Location editor
src/views/lokasi/form.php - Tree-type list
src/views/jenis-pohon/index.php - Tree-type editor
src/views/jenis-pohon/form.php - Admin login
src/views/auth/login.php
API and domain
- Authentication API
api/auth.php - Location API
api/lokasi.php - Tree-type API
api/jenis.php - Admin handler
app/handlers/AdminHandler.php - Location handler
app/handlers/LokasiHandler.php - Tree-type handler
app/handlers/JPohonHandler.php
Persistence
- Admin model
app/models/AdminModel.php - Location model
app/models/LokasiModel.php - Tree-type model
app/models/JPohonModel.php - Database connection
app/db.php
Other components
- Visitor or admin
- MySQL database
- Leaflet library
Connections 33
- Visitor or admin → Application entry: opens app
- Application entry → Page header: loads app setup
index.php - Home dashboard → Page header: renders header
src/views/beranda/index.php - Home dashboard → Shared footer: renders footer
src/views/beranda/index.php - Interactive map → Page header: renders header
src/views/peta/index.php - Interactive map → Shared footer: renders footer
src/views/peta/index.php - Location list → Page header: renders header
src/views/lokasi/index.php - Location list → Shared footer: renders footer
src/views/lokasi/index.php - Location list → Location API: fetches data
src/views/lokasi/index.php - Location editor → Page header: renders header
src/views/lokasi/form.php - Location editor → Shared footer: renders footer
src/views/lokasi/form.php - Tree-type list → Page header: renders header
src/views/jenis-pohon/index.php - Tree-type list → Shared footer: renders footer
src/views/jenis-pohon/index.php - Tree-type editor → Page header: renders header
src/views/jenis-pohon/form.php - Tree-type editor → Shared footer: renders footer
src/views/jenis-pohon/form.php - Admin login → Page header: uses setup
src/views/auth/login.php - Page header → Site branding: includes
src/layout/header.php - Page header → Role navigation: includes
src/layout/header.php - Page header → Leaflet library: loads library
src/layout/header.php - Shared footer → Authentication API: checks session
src/layout/footer.php - Shared footer → Authentication API: requests logout
src/layout/footer.php - Shared footer → Location API: counts locations
src/layout/footer.php - Shared footer → Tree-type API: counts types
src/layout/footer.php - Authentication API → Admin handler: dispatches actions
api/auth.php - Location API → Location handler: dispatches requests
api/lokasi.php - Tree-type API → Tree-type handler: dispatches requests
api/jenis.php - Admin handler → Admin model: queries admin
app/handlers/AdminHandler.php - Location handler → Location model: uses model
app/handlers/LokasiHandler.php - Tree-type handler → Tree-type model: uses model
app/handlers/JPohonHandler.php - Admin model → Database connection: queries through
app/models/AdminModel.php - Location model → Database connection: queries through
app/models/LokasiModel.php - Tree-type model → Database connection: queries through
app/models/JPohonModel.php - Database connection → MySQL database: connects to
app/db.php