← Work

Case Study — 05

md.rajkar.dev.

A Markdown publishing tool — write, pick a theme, and share a clean page with its own link. Built and shipped solo.

Role
Solo builder
Type
Personal
Period
2026 — Present
Stack
Next.js 16 · React 19 · TypeScript · Turso · CodeMirror 6 · react-markdown · Upstash · Vercel

01

The product

Most of us already write in Markdown — notes, specs, release notes — but sharing it means a raw file, a screenshot, or pasting into something that mangles the formatting. md.rajkar.dev fixes that: you write or paste Markdown in a live editor, pick one of four reading themes, and publish a clean page with its own memorable link. No account, no setup.

It's a full little product, not a toy: password-protected pages, link expiry, projects (folders) with breadcrumb navigation, custom URLs, image paste-and-upload, per-document link previews, and a 'my documents' library — all anonymous, with edit access kept in the browser.

02

My role

Everything — product, design, the editor, the backend, abuse protection, and deployment. It's a solo project, which is the point: every decision from the sanitizer to the share-link data model is mine to make and live with.

03

The hard part

The content is untrusted, so rendering is the security surface. Anyone can publish, which rules out MDX (it executes JavaScript) — instead the pipeline is react-markdown with rehype-sanitize, so a published page can render rich Markdown and syntax-highlighted code but can never run a script. Images are paste-or-drag uploaded and stored as blobs, and SVG uploads are refused so they can't smuggle script through an image route.

No accounts means abuse has to be handled at the door. Publishing is rate-limited per IP (Upstash Redis, with a database-backed fallback so it never fails open), gated behind Cloudflare Turnstile, and screened with spam heuristics. The editor itself had to feel like a real writing surface — a dark CodeMirror pane with line numbers and live preview, a fixed page where only the panes scroll — and the whole app respects the OS light/dark theme with no flash, resolved before first paint.

04

How it was built

Next.js 16 (App Router) with React 19 and TypeScript, on Turso (libSQL) — which stores the documents, the projects, uploaded images, and the rate-limit counters. The editor is CodeMirror 6; rendering is the sanitized react-markdown pipeline shared between the live preview and the published page, so what you write is exactly what ships.

Share links derive readable slugs from the title (or a custom one), each document generates its own Open Graph image so a shared link previews the real title and excerpt, and published pages are noindex by design — unlisted, never in search. Deployed on Vercel.

05

Outcome

md.rajkar.dev is live and does what it set out to: a Markdown doc becomes a clean, themed, shareable page in under a minute, with nothing to install and no signup. It's also been my testbed for the unglamorous half of running anonymous user content in production — sanitization, rate limiting, bot defense — the kind of work that increasingly shows up in client projects too.

Visit live site ↗