Skip to content

bansalbhunesh/Utsav

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

83 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Utsav ๐Ÿ›ธ

CI Next.js Go PostgreSQL License

Mission Control for High-Stakes Indian Weddings & Events.

Utsav is a production-grade, realtime Event Operations Platform. It is not another generic event planner SaaS; it is built like an air-traffic control system for professional event organisers who manage chaos, logistics, and vendor reliability in high-pressure, low-connectivity environments.


๐ŸŒช๏ธ The Problem

Traditional event SaaS is built for planning (guest lists, budget trackers, generic RSVPs). But high-stakes Indian weddings fail during execution. On the day of the event, organisers abandon SaaS tools and revert to frantic WhatsApp groups and spreadsheets. Why? Because existing software cannot handle live operational chaos.

  • Stale Data: Polling-based tables are useless when 50 guests land at the airport simultaneously.
  • Race Conditions: Multiple coordinators updating the same Excel row leads to lost cars and stranded VIPs.
  • Silent Failures: Delayed vendors or missing buses are only discovered when the client starts screaming.

๐Ÿš€ The Solution

Utsav solves execution. We built a highly concurrent, realtime operational engine capable of surviving extreme coordination pressure.

  • Realtime SSE Architecture: Instant state updates broadcast to all organiser tablets in milliseconds. Zero polling.
  • Optimistic UI + Concurrency Protection: Built-in 409 Conflict resolution prevents two coordinators from assigning the same car to different guests.
  • SLA Incident Engine: Utsav tracks operational SLAs (e.g., "Guest landed > 15 mins ago, no car assigned") and auto-escalates them into an actionable Priority Inbox.
  • Cinematic Guest Experience: Framer Motion-powered RSVP flow with Ken Burns hero effects, staggered animations, and emotional success states.
  • Addictive Host Dashboard: RSVP Velocity sparklines, Event Pulse progress rings, and operational inbox โ€” designed to keep hosts engaged.
  • Actionable Intelligence: We process live signals to highlight what matters now, rather than displaying 500-row CRUD tables.

๐Ÿ—๏ธ Architecture

Utsav uses a strict, stateless Go API backing a Next.js App Router frontend, utilizing Server-Sent Events (SSE) for realtime synchronization.

graph TD
    subgraph Clients
        O[Organiser Tablets] -->|Optimistic UI Actions| API
        O -->|SSE Connection| Hub
        G[Guest Mobile Phones] -->|OTP Auth / RSVP| API
    end

    subgraph "Go Backend (Stateless)"
        API[Gin HTTP Router]
        API --> S[Service Layer]
        S --> R[Repository Layer]
        
        S -->|Broadcasts Event| Hub[SSE Realtime Hub]
        Hub -->|Pushes State| O
    end

    subgraph "Data & Infra"
        R -->|ACID Transactions| PG[(PostgreSQL)]
        R -->|Log State Jumps| History[(Transition History Table)]
        API -->|Rate Limits & Queues| Redis[(Redis / Upstash)]
    end
Loading

Backend Layering

  1. httpserver: Handles protocol, auth middleware, request parsing, and error envelopes.
  2. service: Enforces the operational state machine, SLA logic, and intelligence layers.
  3. repository: Isolates SQL, transactions, and optimistic concurrency (version checks).
  4. realtime: Manages thread-safe SSE client subscriptions and broadcasts.

๐Ÿ› ๏ธ Tech Stack

Frontend (Execution & UI)

  • Framework: Next.js 16 (App Router), React 19, TypeScript
  • State & Sync: Optimistic updates, useEventStream hook for native SSE decoding.
  • Styling: Tailwind CSS v4, lucide-react for operational iconography.
  • Animation: Framer Motion for cinematic micro-interactions and spring physics.
  • Libraries: date-fns for SLA countdowns, zod for strict runtime contracts.

Backend (Engine & Scale)

  • Core: Go 1.25+, Gin HTTP Framework.
  • Database: PostgreSQL via pgx (Neon Serverless).
  • Caching & Brokers: Upstash Redis for distributed rate-limiting and async queues.
  • Security: JWT + bcrypt auth, Idempotency-Key validation for transactional routes.

๐Ÿ›ก๏ธ Production Scalability Features

Utsav includes practical scale controls needed for high-concurrency event workloads:

  • Optimistic Concurrency Control: Write conflicts are blocked at the database layer using expected-version matching, protecting live operations from race conditions.
  • Distributed Rate Limiting: Redis-backed sliding-window limits protect public RSVP and OTP dispatch endpoints.
  • Idempotent Writes: Critical POST flows (payments, RSVPs) require idempotency keys to prevent duplicate side effects during bad network retries.
  • Transition History Ledgers: Every operational state jump (landed -> picked_up) writes a timestamped ledger entry to event_arrival_history, unlocking perfect incident replays.
  • Stateless Broadcasting: The SSE Hub scales horizontally.

๐Ÿ“ก API Examples

1. The Realtime War Room Stream

# Initiates a persistent SSE connection. Pushes instant state updates.
curl -N -H "Accept: text/event-stream" \
     -H "Authorization: Bearer <token>" \
     "http://localhost:8080/v1/events/<event_id>/live"

2. Optimistic Logistics Update (Arrivals)

# Updates a guest's operational state with strict version enforcement
curl -X PUT "http://localhost:8080/v1/events/<event_id>/guests/<guest_id>/arrivals" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <organiser_token>" \
  -d '{
        "arrival_status": "picked_up",
        "expected_version": 3,
        "check_in_status": "pending"
      }'
# Returns 409 Conflict if expected_version is stale!

๐Ÿ”ฎ Future Scope (Phase 9 & Beyond)

We are aggressively evolving from a workflow application into an Intelligence Operating System:

  1. Offline-First Synchronization (CRDTs): Because venue basements have terrible WiFi, the frontend will queue optimistic actions locally and sync seamlessly when network restores using CRDT (Conflict-free Replicated Data Type) patterns.
  2. Predictive RSVP Risk: A machine-learning heuristic that flags "High Risk" RSVPs (e.g., guests who RSVP'd "Yes" but haven't booked flights 72 hours out).
  3. Automated Vendor Dispatch: If a flight is delayed by 2 hours via aviation APIs, Utsav will automatically delay the cab vendor's SLA timer and dispatch a WhatsApp alert.
  4. Shagun Intelligence Signal: Realtime analytics on digital gift transactions mapped geographically.
  5. AI Motion Design Pipeline: Automated promotional video generation using a 3-step pipeline (Pinterest API โ†’ AI Storyboarding โ†’ Sedance 2.0 rendering). Architecture installed at services/api/internal/service/motion/pipeline.go.

๐Ÿ’ป Setup Instructions

Prerequisites

  • Node.js 20+
  • Go 1.25+
  • Docker Desktop

1) Start Local Dependencies

# Spins up PostgreSQL and Redis
make docker-up

2) Start the Backend Engine

cd services/api
cp .env.example .env
# Auto-runs DB migrations on startup
go run ./cmd/api

API runs on http://localhost:8080

3) Start the Frontend UI

cd frontend
cp .env.example .env.local
npm install
npm run dev

Frontend runs on http://localhost:3000

Validation Commands

# Backend Test Suite
cd services/api && go test ./... && go vet ./...

# Frontend Verification
cd frontend && npm run lint && npm run build

License

Proprietary.

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors