Brain Base - Second Brain
An open-source, self-hostable second brain - notes with ⌘K quick capture, a candle-ring focus timer, daily journal, knowledge graph wired by [[wikilinks]], learning tracker, and SM-2 spaced repetition. All in one place. No subscriptions.

Tech Stack
Next.js 16, TypeScript, Prisma, NextAuth v5, Tailwind v4
Features
- Quick Capture (⌘K)
- Knowledge Graph
- Focus Timer
- Spaced Repetition
- PWA
What I Built
Wrote the SM-2 scheduler in
src/lib/sm2.tsand the review and learn shells that drive it - 1,400 lines between them, and the part of the app I use most.Built the knowledge graph by parsing
[[wikilinks]]out of note bodies, so linking two notes is the only work it takes to connect them.Wrote the ⌘K command palette in the top bar for quick capture without leaving the page you are already on.
Shipped the focus timer, daily log, dashboard, sidebar, and notification popover - the authenticated shell the rest of the app sits inside.
Wrote the manifest, including the app shortcuts that put Capture, Focus, and Log one tap from the home screen, plus the README and the deployment guide so someone else can run it.