Autobot360 — About the Project

Tagline: Run your PG on autopilot — billing, UPI rent, tenant app & WhatsApp reminders in one place. Built for paying guest & hostel owners in India.


Inspiration

Across India, millions of paying guest (PG) and hostel rooms are still run on WhatsApp threads, Excel sheets, and handwritten ledgers. Owners spend hours every month chasing rent, splitting electricity bills fairly, collecting Aadhaar KYC, and answering the same tenant questions again and again.

We built Autobot360 after talking to operators who manage $20$–$200+$ beds across multiple locations. Their pain was never “I need another spreadsheet” — it was operational chaos: missed reminders, disputed utility splits, lost documents, and no single view of who owes what.

Our goal: give small and mid-size PG owners the same operational clarity that large co-living chains get from expensive custom software — without forcing them off WhatsApp, the channel they already live in.


What it does

Autobot360 is an all-in-one PG management platform for owners, managers, and staff.

Core modules

Module Capabilities
Operations Multi-property dashboard, room & bed matrix, check-in/check-out, visitors log, bed bookings
People Tenant onboarding, secure KYC upload links (Aadhaar/PAN/Passport), staff roles with scoped property access
Finance Rent ledger, unified Billing hub (service bills $\rightarrow$ monthly invoices $\rightarrow$ pay links $\rightarrow$ proofs, autopay & GST), Razorpay/UPI
Communications Notices, complaints with photo attachments, SMS/voice rent reminders
Automations $14+$ built-in workflows — KYC invites, invoice email, welcome messages, complaint alerts, auto rent reminders
WhatsApp Inbound bot: owners add tenants; staff/tenants log complaints with photos via chat
Discovery AI-assisted PG finder for tenants browsing vacant rooms

Billing & utility allocation (LaTeX)

When a utility bill of amount $B$ (INR) must be shared across $n$ active tenants, Autobot360 supports multiple allocation modes.

1. Equal split (tenant_equal)

Each tenant $i$ pays an equal share:

$$ s_i = \frac{B}{n}, \quad i \in {1, 2, \ldots, n} $$

2. Rent ratio (rent_ratio)

Tenant $i$ with monthly rent $r_i$ pays proportionally to rent:

$$ s_i = B \cdot \frac{r_i}{\sum_{j=1}^{n} r_j} $$

Constraint: $\sum_{i=1}^{n} s_i = B$.

3. Manual override (tenant_manual)

Owner assigns weights $w_i \geq 0$ such that:

$$ s_i = B \cdot \frac{w_i}{\sum_{j=1}^{n} w_j} $$

4. Monthly invoice total

For tenant $i$ in month $m$:

$$ I_{i,m} = R_{i,m} + \sum_{k} s_{i,k,m} + F_{i,m} - D_{i,m} $$

where:

  • $R_{i,m}$ = base rent
  • $s_{i,k,m}$ = allocated share of utility bill $k$
  • $F_{i,m}$ = late fine (if applicable)
  • $D_{i,m}$ = discounts or credits

Late fine example (grace period $g$ days, rate $\lambda$% per month):

$$ F_{i,m} = \begin{cases} 0 & \text{if paid within grace period} \[6pt] \lambda \cdot R_{i,m} \cdot \dfrac{d - g}{30} & \text{if } d > g \text{ days overdue} \end{cases} $$

where $d$ = days past due date.


How we built it

Tech stack

$$ \text{Frontend} = {\text{React 19},\ \text{TanStack Start/Router},\ \text{Tailwind CSS},\ \text{shadcn/ui}} $$

$$ \text{Backend} = {\text{Supabase (PostgreSQL + Auth + RLS + Storage)},\ \text{Server Functions}} $$

$$ \text{Integrations} = {\text{Twilio (SMS/Voice/WhatsApp)},\ \text{Razorpay},\ \text{SMTP/Resend}} $$

$$ \text{Deploy} = \text{Cloudflare} \quad (\texttt{autobot360.com}) $$

Workflow engine pipeline

$$ \text{Trigger} \xrightarrow{\text{owner action / cron}} \texttt{runWorkflow}(o, w, p) $$

$$ \xrightarrow{\text{enabled? + PG scope}} \text{Handler}(p) \xrightarrow{} {\text{SMTP},\ \text{Twilio},\ \text{Razorpay}} $$

