ALL PROJECTS/COMFORTABLE APARTMENTS — PROPERTY MANAGEMENT SAAS

Overview

Comfortable Apartments runs a short-stay serviced-apartments business end to end. A single Django 5 + DRF API — 8 apps, 11 models, 39 endpoints — is the source of truth, and three clients share it: a Next.js 14 dashboard for the office, a React Native app of twenty screens for the field, and a Capacitor Android build that ships the dashboard as an installable app.

The system covers the full operational loop: a room catalogue with live occupancy and revenue, a guest directory, the booking lifecycle (check-in/out, sources, status), billing with auto-computed totals and a one-call quick-transaction for walk-ins, branded PDF invoices delivered by WhatsApp or email, categorised expenses, and a reporting suite — dashboard, revenue, profit-and-loss, occupancy and ADR, per-room audit, and multi-sheet Excel/CSV exports. Every action is written to an audit log that also fires FCM push notifications, access is gated by a three-role RBAC model, and the whole backend ships through a Dockerised GitLab CI/CD pipeline behind Nginx with managed TLS. It is tuned to its market — Rs pricing, CNIC guest IDs, and EasyPaisa / JazzCash among the recorded payment methods.

Walkthrough

A short product walkthrough of Comfortable Apartments — Property Management SaaS.

01 / 0160-Second Showcase

Problem

The operator was running the business across receipts, notebooks and phone chats — no single source of truth for who was staying, what was owed, and whether the month was profitable. The brief was to replace that with one system the owner, a partner and front-desk staff could all use — from a back-office computer or a phone in the field — without stepping on each other's permissions.

That meant one API feeding a web dashboard and a mobile app from the same data and auth; a booking-and-billing core a walk-in could be recorded through in a single tap; real financial reporting, not just a ledger; invoices a guest could receive on WhatsApp; and an operational story where a single git push rebuilds and redeploys the whole containerised backend.

System Design

How It Works

01/04
01

One tap records a walk-in

How a front-desk guest becomes a booking, a paid bill and an occupied room in a single atomic call.

  1. 1Staff open the quick-transaction on the dashboard or the mobile app and enter the guest and amount
  2. 2The API creates or reuses the guest, checks the room isn't already occupied for the dates, and opens a booking
  3. 3A billing record is created and marked paid, with totals computed server-side
  4. 4The room is flipped to occupied and the whole change is committed atomically — one call, no half-states
  5. 5The action is written to the audit log, which fires an FCM push to the rest of the team
02

An invoice reaches the guest on WhatsApp

How a bill becomes a branded PDF the guest receives without a printer in sight.

  1. 1Staff generate an invoice from a billing record; the server renders a branded PDF with the embedded logo
  2. 2The PDF is stored to cloud object storage and linked to the invoice
  3. 3Staff hit send-via-WhatsApp; the API returns a wa.me deep link carrying the invoice details
  4. 4The guest opens the message and downloads the PDF over a token-authed link that works in a plain browser
03

Seeing whether the month was profitable

How scattered receipts become a real profit-and-loss the owner can trust.

  1. 1Every booking, payment and expense is captured against a room and a category as it happens
  2. 2The reporting endpoints aggregate income and expenses server-side into revenue, profit-and-loss, occupancy and ADR
  3. 3The dashboard renders the numbers as KPI cards and charts; the mobile app shows the same figures in the field
  4. 4The owner exports a multi-sheet Excel or CSV statement over a token-authed link for their accountant
04

One push ships the whole backend

How a single git push rebuilds and redeploys the containerised API with no manual steps.

  1. 1A push to main triggers the GitLab CI/CD pipeline; the test stage runs deploy checks and a compile smoke-test
  2. 2The build stage builds a multi-stage Docker image tagged with the commit and latest
  3. 3The deploy stage brings the container up on the server, runs migrations and collects static
  4. 4Nginx serves behind managed TLS with health checks wired into the container — the new version is live in one flow

Key Features

  • One REST API, three clients — a Next.js dashboard, a React Native app (20 screens) and a Capacitor Android build, all sharing one data model and JWT auth
  • Room catalogue with live per-room occupancy and revenue computed in the database, plus a date-range availability calendar
  • One-tap quick-transaction — a single atomic call records a walk-in: guest, booking, paid bill, and the room flipped to occupied, with an overlap guard
  • Full booking lifecycle — planned vs actual check-in/out, guest count, booking source and status — with a database check that check-out follows check-in
  • Money made first-class — auto-computed billing totals and payment status, and branded server-side PDF invoices delivered by WhatsApp or email
  • Financial reporting suite — dashboard, revenue, profit-and-loss, occupancy and ADR, per-room audit, and multi-sheet Excel/CSV exports
  • Three-role RBAC (owner · partner · staff), JWT with rotating refresh tokens, per-endpoint throttling, filtering and search on every list
  • An audit log that records every action and fires FCM push notifications to the team, with device-token registration and stale-token pruning
  • Local-market fit — Rs pricing, CNIC guest IDs, and EasyPaisa / JazzCash / Booking.com among seven recorded payment methods
  • Dockerised GitLab CI/CD (test · build · deploy) behind Nginx with managed TLS and pluggable S3 / Cloudinary object storage

Outcomes

  • Replaced receipts, notebooks and phone chats with one source of truth — rooms, guests, bookings, billing, invoices, expenses and reports in a single system
  • Delivered the whole product end to end as a single engineer: one API powering a web dashboard, a native mobile app and a Capacitor Android build
  • Made money legible — auto-computed billing, WhatsApp-delivered PDF invoices, and real profit-and-loss, occupancy and ADR reporting with Excel/CSV export
  • Kept the team coordinated and safe — three-role RBAC, an audit trail on every change, and FCM push notifications from the activity log
  • Reduced operations to a git push — a Dockerised GitLab CI/CD pipeline builds, ships, migrates and serves behind Nginx with managed TLS

More work