audio-thumbnail
A narration of Building OpenKagi
0:00
/652.199184
This is an AI-narrated audio version of the post, generated for easy listening and accessibility. It’s powered by ElevenLabs (affiliate link), which helps create a voice similar to mine. You may notice the occasional mispronunciation or formatting quirk.

Screenshot of the OpenKagi homepage.

Over the last week of my paternity leave—mostly during those quiet wee morning hours when the house is still and my brain couldn't rest—I found myself building something I'd been thinking about for a few months. Today, OpenKagi is live: a community platform for discovering and sharing Kagi search lenses and themes.

Vlad somehow managed to find this the first day I pushed it without any public announcement in a... let's say not optimal state. Thanks for the Kagi team though. 💛

The Problem with Kagi's Hidden Gems

I've been using Kagi as my search engine since about January. It really wasn't until the last few months have been able to switch over to it in a full-time capacity. It's a big shake up to rework that workflow you've used since Google went mainstream. The search quality is exceptional, and there are no distractions and no ads, but what really hooked me were the lenses—customizable search configurations that let you prioritize certain domains, exclude others, or completely reshape your search results around specific topics or workflows.

The problem? Kagi's lenses and themes live in isolation. You create them, use them, maybe share a URL with a friend, but there's no central place to discover what the community has built. I'd find myself wondering: what lenses are others using? What themes make Kagi feel more personal? How are researchers configuring their academic searches? How are gamers finding the best digital download deals? How could I take an oddball lens, like narrowing down internet folklore, and share it with the world?

Kagi's community creates incredible stuff, but it stays scattered across Reddit comments, Discord messages, and personal blogs. That felt like a missed opportunity.

What I Built

OpenKagi is deliberately focused. The entire experience revolves around two things: lenses (search configurations) and themes (visual customizations). Here's the workflow:

No complex features, no feature creep, just a clean way to share and discover Kagi customizations.

Building At Night

There's something uniquely productive about those quiet hours between 1 and 4 AM. The constraints are real—you might get 20 minutes before the next feeding, or two hours if you're lucky—but they force a kind of focused development I rarely experience in the evenings when I just want to relax after a long day of work.

I started with the database schema during one of those sessions, mapping out the relationships between users, lenses, themes, and votes. By the end of the first night, I had the core data model figured out and the initial migration written.

The technical stack came together quickly: Next.js 15 with App Router, Supabase for the database and auth, Tailwind for styling, and Netlify for deployment. I wanted boring, reliable choices that would let me focus on the product, not the plumbing.

The Technical Deep Dive

Under the hood, OpenKagi is built around a few key decisions that prioritize speed and maintainability:

Database Design: The schema is intentionally simple. Four main tables—profiles, lenses, themes, and votes—with proper foreign key relationships and row-level security. The voting system uses a many-to-many relationship that prevents duplicate votes while maintaining fast queries for popularity sorting.

Authentication Flow: Supabase handles the heavy lifting here. Users can sign up with email/password or skip auth entirely for browsing. The RLS policies ensure users can only modify their own content while keeping everything else publicly readable.

Performance Optimizations: Database views for popular content (combining vote counts with content metadata), proper indexing on search and filter columns, and Next.js static generation for category pages that don't change often.

SEO Infrastructure: Dynamic sitemaps that auto-update when new lenses or themes are added, JSON-LD structured data for rich search results, and proper meta tags for social sharing. The site includes robots.txt and even an ai.txt file for AI crawler policies. The dynamic sitemaps makes sure we can index all new user profiles every 24 hours.

Rate Limiting: Simple IP-based rate limiting on API endpoints to prevent abuse without requiring authentication for basic browsing. This didn't come until today... after several bot swarms hit the site. 🫠

One thing I'm particularly proud of is the voting system. It's designed to be fast—no complex calculations, just straightforward queries that scale. Upvoting a lens instantly updates the popular lenses view without any background jobs or cache invalidation complexity.

Design Philosophy: Less is More

I wanted OpenKagi to feel like it belonged in Kagi's ecosystem. The design is minimal, fast, and focused entirely on the content. No flashy animations, no unnecessary complexity, just a clean interface that gets out of the way.

Every page loads fast. The homepage shows popular and recent content in a grid layout that works well on desktop and mobile. Individual lens and theme pages include all the details you need—description, category, tags, submission date, and vote count—plus that crucial "Try" button that takes you directly to the configuration without a fuss.

Community-First Features

The voting system is the heart of OpenKagi's curation. It's simple—one vote per user per item—but it creates a natural way for quality content to rise to the top. I debated more complex systems (ratings, comments, reviews) but decided that simplicity would encourage more participation.

The tagging system lets contributors add flexible metadata to their submissions. Want to find lenses specifically for academic research? Search for the "academic" tag. Looking for themes with dark backgrounds? Filter by "dark mode." It's designed to grow organically with the community's needs.

User profiles are intentionally lightweight. Username, optional bio, optional website and Bluesky handle. The focus stays on the lenses and themes, not on building a social network. You're not uploading avatars and you're not dealing with adding friends.

SEO and Discoverability

One of my goals was making OpenKagi discoverable beyond the existing Kagi community. The site includes comprehensive SEO infrastructure:

Structured Data: Every lens and theme page includes JSON-LD markup that helps search engines understand the content type, creation date, author, and relationships.

Dynamic Sitemaps: The sitemap auto-generates and includes all lenses, themes, category pages, and user profiles. It updates automatically when new content is added.

Social Sharing: Open Graph and Twitter Card meta tags ensure that shared links look good on social platforms and include relevant preview images.

Performance: The site scores well on Core Web Vitals, with fast loading times and responsive design that works across devices.

All of this technical SEO work happens behind the scenes, but it's crucial for helping people discover OpenKagi when they're searching for "Kagi lenses" or "customize Kagi search."

What's Next

Right now, OpenKagi has everything needed for a functioning community: browsing, searching, voting, and submitting. But there are a few features on the roadmap that could make it even more useful. I'll continue to improve little things on the site over the next few weeks. So, expect some performance improvements, some visual design tweaks, and maybe some new features.

Right now, the focus is going to be some early stage growth. Before I work on anything, we need users to help build out the content of the community.

The Week That Was

Building OpenKagi during that last week of paternity leave was about having a focused project that I could chip away at during those fragmented moments. Something to help my mind break free of the anxious feeling I had returning to work for the first time in nearly seven weeks. No meetings, no stakeholder feedback, no committee decisions—just the pure satisfaction of building something useful and shipping it.

The constraints were actually liberating. With only a few hours here and there, every decision had to be intentional. No time for bikeshedding or over-engineering. The MVP had to be truly minimal, and that forced clarity about what really mattered.

By the end of the week, I had a working application, a proper domain, database backups, monitoring, and a small but growing collection of community-submitted lenses and themes.

Try It Out

If you're using Kagi and want to discover new ways to customize your search experience, check out OpenKagi. Browse the community's lenses and themes, submit your own creations, and help build a resource that makes Kagi even more powerful for everyone.

The site is free to use and will stay that way. It's a community resource, built by someone who genuinely loves what Kagi is doing for search and wants to help others discover the depth of customization possible.

You can find me on Bluesky if you want to chat about OpenKagi, Kagi, or building side projects. I'd love to hear what lenses and themes you create.