Saksham Jain
Back to work
/ 01Case study2026

Trexind

AI operating system for local businesses — connects Google Business Profile data, reviews, and competitor tracking into a weekly plan, with booking, billing, and WhatsApp automation across clinics, restaurants, and salons.

SaaSFull-StackAIRestaurantsClinicsWhatsApp API
Visit trexind.com
Trexind dashboard showing Google Business Profile insights, review replies, and weekly AI-generated summary.
Role
Full-stack Developer
Focus
Restaurant & Clinic verticals
Year
2026
Status
Production

Overview

Trexind is an AI operating system for local businesses. It connects a business's Google Business Profile, reads its reviews and nearby competitors, and turns that into a weekly action plan — while also running the day-to-day operations (bookings, billing, and WhatsApp conversations) the business depends on. The platform ships as one dashboard across three verticals: clinics, restaurants, and salons.

My role

I worked as a full-stack developer on Trexind, building out the restaurant and clinic verticals of the SaaS on top of the shared platform (auth, billing, GBP sync, and the AI review pipeline). On the API side that meant vertical-specific data models and endpoints — table/menu management and order flow for restaurants, appointment slots and patient records for clinics — wired into the same booking, WhatsApp notification, and billing engine used across every vertical. On the frontend, I built the dashboard views and booking flows for both verticals, matching the existing design system so each vertical feels native rather than bolted on.

The complexity

Problem — One dashboard has to serve three verticals — clinics, restaurants, and salons — each built around a different core object (appointment vs. table order vs. service slot) — without forking the codebase per vertical.

Approach — Modeled a generic booking entity that every vertical extends with its own typed payload (patient record, table/menu order, service selection), so the booking, WhatsApp, and billing engines stay vertical-agnostic and only the extension schema changes.

Problem — Two customers can hit "book" on the same appointment slot or table within milliseconds of each other, especially right after a weekly promo goes out.

Approach — Booking slots carry a version field — the write that loses the race gets a conflict, not a silent overwrite, and retries against the now-current slot state. Went with optimistic locking over a pessimistic row lock because slot writes are short and contested rarely enough that a lock held across the request isn't worth the latency.

Problem — Weekly AI summaries and review-reply drafts run against Google Business Profile's rate-limited API for every connected business — one slow or throttled account shouldn't stall the batch for everyone else.

Approach — GBP sync and summary generation are jobs on a RabbitMQ queue, one consumer per business with its own backoff, so a rate limit on one account delays only that account's job, not the run. The last-synced profile snapshot and per-business rate-limit counters live in Redis, so a retry reads current state without hitting GBP again.

Problem — WhatsApp delivery retries and duplicate webhook events can double-fire a booking confirmation or a billing charge if handled naively.

Approach — Made every WhatsApp webhook handler idempotent, keyed on message ID, so a retried delivery updates state once instead of re-triggering booking or billing side effects. The booking engine holds up under 100+ concurrent bookings across verticals in load testing without a double-booked slot.

Architecture

Booking & notifications
Vertical dashboard
Restaurant / Clinic UI
Vertical API
Order or appointment payload
Booking engine
Shared across verticals
WhatsApp webhook
Idempotent on message ID
Customer
Weekly AI summary
RabbitMQ queue
One job per business
GBP sync worker
Redis-cached, rate-limited
Review ingestion
LLM summarizer
Draft replies + weekly plan
Owner approval
Approve & post / edit

What shipped

  • Restaurant vertical — table/menu setup, order tracking, and WhatsApp-driven booking confirmations.
  • Clinic vertical — appointment scheduling, patient records, and automated visit reminders over WhatsApp.
  • Shared weekly AI summary and review-reply drafting surfaced identically across both verticals.
  • Competitor radar and Google Business Profile sync reused by every vertical dashboard.

What I owned

API & data model
Vertical-specific booking payloads (patient records, table/menu orders) modeled as extensions of one shared booking entity, not a fork per vertical.
Infrastructure
RabbitMQ job queue for GBP sync and AI summary generation, plus a Redis layer caching profile snapshots and rate-limit counters.
Integrations
WhatsApp Business API webhooks and Google Business Profile sync — both idempotent and rate-limit aware.
Frontend
Dashboard views and booking flows for the restaurant and clinic verticals, matched to the existing design system.

Engineering properties

  • Idempotent WhatsApp webhooks, keyed on message ID
  • RabbitMQ queue, per-business rate-limited consumers
  • Redis cache for GBP snapshots + rate-limit counters
  • Optimistic locking on booking slots, retry on conflict

Stack

Next.jsNode.jsExpressMongoDBRabbitMQRedisWhatsApp Business APIGoogle Business Profile API