A full-stack lodge booking and administration MVP built as a simple monorepo.
- Frontend: React + Vite + JavaScript
- Backend: Node.js + Express
- Database: PostgreSQL + Prisma ORM
- Auth: JWT + bcrypt
backend/
frontend/
- Public rooms listing page
- Room details page
- Booking request form
- Admin login
- Admin dashboard overview
- Admin room management
- Admin booking management
- Booking status updates
- Basic dashboard stats
- Copy
backend/.env.exampletobackend/.env. - Update
DATABASE_URLinbackend/.envto match your PostgreSQL host, port, username, password, and database. - From
backend/, install dependencies:npm install - Generate the Prisma client:
npx prisma generate - Push the schema to PostgreSQL:
npx prisma db push - Seed demo rooms and the admin user:
npm run prisma:seed - Start the backend API:
npm run dev
- Copy
frontend/.env.exampletofrontend/.env. - Update
VITE_API_BASE_URLinfrontend/.envif your backend is not running athttp://localhost:5000/api. - From
frontend/, install dependencies:npm install - Start the frontend:
npm run dev
- Email:
admin@lodgedesk.demo - Password:
admin123
These are created by the seed script and can be changed through ADMIN_EMAIL and ADMIN_PASSWORD in backend/.env before seeding.
Warning
The included credentials and JWT secret are for local demonstration only. Replace them before deploying the application or exposing it to the internet.
GET /api/roomsGET /api/rooms/:slugPOST /api/bookingsPOST /api/auth/login
GET /api/admin/dashboardGET /api/admin/roomsPOST /api/admin/roomsPUT /api/admin/rooms/:idDELETE /api/admin/rooms/:idGET /api/admin/bookingsPATCH /api/admin/bookings/:id/status
- Load the public rooms page and confirm rooms are listed from the API.
- Open a room details page and submit a booking request.
- Log in with the demo admin credentials.
- Confirm dashboard cards and recent bookings load.
- Add a room, edit it, then delete it.
- Open booking management and change a booking status.
This project is available under the MIT License.