$$ \xrightarrow{} \texttt{workflow_run_logs} + \text{dashboard stats} $$

Key code paths

Path Role
src/lib/workflow-engine/runner.ts runWorkflow(), scheduled batch
src/lib/workflow-engine/registry.ts Workflow ID $\mapsto$ handler
src/lib/billing.functions.ts Invoice generation & bill allocation
src/lib/bill-allocation.ts Split computation ($s_i$ formulas)
src/lib/whatsapp-bot/handler.ts Inbound WhatsApp commands
src/routes/_authenticated/billing.tsx Unified billing UI

Database (Supabase)

  • Row Level Security (RLS) on tenants, tenant_invoices, complaints, tenant_documents
  • Migrations for owner_payment_settings, service_bills.allocation_mode, whatsapp_sessions
  • Cron endpoint: POST /api/workflows/cron with bearer $WORKFLOW_CRON_SECRET

Challenges we ran into

1. Fragmented billing UX

Invoices, GST, and utility bills lived in separate flows. Fix: single /billing route with tabs; auto-switch to Invoices after generation.

2. Fair utility splits

Flat split: $s_i = B/n$ angered premium-room tenants; manual Excel broke at scale. Fix: six allocation modes with server-side computation so $\sum s_i = B$ always holds.

3. WhatsApp $\neq$ SMS

Twilio SMS numbers do not work as WhatsApp senders. Error: +15734554508 isn't on WhatsApp. Fix: explicit sender resolution + sandbox fallback during development.

4. Multi-tenant security

Owners, managers, staff, and tenants must satisfy access constraints:

$$ \forall \text{ row } x:\quad \text{read}(u, x) \iff u \in \text{AllowedScope}(x) $$

Implemented via Supabase RLS, not UI-only checks.

5. Automation complexity

Platform vs per-owner credentials confused operators. Fix: platform-managed Twilio/SMTP with owner toggles and per-PG workflow scope.

6. Channel preference

Rent reminders must reach tenants on SMS/WhatsApp — not email alone. Channel selection is a first-class workflow config.


Accomplishments that we're proud of

  1. End-to-end rent pipeline — bed assignment $\rightarrow$ invoice $\rightarrow$ Razorpay link $\rightarrow$ proof $\rightarrow$ receipt workflow
  2. Built-in workflow engine — $14+$ catalogued automations, cron support, run logs
  3. WhatsApp-native ops — add tenants and log complaints with photos from chat
  4. Flexible bill allocation — bed, room, room type, rent ratio, equal, manual
  5. Owner payment control — due day, grace $g$, late fine $\lambda$, Google Sheets export/import
  6. Live deployment — production owner suite at autobot360.com

What we learned

  • Meet owners where they are. Software that fights WhatsApp fails; a bot layer beats extra dashboard charts.
  • Billing UX is trust UX. Showing invoices immediately after generation matters as much as correct $I_{i,m}$.
  • RLS early, not later. PG data is sensitive; enforce $\text{read}(u,x)$ at the database.
  • Scope by property. Multi-location owners need “run on PG $p$ only,” not global on/off.
  • India-first defaults. UPI/Razorpay, Aadhaar KYC, rupee formatting, rent-due-on-day-$5$ patterns should be defaults.

What's next for Autobot360

Priority Feature
1 Tenant mobile app (PWA) — pay rent, upload KYC, invoices, complaints; sync to owner dashboard
2 Production WhatsApp Business API — beyond Twilio sandbox
3 PDF invoices & GST e-invoicing — downloadable receipts
4 Automated billing cron — generate & send on day $1$ of each month
5 AI assistant for owners — natural-language ops queries
6 Hindi + regional UI — for caretakers and tenants
7 Analytics — occupancy rate $\eta$, collection rate $\rho$, P&L across properties

Target metrics (next release)

$$ \eta = \frac{\text{occupied beds}}{\text{total beds}} \times 100\% $$

$$ \rho = \frac{\sum \text{collected rent}}{\sum \text{invoiced rent}} \times 100\% $$


References


Autobot360 — PG management software for paying guest & hostel owners in India.

Built With

Share this project:

Updates