Django · HTMX · Razorpay · Redis / Celery

Trimrr — URL Shortener SaaS

Django HTMX Razorpay Redis Celery

The Challenge

Building a premium URL shortener that goes beyond basic link shortening with enterprise-grade analytics and monetization.

The Solution

Engineered a full SaaS with real-time click tracking, custom aliases, dynamic QR codes, Razorpay subscription billing, and automated malicious link filtering using Celery/Redis background queues.

Tech Stack

Backend built on Django with HTMX for dynamic, low-JS interactivity. Redis and Celery handle background link-safety scans and analytics aggregation asynchronously so the redirect path stays fast. Razorpay powers subscription billing for premium tiers.

System Architecture Flow

      graph TD
          Client[Client Browser / Short Link Click] -->|1. HTTP Request| Nginx[Nginx / Gunicorn]
          Nginx -->|2. Check Fast Cache| Redis[(Redis In-Memory Cache)]
          Redis -->|3a. Cache Hit: sub-10ms| Redirect[Instant HTTP 302 Redirect]
          Redis -->|3b. Cache Miss| Django[Django Core App]
          Django -->|4. Read Original URL| Postgres[(PostgreSQL Database)]
          Django -->|5. Async Analytics & Malware Scan| Celery[Celery Task Worker]
          Celery -->|6. Aggregate Click Metrics| Postgres
      

Key Impact

Enterprise-level link management with sub-200ms redirect times and self-healing background task queues.