UnThink
AI-powered, fragment-first personal knowledge base and web capture engine.
Founder & Full-Stack Systems Engineer
Visit UnThink →01 IDEA
UnThink represents my work as a solo founder and full-stack systems engineer, building an AI-native second-brain platform from first principles. Traditional knowledge tools force developers to context-switch during deep work: saving a code snippet or insight requires selecting folders, writing titles, and assigning tags. The result is that over 85% of bookmarks are never opened again. UnThink inverts this: the atomic unit of capture is a fragment (2–8 lines of code or prose), and autonomous AI handles classification, tagging, and dual-directory filing at sub-300ms ingestion SLA.
02 FRAMING
The architecture was intentionally designed as a unified monorepo with specialized service micro-orchestration. Django 5.1 and DRF manage transactional consistency, ACID CRUD, user authentication, tiered quota enforcement, and Stripe/Dodo payments. In parallel, FastAPI provides asynchronous, high-concurrency LLM streaming via Server-Sent Events (SSE). The services communicate through Redis pub/sub and three dedicated Celery queues (classification, scraping, and digest generation), ensuring transactional API responsiveness is never degraded by long-running AI inference.
03 BUILD
Solving cache invalidation was the primary scalability challenge in UnThink. With users querying paginated feeds, recursive folder trees with live fragment counts, and dynamic tag summaries, naive cache flushing caused severe Redis event loop contention and PostgreSQL stampedes. I implemented deterministic epoch versioning: bumping an atomic user-level version key logically invalidates all dependent query caches in sub-millisecond time without blocking Redis, while distributed mutex locks protect expensive tree aggregations during cache misses.
04 DEPLOY
On the client side, I engineered and published a Chromium Manifest V3 browser extension to the Chrome Web Store. To handle MV3's 30-second ephemeral service worker lifecycle, authentication tokens and quota states are maintained statelessly via Chrome storage sync. A secure dashboard bridge synchronizes active sessions from letsunthink.tech with zero user friction, and the native zero-dependency popup loads in under 10ms.
05 WHAT'S NEXT
Production deployment is containerized on AWS EC2 with an unprivileged Alpine Nginx reverse proxy. Every container runs under a non-root user profile with Linux kernel cap_drop: ALL enforced, with internal backend, AI, database, and Redis ports completely isolated from host exposure. Automated pre-deployment AST verification gates guarantee security invariants before any release reaches production.
medium · 10 min read · linux · networking · docker · internals
medium · 9 min read · linux · networking · namespaces · veth
medium · 8 min read · linux · networking · bridge · gateway
medium · 9 min read · linux · networking · nat · iptables
medium · 7 min read · postgresql · database · sql · crud
medium · 8 min read · postgresql · sql · joins
medium · 8 min read · postgresql · sql · aggregations
medium · 8 min read · redis · high-availability · cache · distributed
medium · 10 min read · redis · aws · cluster · high-availability
medium · 10 min read · ai · computer-vision · webrtc · mobile
native · 10 min read · linux · networking · docker · internals
For the architecture deep-dive: three-layer build, isolation strategy, deployment topology. Read the case study: UnThink on /work.