All workCase study / Property management system

Pre-launch, running on demo data · Jul to Sep 2026

Hotel PMS

A hotel management system for several properties: a back office, a front-desk board, a staff mobile app, and a public booking site, all on one API and one database.

My role

Freelance engineer through AxedStack, with Avi Mehta and Shrey Singh. I built the payment, channel, and messaging integrations, accounting posting, tenant-isolation fixes, operator screens, and backups, and merged most of the team’s pull requests.

Status

Pre-launch, running on demo data, Jul to Sep 2026

Stack

Laravel · PostgreSQL · Filament · Next.js · Expo / React Native · Redis · Docker

  • Back officeManagers, front deskRooms, rates, billing, night audit, point of sale, inventory, reports, and the front-desk board
  • Staff appFront desk, housekeepingReservations, room status, cleaning and maintenance tasks, built to work offline
  • Booking siteGuestsSearch, a 30-minute hold, hosted payment, booking status
  • Platform panelOperatorOnboarding hotel groups and their plans
One API shared services and permissions
PostgreSQL row-level security for each hotel group
  • Channex
  • Razorpay · Stripe
  • WhatsApp
  • Xero
Product map drawn from the codebase. Client screens are not shown.
28
backend modules
82
database tables
157
API operations in the OpenAPI contract
5 / 30
staff roles / permissions
4
surfaces: back office, platform panel, booking site, mobile
~1,770
backend test cases, plus 6 end-to-end specs
01 / Problem

What had to work together

A hotel runs on work that happens in different places at different times. A booking arrives online or from a travel site, the front desk assigns a room and checks the guest in, housekeeping turns the room over, the night audit posts the day’s charges, and accounting needs a ledger that balances the next morning.

Each of those steps depends on the one before it. If they live in separate tools, a room can be sold twice, a guest can check out with nights still unbilled, or an invoice number can be skipped. The brief was one system in which those steps share the same records and rules, for several properties under one account.

02 / System

Four surfaces, one API

The back office is where managers configure properties, rooms, rates, taxes, staff, and roles, and where billing, night audit, reports, point of sale, and inventory live. Front-desk staff work from a board inside it that lists arrivals, in-house guests, and departures, with a check-in or check-out action on each row.

Housekeeping and front-desk staff also have a mobile app, built to keep working offline and sync when the connection returns. Guests book on a public booking site and pay through a hosted payment page. A separate platform panel lets the operator onboard hotel groups and manage their plans.

Every surface calls the same domain services and the same permission checks, so a check-in from the board, the app, or the API follows one set of rules.

03 / Workflows

Three paths through the product

A stay, from booking to invoice

Front desk, manager
  1. Front desk searches availability and creates the reservation. The room is assigned inside a transaction, and an overlapping booking is rejected by the database.
  2. Checking the guest in opens their bill (a folio) automatically.
  3. Each night, a manager runs the night audit. It posts one room charge per night at the rate frozen when the booking was made, then advances the property’s business date. Front-desk users cannot run it.
  4. At checkout the system refuses to close the stay until every contracted night is posted, and it creates the departure-cleaning task for housekeeping in the same transaction.
  5. Settling the bill requires a zero balance and assigns the next invoice number with no gaps.

A direct booking with online payment

Guest, payment provider
  1. A guest picks dates on the public booking site. The system places a 30-minute hold that already blocks the room.
  2. The guest is sent to a hosted payment page; the attempt carries an idempotency key.
  3. The provider’s webhook is verified against its signature before anything changes. A valid payment is recorded once and confirms the reservation; an unconfigured or invalid webhook is refused.
  4. Unpaid holds expire on a five-minute schedule and release the room.

A booking from a travel site

Channel manager
  1. Bookings from online travel agencies arrive through a channel manager (Channex) as numbered revisions.
  2. Each revision is applied once and in one transaction, creating, changing, or cancelling the local reservation. A replayed revision does nothing.
  3. Availability and rates are pushed back hourly and reconciled every 30 minutes.
04 / My part

What I built, and what others built

I worked on it as a freelancer through AxedStack, alongside Avi Mehta and Shrey Singh. Avi set up the repository, its architecture and conventions, the first billing and night-audit core, and much of the mobile app. Shrey built the booking engine, the in-stay guest services, and the front-desk board, and worked with me on the public booking site.

Integrations
The Channex channel-manager flow end to end, Razorpay and Stripe hosted payments with signed webhooks, and WhatsApp notifications.
Money and accounting
Night-audit journal snapshots that post to external accounting exactly once, and the row lock that stops two settlements from using the same invoice number.
Tenant isolation
Moved the application off a database role that silently bypassed row-level security, and fixed how the tenant is resolved for each request under the long-running server.
Operator screens
Early back-office screens for billing, night audit, the availability calendar, the housekeeping board, the room grid, staff and roles, and the audit log, plus a later redesign across the booking site and both panels.
Access and staff
Property-level permissions within a hotel group, and staff account setup and offboarding.
Operations
Database backups with off-site copies and restore drills, the production environment notes, and the offline runtime for the mobile app.
Product documents
The specification, the reconciliation against the statement of work, and the delivery tracker the team worked from.
05 / Decisions

Rules the database enforces

No double booking
A PostgreSQL exclusion constraint on tenant, room, and stay dates rejects overlapping reservations, even if two requests arrive at once. The API turns that into a clear conflict response.
Tenants cannot see each other
Row-level security is forced on tenant tables, and the application connects as a role that cannot bypass it.
Money only moves forward
Amounts are stored as integers in the smallest currency unit. Ledger entries and audit records cannot be updated or deleted by the application; mistakes are corrected with reversing entries, and every posting must balance.
Invoice numbers without gaps
Numbers come from a locked counter row rather than a sequence, so a failed settlement cannot burn a number.
One business date per property
The night audit is idempotent for each night and refuses to close a day that has not ended in the property’s own time zone.
Integrations fail closed
Payment, channel, messaging, and accounting integrations sit behind adapters that refuse or do nothing when they are not configured, instead of guessing.
06 / Status

Where it stands

The system runs in a production-style environment with demonstration properties and data. It has not launched with a hotel or real guests, and I don’t claim operating results. The remaining steps before launch were mostly outside the code: payment-provider checks, channel certification, messaging accounts, and acceptance testing with the client.

07 / Learning

What I would keep, and change

Keep the invariants in the database. The rules that mattered most held because PostgreSQL enforced them, not because every code path remembered to check.

Test the security boundary with the real connection. Row-level security looked correct in every policy while the app was connecting as a role that ignored all of them; only a test that ran as the real application role proved isolation.

Start the outside work on day one. Gateway checks, channel certification, and messaging accounts took longer than the features that depended on them.