Athenaeum 📚✨
Your AI-powered knowledge base: built for learners who want structure, not just answers.
💡 Inspiration
It started with a simple frustration.
I use Notion and similar tools every day: for work, for documentation, for jotting down notes while learning something new. They're powerful, but they're built for productivity, not learning. There's no concept of progression, structure, or revision. You take notes, but the app has no idea you're a student trying to master a topic.
Then there's the other side of the problem: modern AI chatbots. When you ask ChatGPT to teach you something, it gives you a wall of text. The knowledge is there, but it drowns in a pile of chat messages. You scroll up, lose context, and the topic gets buried. There's no structure, no way to track what you've covered, and no clean place to come back to when you want to revise.
That gap is what Athenaeum was born to fill.
The vision was clear: a single product that has everything a learner needs. A place to capture raw ideas, sketch diagrams, take or upload handwritten notes, and have AI turn any topic into a structured, revisitable knowledge base, not a chatbot session, not a generic doc, but a real learning environment that stays with you.
🚀 What it does
Athenaeum is an AI-powered knowledge base designed around how people actually learn.
- 🧠 AI Course Generation: Give it a topic, your knowledge level, and your goal. Athenaeum generates a full structured course: lessons, quizzes, flashcards, and learning objectives, organized and ready to study.
- 🎨 Freeform Canvas: A built-from-scratch interactive drawing board for sketching diagrams, annotating ideas, and thinking visually. Supports freehand drawing, shapes, text, pan, and zoom; all persisted to your knowledge base.
- 📝 Note Taking: Write and organize notes alongside your courses. No switching apps.
- 🔒 Personal Knowledge Base: Everything lives in your account, scoped to you. Come back a month later, and it's all exactly where you left it.
- 🌐 Online Resource Ingestion (in progress): Paste a URL or YouTube link and let AI extract and structure it into a lesson.
The core promise: when you come back to a topic weeks or months later, everything is there: structured, organized, and ready to help you pick up exactly where you left off.
🛠️ How we built it
The stack is deliberately lean and modern:
| Layer | Tech |
|---|---|
| Frontend | React 18 + TypeScript + Vite |
| Backend | Supabase (PostgreSQL + Auth + Edge Functions) |
| AI Runtime | Mistral primary, Gemini fallback |
| Canvas Engine | Custom-built HTML5 Canvas renderer |
| Testing | Vitest + Testing Library + fast-check |
The Canvas engine is built from scratch, no Konva, no Fabric.js. Every element (strokes, shapes, text, arrows) is a typed discriminated union, serialized to JSONB in Postgres and rendered through a custom renderer. The viewport transform is a standard affine mapping: a world-space point $p$ maps to screen space as
$$p_{\text{screen}} = p_{\text{world}} \cdot s + \mathbf{t}$$
where $s$ is the zoom scale and $\mathbf{t} = (t_x, t_y)$ is the pan offset. Inverting this for mouse hit-testing:
$$p_{\text{world}} = \frac{p_{\text{screen}} - \mathbf{t}}{s}$$
The security model was intentional from day one. Supabase's anon key is safe on the frontend because Row Level Security (RLS) ensures users can only ever read and write their own data. The AI API keys live exclusively in Supabase secrets, injected at runtime into the Deno environment, never bundled, never exposed.
🧱 Challenges we ran into
🖼️ Building a canvas engine from scratch
Owning every pixel means owning every bug. Pan and zoom interact in subtle ways, and getting hit-testing, selection, freehand stroke smoothing, and shape rendering all working correctly under arbitrary viewport transforms took serious iteration. Property-based testing with fast-check was essential; it caught coordinate math edge cases that no manual test would have found.
🤖 Wrangling structured AI output Getting an AI to return a consistently shaped JSON payload with lessons, quizzes, flashcards, and learning objectives all in the right schema is harder than it sounds. A single malformed response breaks the whole course. Prompt engineering, schema enforcement, and defensive parsing in the API layer were all necessary to make generation reliable enough to ship.
🔄 Serialization drift
Several database columns (quiz, flashcards, learning_objectives, canvas type_specific_data) are stored as JSONB and manually serialized/deserialized. As the schema evolved, keeping the TypeScript types, parse functions, and serialize functions in sync became a discipline challenge. A mismatch here is silent at compile time and explosive at runtime.
🏆 Accomplishments that we're proud of
- ✅ A canvas engine built from zero: no third-party renderer, full control, and it works smoothly with pan, zoom, and multi-element support
- ✅ End-to-end AI course generation: that produces genuinely structured, usable learning content not just a summary, but lessons, quizzes, and flashcards in one shot
- ✅ A clean security boundary: between the public frontend and private AI keys, done right from the start
- ✅ A coherent product: note-taking, visual thinking, and AI learning all coexist in one app without feeling bolted together
- ✅ Property-based tests: for canvas math using
fast-check, the kind of test coverage that actually builds confidence in correctness
📖 What I learned
- Building a canvas renderer is a masterclass in coordinate systems. Once you've hand-rolled viewport transforms, affine math stops being abstract.
- Supabase's RLS model is genuinely elegant. The pattern of "anon key on the client, service role key only on the server" is simple, auditable, and scales cleanly.
- Deno is a pleasure for edge functions. No
node_modules, TypeScript-first, and the explicit permission model fits the serverless context perfectly. - Structured AI output is a product problem, not just a prompt problem. The schema you ask the model to return shapes the entire downstream user experience. Bad schema design shows up in the UI immediately.
- Property-based testing pays off fast for anything involving math or serialization. One
fast-checksuite caught more bugs in an hour than a week of example-based tests would have.
🔭 What's next for Athenaeum
The foundation is solid. Here's what's coming:
- 📸 Upload handwritten notes: photograph your paper notes and let AI extract, structure, and add them to your knowledge base automatically
- 🌐 Learn from online resources: paste a URL, article, or YouTube link and have AI ingest it into a structured lesson. This feature exists, but it takes time to process, and due to token limitations, it sometimes fails.
- 👥 Real-time collaboration: study together, build shared knowledge bases with teammates or classmates, and annotate each other's canvases live
- 🔁 Spaced repetition: surface flashcards and quizzes at the right time based on what you actually need to review
- 📊 Progress tracking: visualize your learning journey across topics and courses over time
The goal has always been the same: learning shouldn't get lost. Everything you study, sketch, and explore in Athenaeum stays structured, searchable, and ready - whenever you come back.
Built With
- ai
- gemini
- postgresql
- react
- supabase
- tailwind
Log in or sign up for Devpost to join the conversation.