Skip to content

09Study site and second brain

Alex's Brain

A self-hosted study site for my course handbooks and a second brain around them, private behind a login and open-sourced under the MIT licence.

Alex's Brain, screenshot

Context

I built Alex's Brain to study my Vietnamese course notes from Coursera and F8 in one place and connect them with my weekly plans, projects and skills. Started in October 2026, my own instance runs behind a login for a single owner, my data exports as markdown and JSON at any time, and LLM jobs sit behind a budget guard. In November 2026 I published the code as open source under the MIT licence on GitHub.

What I built

  • A study site in Next.js 16 and Fumadocs for 15 handbooks in 3 tracks, business, IT and skills, with SQLite FTS5 search and a done mark per lesson.
  • An Inbox fed by a bookmarklet, a PWA share target and AI tags for keyboard triage, plus a block editor for notes with [[ ]] links and autosave.
  • A Week view with objectives and a 15-minute review, alongside project tracking with a timer and the effective hourly rate.
  • Business opportunities with evidence and a score history, skills whose evidence fades after 3 and 6 months, and a morning brief from RSS feeds.
  • Cmd+K search across everything and an interface in Vietnamese and English, backed by Django 5, Django REST Framework and PostgreSQL.

Highlights

A site whose build does not grow with its pages

Static export did not fit tens of thousands of pages, so Fumadocs runs in server mode: the markdown stays on disk and each lesson is compiled on request and cached. The sidebar tree of a book loads lazily, and the search index is SQLite FTS5 built at import time and read through node:sqlite. An importer takes a GitBook export, a single HTML file or a folder of markdown and merges the pages into lessons without rewriting the text.

A lesson page with the sidebar and search
The open source version, run locally with sample data.

Memory that fades on purpose

A skill is only as current as its evidence, so its score fades after 3 and 6 months without new evidence. Opportunities keep a score history, predictions are re-scored after 6 months, and the week ends with a 15-minute review. The point is that the brain tells the truth about what is stale.

The skills page with fading evidence
The open source version, run locally with sample data.

Private by construction

The server opens no public port and is reached only through a Cloudflare Tunnel, where every request carries a Cloudflare Access token that Django verifies and maps to the one owner. No runtime request leaves the origin: fonts are self-hosted and external images are replaced by placeholders. Accessibility was checked with axe over 63 page states, down from 384 flagged nodes to 5.

The Inbox: quick capture, and the bookmarklet that sends any page to it
The open source version, run locally with sample data.

Result

I use Alex's Brain daily to study and plan across 15 handbooks and 4,750 lessons merged from about 18,800 source pages. Released on GitHub under the MIT licence with a sample handbook and an importer, anyone can run it with their own notes.

Next project

Váš VolantVáš Volant, screenshot