Profile banner
Profile avatar

Kamal

IST · --:--

@okk_kamal

Full-stack engineer focused on building scalable web systems. Experienced with React, Next.js, Node.js, and distributed backends.

Experience

ReactJavaScriptAIBigQuerySTTTTSKubernetesMongoDBNode.js
  • Details soon.

ReactAngularNode.jsExpressPostgreSQLMongoDBMQTTWebSocketsGrafanaDockerArgoCDCI/CD
  • Architected and deployed a centralized Single Sign-On (SSO) system integrating 5+ internal applications, reducing authentication overhead by 60% and improving user access consistency.
  • Established a scalable Role-Based Access Control (RBAC) framework covering 100+ APIs and UI components, strengthening security compliance and reducing unauthorized access incidents by 40%.
  • Engineered a centralized audit logging platform aggregating 100K+ monthly API events into Grafana Loki, including development of a reusable internal npm package used across 4+ services.
  • Built CDC pipelines to synchronize 20+ collections between MongoDB and PostgreSQL and authoredcross-database recovery scripts to repair 1,000+ corrupted records, ensuring near real-time dataconsistency and improving data reliability across systems.
  • Implemented backend services processing 100K+ daily telemetry events via MQTT and WebSockets, enabling real-time device monitoring and automated notifications through NodeMailer with 99.9% delivery reliability.
  • Developed backend systems supporting PAN-India installations, streamlining technician workflows and reducing installation turnaround time by 30%.
  • Led migration of 30+ critical tables across MongoDB → PostgreSQL → Snowflake, performing schemamapping, full data restoration, indexing, and schema optimization, improving query performance by 60% andenabling scalable analytical workloads
  • Optimized backend APIs and SQL queries using indexing, query tuning, and Memcache-based caching,reducing average response time from 600 ms to 50 ms and improving system reliability and scalability.
  • Implemented agentic AI workflows to automate IoT device provisioning and analyze 100k+ MQTT telemetrystreams, extracting actionable insights and reducing manual intervention in deployment and monitoring pipelinesby 50%
  • Engineered Snowflake stored procedures to process real-time streaming data ingested via Kafka connector, applying transformation logic and routing events into appropriate target tables for reliable, structured data storage.

Next.jsSupabasePostgreSQLApache AirflowTemporalPythonSEO
  • Configured 3+ Apache Airflow DAGs to automate periodic data extraction and processing from backenddatabases, improving pipeline reliability and execution consistency.
  • Optimized on-page SEO and site performance, improving search visibility and reducing average page load time by 40% through metadata and structural enhancements.

Projects

DB-Talk

Tech Stack

Node.jsFastifyPostgreSQLRedisLLM APIsDrizzle ORMDocker

Problem

Debugging database-level issues required opening database clients, manually writing queries, and repeatedly context-switching during development.

Solution

Built a self-hosted system that converts natural language questions into safe queries, executes them against the database, and returns results instantly, eliminating manual query writing.

Architecture

  • Fastify backend managing database connections and request lifecycle
  • Schema extraction at connection time and caching in Redis
  • Deterministic schema pruning before sending context to the LLM
  • LLM-powered natural language to query translation
  • Strict query validation allowing only SELECT statements
  • Single active database mapping with connection pooling
  • PostgreSQL for storing user-managed database metadata using Drizzle ORM
  • Fully dockerized services with a single docker-compose setup

Key Features

  • Natural language to query conversion
  • Read-only query execution (SELECT-only safety guarantees)
  • Schema-aware querying with context size control
  • Self-hosted and developer-controlled deployment

Tech Stack

DjangoDjango REST FrameworkPostgreSQLCeleryRedisReactTypeScriptTailwind CSS

Problem

Payout systems are correctness-critical: they must prevent duplicate disbursements, remain safe under concurrent requests, preserve an auditable source of truth for balances, and recover gracefully from delayed or failed processing.

Solution

Engineered a resilient payout engine that derives balances from an append-only ledger, enforces idempotent request handling, serializes balance reservation with database row locks, and offloads payout execution to asynchronous workers with retry and recovery workflows.

Architecture

  • Django REST API exposing merchant balances, payout initiation, and payout history endpoints
  • PostgreSQL-backed ledger architecture with credit, hold, debit, and release events as the financial source of truth
  • Atomic payout creation flow using transaction.atomic and select_for_update() to prevent race conditions during fund reservation
  • Persistent idempotency layer storing request hashes, execution state, and replayable API responses for duplicate-safe retries
  • Celery + Redis powered background processing pipeline with retry scheduling for stuck or delayed payouts
  • React + TypeScript operations dashboard for merchant selection, live balance visibility, payout submission, and payout lifecycle monitoring

Key Features

  • Ledger-driven balance computation with integer money storage for financial accuracy
  • Concurrency-safe payout reservation using transactional locking
  • Idempotent payout creation with stored response replay and conflict detection
  • State-machine based payout lifecycle validation with async retry orchestration
  • Operational dashboard for balances, ledger activity, payout history, and live status refresh
  • Backend tests covering idempotency guarantees and simultaneous payout race conditions

Tech Stack

PythonFastAPIRedisLuaThread Locks

Problem

Rate limiting is often explained conceptually, but understanding how algorithm choice, race conditions, and distributed state affect correctness requires a hands-on implementation.

Solution

Built a FastAPI project that implements sliding window and token bucket limiters using both in-memory and Redis backends, with per-key locking for local thread safety and Lua scripts for atomic distributed enforcement.

Architecture

  • FastAPI application for testing and comparing rate limiting behaviors
  • Sliding window limiter storing and pruning per-request timestamps
  • Token bucket limiter managing capacity, refill rate, and token consumption
  • In-memory backend protected by per-key locks for same-key concurrency safety
  • Redis backend centralizing limiter state across multiple app instances
  • Lua scripts executing multi-step Redis logic atomically to avoid race conditions
  • Comparison of latency, consistency, and scalability tradeoffs across both backends

Key Features

  • Sliding window and token bucket implementations
  • Both in-memory and Redis-backed limiter variants
  • Per-key locking for thread-safe in-memory limiting
  • Atomic Lua-scripted Redis operations for distributed correctness

Activity

WakaTime coding activity
MonWedFri

Blogs

Internal Working of SQL

SQL is one of the most widely used database languages, and many use it to query, fetch, or update data. But have you ever wondered what actually happens under the hood when you run a SQL query?

More soon...