How dani-dina/hotel-management-system- works
Project type and purpose
• This is a full-stack web application for managing a combined restaurant/hospitality service (food & drink menus, room reservations, staff, inventory, orders, payments, etc.).
• Frontend: React (Vite) + Tailwind, Redux Toolkit for state, custom hooks, pages for Home, Dashboard, Reservations, Check-out, Profile, etc.
• Backend: Node.js/Express REST API, MVC pattern under src/{controllers,models,routes,services}, PostgreSQL/MySQL (inferred from database.config.js), JWT authentication, PayPal/Stripe integration.
File structure
• Top level: “frontend/” vs. “backend/” separation.
• Backend:
• config (DB, Stripe, PayPal)
• auth, middlewares (JWT)
• controllers (one per resource: orders, guests, menu items, rooms, employees, inventory, payments)
• routes (one per endpoint group)
• services (business logic)
• models (ORM schemas for relational tables)
• utility & validators
• tests (unit/integration)
• Frontend:
• public/assets
• src/components (UI building blocks)
• src/pages (route-level views)
• src/services/api.js (axios/fetch wrapper)
• src/store (Redux slices/thunks)
• constants, hooks
Elements
– Clear labels (e.g., “React SPA”, “Express API”, “PostgreSQL DB”, “Stripe Payments”)
• UI → API (HTTP/HTTPS)
• API → DB (SQL queries)
• API ↔ Stripe/PayPal (SDK/API calls & webhooks)
• Green for back-end layers
• Orange for external services
Detail without overthinking
• How they’re orchestrated by the API layer and surfaced in the UI.
• The goal is readability and complete coverage of all subsystems/components.