A hotel operations dashboard for managing rooms, bookings, guests, employees, and inventory with a React frontend and Supabase backend.
- Frontend: React + Vite + Tailwind CSS
- Backend/auth: Supabase (PostgreSQL + Auth)
- Reporting: PDF export support
docs/schema.sql— Supabase database schema and seed datafrontend/— React applicationfrontend/src/pages/— Dashboard, bookings, rooms, guests, employees, inventory, reports, loginfrontend/src/components/— shared UI componentsfrontend/src/lib/— Supabase client and helpers
- Create a Supabase project.
- Open the Supabase SQL Editor.
- Run the contents of
docs/schema.sql. - This will create the tables, policies, seed data, and booking-to-room sync trigger.
- Go to Supabase Auth → Users.
- Add a user with email/password.
- In SQL Editor, update that user profile role to
owneroradmin.
Example:
UPDATE profiles
SET role = 'owner'
WHERE id = '<auth-user-id>';Inside frontend/, create a .env file:
VITE_SUPABASE_URL=https://your-project-ref.supabase.co
VITE_SUPABASE_ANON_KEY=your-anon-key-hereYou can get these values from Supabase Dashboard → Project Settings → API.
cd frontend
npm install
npm run devThen open:
http://localhost:5173
- Authentication with role-based access
- Dashboard with occupancy and booking insights
- Guest, room, employee, booking, and inventory management
- Booking workflow with check-in, check-out, and cancellation
- Inventory low-stock monitoring
- Activity log for admin visibility
- Reports with export options
cd frontend
npm run dev
npm run build
npm run test- The app expects the database schema from
docs/schema.sqlto be loaded first. - The login user must have a matching
profilesrow with a valid role. - Role defaults are handled by the schema, but the first owner/admin account should be promoted manually in SQL.