How sinungp/sewa-alat-outdoor works
CampCraft Outdoor is a camping-gear rental platform: customers browse equipment and bundles, choose rental dates, place and track bookings; staff authenticate to manage bookings, inventory, bundles, landing-page settings, FAQs, and staff accounts. The sampled backend confirms REST endpoints and a database abstraction with an in-memory fallback. The README documents the broader CMS and customer features, but frontend source excerpts were not provided, so frontend wiring is shown only at the documented page/API level.
Main entry points: server.js REST API · app.js Client behavior · db.js Storage adapter · index.html Rental site
Components 17
Customer rental
- Rental site
index.html - Client behavior
assets/js/app.js - Catalog data
assets/js/data.js - Rental state
assets/js/state.js - Client UI
assets/js/ui.js
Staff CMS
- Staff login
login.html - CMS dashboard
admin.html
REST backend
- REST API
server.js - Staff authentication
server.js - Bookings and tracking
server.js - Gear and bundles
server.js - Settings and FAQs
server.js - Staff management
server.js
Persistence
- Storage adapter
db.js - PostgreSQL
Other components
- Customer
- Staff
Connections 22
- Customer → Rental site: browses
- Rental site → Client behavior: runs
- Client behavior → Catalog data: uses catalog
- Client behavior → Rental state: updates rental
- Client behavior → Client UI: renders
- Client behavior → REST API: requests catalog and bookings
- REST API → Client behavior: returns API data
- Staff → Staff login: signs in
- Staff login → REST API: submits credentials
- Staff → CMS dashboard: manages rentals
- CMS dashboard → REST API: calls protected APIs
- REST API → Staff authentication: checks identity and roles
- REST API → Bookings and tracking: handles booking and tracking
- REST API → Gear and bundles: serves and manages gear
- REST API → Settings and FAQs: manages settings and FAQs
- REST API → Staff management: manages staff accounts
- Staff authentication → Storage adapter: reads and writes users
- Bookings and tracking → Storage adapter: reads and writes bookings
- Gear and bundles → Storage adapter: reads and writes catalog
- Settings and FAQs → Storage adapter: reads and writes content
- Staff management → Storage adapter: reads and writes users
- Storage adapter → PostgreSQL: queries when connected