KUSHAL SRINIVAS OP-2026
[PROJECT SPECIFICATION]

Cleriko — Legal Task Marketplace & Automated OTP Relay

React Native (Expo)TypeScriptNode.jsExpressPrismaPostgreSQLSocket.IODockerKotlinRazorpay

Legal coordination between advocate lawyers and court clerks in India has historically relied on chaotic WhatsApp groups, untracked phone calls, and manual payment follow-ups. Lawyers post briefs without standardized requirements, clerks execute tasks without escrow guarantees, and payment disputes are frequent.

I architected and built Cleriko — a structured mobile marketplace that replaces unorganized communication with a streamlined legal workflow engine. Lawyers post case briefs with clear deliverables, court clerks bid on execution, and funds are locked in Razorpay escrow, releasing only upon verified task completion.

Architectural Overview

[SYSTEM FLOW DIAGRAM]

Lawyer Brief → Escrow Deposit (Razorpay) → Real-Time Clerk Bidding (Socket.IO) → Brief Execution & Evidence Upload → Lawyer Approval → Automated Escrow Release

Self-Built Zero-Cost OTP Infrastructure

Traditional SMS gateway providers (like Twilio or Fast2SMS) charge per-message fees and frequently suffer from carrier delivery delays in India. To eliminate recurring infrastructure overhead and ensure 100% reliable OTP delivery, I engineered a custom Android-based SMS relay system.

  • Foreground Kotlin Service: Developed a lightweight Android app running a continuous background service on a dedicated SIM-enabled phone.
  • SMSGate Server Integration: The Android service registers with a self-hosted SMSGate relay server via secure webhooks.
  • Hardware-Level Relay: When a user requests authentication, the backend sends a payload to SMSGate, which triggers the phone to dispatch the OTP via native SIM SMS — achieving $0 per-message cost and under 3-second delivery times.

Security & Real-Time Collaboration

Legal applications handle sensitive case data. Access control is enforced using JWT with refresh token rotation stored in secure mobile storage. Every API route executes server-side role checks at the middleware boundary (Lawyer vs. Clerk vs. Admin).

Task bids, status updates, and in-app messages are synchronized in real time using Socket.IO. The entire backend stack — Node.js, Express, Prisma ORM, and PostgreSQL — is fully containerized with Docker for consistent staging and production deployments.

Key Technical Achievements

  • Replaced informal WhatsApp coordination with structured Razorpay escrow payment contracts.
  • Engineered a custom Kotlin/SMSGate relay cut OTP service costs to $0.
  • Containerized complete production environment on Docker with automated database migrations.
← BACK TO ALL ENTRIES