Skip to content

Mohit Sagar — Backend & AI Engineer

I find the bug, file it, fix it.

I build backend systems and AI developer tools, and I contribute to Open Library and the Hyperjump JSON Schema validator. I care about the unglamorous parts: untrusted input, failure paths, and tests that fail before the fix.

Open to backend & AI internships

PRs merged upstream
10
Bugs filed upstream
7
Public repositories
57
  • TypeScript
  • Python
  • Node.js
  • Bun
  • PostgreSQL
  • GitHub Actions
  • Docker
  • RAG
  • LLM agents
  • Open source

01This is me

Hi, I'm Mohit.

CS at Scaler School of Technology, class of '28. Bangalore, India.

Mohit Sagar

I read the failing test before I read the docs. Most of what I know about distributed caches, rate limiters and vector search came from building them myself, watching them break and working out why. In open source I do the same thing on code I didn't write: reproduce the bug, write it up so a maintainer can act on it, then send the smallest fix that closes it.

02Open source

Open source

Mostly Open Library and the hyperjump JSON Schema libraries. Where I can, I file the bug before I fix it, so the maintainers see the problem before they see my patch.

Bug trails

  1. Found · json-schema

    An invalid schema was only rejected the first time it was validated.

    Filed

    Issue #133

    Fixed

    PR #134

    Merged
  2. Found · uri

    Dot-segment removal was wrong for paths that don't start with a slash.

    Filed

    Issue #11

    Fixed

    PR #12

    In review
  3. Found · json-schema-errors

    contentMediaType, contentEncoding and contentSchema threw “unsupported keyword”.

    Filed

    Issue #294

    Fixed

    PR #296

    In review

Pull requests

03Projects

Selected work

Systems I built to understand them: an AI code reviewer, a coding agent, a distributed typeahead and a RAG pipeline.

  1. _01

    PRism

    A precision-first AI code reviewer, run as a GitHub Action or CLI. One model proposes defects, a second tries to refute each, and only survivors are posted inline. PR code is treated as untrusted and never executed. In a field test all 3 of its comments landed on the right line, and one flagged a real bug nobody had planted.

    on: pull_request
    propose → refute → gate
    PR head code never executed
    field test: 3/3 on the right line
    ✓ 87 Vitest tests

    PRism · demo

    A pull request fills with twenty vague AI comments: 20 AI comments, 4 real. PRism: the AI reviewer that tries to prove itself wrong. Pass 1 finds, pass 2 tries to refute: of five findings, one is refuted, one falls below the confidence bar, three are posted. 3/3 comments on the exact line, including an off-by-one on line 14 with a suggested fix. An empty review is a correct review. GitHub Action and CLI, github.com/MohitSAGAR11/PRism.

    • TypeScript
    • GitHub Actions
    • OpenRouter
    • Octokit
    • Zod
    • Vitest
  2. _02

    CodeFang

    A terminal coding agent that can't touch the disk without consent. Edits are staged in memory, and you approve them from a unified diff in the terminal or over Telegram. Every path is jailed to the workspace, with .env, .git and node_modules blocked.

    $ codefang
    edits staged in memory, not on disk
    review the unified diff
    ? approve changes (y/N)
    ✓ 81 Bun tests

    CodeFang · demo

    The agent reads, edits and queues a command: 3 changes staged, 0 written. CodeFang, agentic coding in your terminal: nothing touches your disk until you say so. Read the diff, then it lands: the change is reviewed one by one and applied. Approve from your phone with Telegram's Accept All. Your secrets stay invisible: reading .env is excluded by policy and paths outside the workspace are refused. 81 tests, nothing written without a yes. github.com/MohitSAGAR11/CodeFang.

    • TypeScript
    • Bun
    • Vercel AI SDK
    • Telegraf
    • Zod
  3. _03

    Search Typeahead

    A distributed typeahead with a consistent-hashing Redis cache, Kafka-backed async writes and split services, all running from one Docker Compose file.

    GET /suggest?q=…
    hash ring → cache node
    Redis hit, else PostgreSQL
    search event → Kafka → batch writer
    ✓ docker compose up

    Search Typeahead · demo

    Typing t, th, the: the suggestions re-rank on every keystroke with real counts from the dataset. Every keystroke, answered. TypeAhead, distributed: one search box, Redis, Kafka and Postgres behind it. One ring, three cache nodes: the prefix the hashes onto a ring of 150 virtual nodes per Redis node and lands on Redis-B. Searches queue, writes batch: searches go to the search-events Kafka topic and the batch writer turns 14 searches into one multi-row upsert. The whole stack, one command: docker compose up starts all ten services. github.com/MohitSAGAR11/typeahead-system.

    • TypeScript
    • Redis
    • Kafka
    • PostgreSQL
    • Docker
  4. _04

    Notebook LM

    A full RAG pipeline: upload documents, chunk and embed them, then chat with answers grounded in your own files.

    upload your documents
    chunk → embed → store
    retrieve by similarity
    answer from your own files
    ✓ live on Netlify

    Notebook LM · demo

    A README is uploaded to the Notebook-LLM workspace and split into 6 chunks. Chat with your documents. Notebook-LLM, a retrieval-augmented generation application: upload a PDF or TXT, get grounded answers. Three searches, one reranked top 5: the question is expanded into three variants, candidates are merged and an LLM scores them 0 to 10, keeping the top 5. Answers from your file: the chat answers that documents are split into 800-character chunks with a 150-character overlap. Temperature 0.1, no guessing. github.com/MohitSAGAR11/Notebook-LM.

All repositories on GitHub

04What I use, where I've been

Stack & path

  • Languages

    TypeScript · JavaScript · Python · SQL

  • Working knowledge

    Go · Java

  • Backend

    Node.js · Bun · Express · REST APIs · Server-Sent Events · Vercel AI SDK

  • Databases

    PostgreSQL · Firestore · Pinecone

  • AI & data

    LLM tool-calling agents · OpenRouter model fallback · Zod structured output · RAG

  • Cloud & tools

    GitHub Actions · Docker · Firebase · Git · Vitest · Octokit

  1. Oct 2026 — now

    Open source contributor, Hyperjump JSON Schema

    Found, filed and fixed a validation bug in a validator with ~366K weekly npm downloads, with regression tests that fail on main.

  2. Sep 2026 — now

    Open source contributor, Open Library (Internet Archive)

    Rebuilt the author-merge confirmation for librarians; fixes across author matching, MARC import and tests.

  3. Aug 2024 — 2028

    Computer Science, Scaler School of Technology

    Undergraduate program, Bengaluru.

  4. Aug 2024 — 2027

    B.Sc., BITS Pilani (online)

    Bachelor of Science, studied alongside Scaler.