How I Built Labs.Gilga
I didn’t want a CMS. I didn’t want a Notion clone or another bloated editor. What I wanted was a thin layer of glass: a place where raw MDX could live, rendered cleanly, with just enough features to help me think better. That’s how labs.gilga came together.
The core is simple: every experiment is a .mdx
file with frontmatter. A post is nothing more than title, summary, status, tags, date, and (optionally) a hero image. This makes each experiment portable—copy the file anywhere, it still works.
Publishing is just pushing content to blob storage at the edge. The API wraps gray-matter to parse frontmatter, derives slugs automatically from the title, and stores the MDX as-is. No databases, no migrations, no schemas to babysit. Just text files with context.
On the frontend, I wired in Next.js dynamic routes so /slug
loads the experiment directly. A small Markdown renderer handles the basics, while optional components add superpowers:
- MermaidRenderer to visualize flows and systems.
- GalleryRenderer to turn a JSON block into a quick filmstrip of images.
- ImageEnhancer to make screenshots and diagrams explorable.
The admin layer is intentionally minimal. An inline MDX editor, preview side-by-side, media uploads via drag-and-drop, and a “Save” button that pushes to the same blob store. Sign-in is handled with a simple NextAuth credentials provider, locked to env vars, because this isn’t about teams or roles—it’s about me moving fast.
The result isn’t a CMS. It’s a laboratory. Every entry is an artifact of thinking, not a polished essay. Some are diagrams, some are scraps, some are half-baked product notes. By keeping the barrier to entry low, I can log the day’s experiments without friction and come back later to refine them.
In other words: labs.gilga isn’t built to impress. It’s built to capture. And capturing consistently is what eventually compounds into clarity.