[KongchangAI]
· 4 min read· 2,371 words

From 0 to 1: Vibe Coding an AI Knowledge Base — A Practical Retrospective and Tech Stack Breakdown

From 0 to 1: Vibe Coding an AI Knowledge Base — A Practical Retrospective and Tech Stack Breakdown

A creator's full retrospective and tech stack lessons from independently building the AI knowledge base OilBook with Vibe Coding.

This article reviews how a creator independently built the AI knowledge base website OilBook using Vibe Coding. It explains why they abandoned off-the-shelf platforms for a self-built site's organic traffic, full customization, and lower long-term learning costs; breaks down the Next.js + Neon + local Markdown stack for SEO, free quotas, and AI-friendliness; covers the six Oil Dev Skill skills, lightweight login, Stripe payments, and server-side paywall enforcement; proposes interview-style writing plus lint scripts to govern AI flavor; and concludes with Vercel deployment, Cloudflare domain setup, and five reusable takeaways.

From 0 to 1: Vibe Coding an AI Knowledge Base — A Practical Retrospective and Tech Stack Breakdown

A creator independently built an AI knowledge base website called OilBook using the Vibe Coding approach, taking the product through the entire launch pipeline — from requirements analysis and tech stack selection to payment integration and content production. This article is based on their Bilibili sharing video and breaks down the key decisions and reusable lessons.

How to describe requirements to AI

Why not use an existing platform? Three key considerations

The original motivation for building an AI knowledge base was straightforward: video content is hard to search, has low text density, and some of it lends itself well to a paid product. But there are plenty of existing knowledge base and column tools on the market. The author ultimately chose to build an independent site for three reasons.

First, traffic and exposure. Off-the-shelf private-domain knowledge base tools don't come with organic traffic, and converting from public platforms to a private domain is very difficult. A public website, by contrast, is naturally easy to demo and access, can be indexed by search engines, and offers a simpler exposure path. Second, customization. A self-built site allows free adjustment of text presentation, font size, and even adding a read-aloud feature, unconstrained by platform templates. Third, development cost. Given the author's existing development and payment integration experience, building a product was actually easier than learning to use another one.

This judgment is worth considering for many creators: when the limitations of off-the-shelf tools start to hurt the product experience, the barrier to building your own may not be as high as you think.

Public domain vs. private domain is a foundational pair of concepts in content operations. Public domain refers to open traffic pools reachable through platform algorithmic recommendations and user-initiated search, such as search engines, Bilibili, and Xiaohongshu. Private domain refers to user assets that creators can repeatedly and directly reach without relying on platform distribution, such as email lists, WeChat groups, and memberships on their own websites. Private-domain tools (like Knowledge Planet or Xiaobaotong) have the advantage of short operational chains and direct paid conversion, but the drawback of not bringing their own traffic — you need to move people over from the public domain first. A public website, meanwhile, has both public-domain attributes (indexable by search engines, shareable links for demos) and private-domain accumulation capability (registration, login, membership system), which is precisely why the author chose a self-built website over a pure private-domain tool.

Tech stack: Next.js + Neon + local Markdown

The stack was chosen as the combination the author knew best. Frontend and lightweight backend were unified under Next.js, the database is Neon, and course content is rendered directly from local Markdown files without introducing a CMS framework.

The reasons for choosing Next.js include: it's a mainstream frontend framework today, can handle lightweight backend work, is SEO-friendly and easy for search engines to crawl, and AI is very familiar with Next.js — unifying the framework within one repository lowers AI's comprehension and generation costs. For the database, both Neon and Supabase are mainstream cloud PG database services, but Neon's free tier doesn't limit the number of databases, while Supabase allows at most two projects. For scenarios with many projects where some products launch but have few users, Neon saves money.

Content uses local Markdown rather than a database because articles rarely need to be typed manually — most content is organized by AI from drafts. Having AI edit local Markdown is simpler than introducing an external framework, and when writing new content, AI can easily recall relevant files in the workspace as context.

Neon and Supabase are both cloud database services (BaaS) based on PostgreSQL, but they have different product positioning. Supabase is closer to an "out-of-the-box backend platform," offering a full suite of capabilities beyond the database such as authentication, storage, and real-time subscriptions. Neon focuses on the database itself, emphasizing serverless architecture, on-demand scaling, and "database branching" (similar to Git branches, allowing you to create independent data copies for preview environments). Neon's free tier allows creating multiple projects with each project billed for idle time independently, making it suitable for indie developers maintaining several small products at once. Supabase's free tier limits the number of active projects, making it easy to hit the ceiling in multi-project scenarios. Understanding this difference clarifies exactly why the author found Neon more economical when "running many projects, some with few users."

Product design with AI: from three styles to one book

The starting point for product visuals isn't the name — it's the imagery. A knowledge base could be expressed as a blog site, a planet concept, or a book form. The author first had AI derive three different design styles from their own skill: a modern, clean blog style; a light magazine booklet style; and a classical, grounded book style. The final choice was a skeuomorphic book design, because it leaves a deeper impression.

The name "OilBook" gradually emerged through exploration, and the domain uses book as a subdomain prefix. Module design also went through multiple rounds of refinement — the model recommendation module alone iterated through three versions, with the final form differing from all three initial ones.

The detail page optimization is even more representative. AI's first version placed text in the middle with no left-side table of contents, resulting in poor readability. The author laid out a series of specific requirements: use a warmer background color, support dark and light mode switching, reduce the excessive nested borders produced by Markdown rendering, keep the subscribe button consistent with the top button style, slightly increase letter spacing and line height above normal, and control paragraph length to avoid being too fragmented or too long. These adjustments were codified into a design.md design specification, which subsequent new features can build on to maintain stylistic consistency.

How to use this skill

Oil Dev Skill: six skills covering the full development workflow

The author open-sourced Oil Dev Skill, which contains six skills used at different stages of development.

The most-used one is Oil Plan. Compared with the AI agent's built-in plan mode, it has two core differences: the plan leans more toward business concerns and strictly requires that a human can understand it — the agent's built-in plan often lists technically heavy content that is hard to read, leaving developers with little control over the hours of work that follow. After writing the plan, it launches a sub-agent to review it and fill in business details the main agent missed, usually producing a more complete result than the first version.

Oil Code Review is used to perform code review against specifications and fix issues. Oil Govern manages project documentation, keeping what's necessary in agents.md and cutting what isn't, while maintaining specifications for course writing, image generation, and releases. The author emphasizes an important habit: every time AI misunderstands intent or falls short in execution (not a bug), after fixing it, always have AI go back and optimize the corresponding specification to reduce repeated input later.

There's also Oil Explore for dispatching multiple sub-agents to explore the project, but this project wasn't complex enough to need it often.

Login and payments: a lightweight solution is enough

The backend didn't introduce a third-party login framework but implemented a lightweight solution directly with Next.js backend APIs plus Neon database. Two login methods are supported: passwordless email login integrated with the Resend email service, and Google login by creating a web application OAuth authorization in the Google Cloud credentials console and filling in the callback address. These configurations are simple for AI, and you can even use browser automation to let AI fill in the credentials itself.

Payments use Strap (as written in the original, actually referring to Stripe). You only need a Hong Kong bank card to activate it, it supports domestic payment channels, and the author has used it for multiple products. Integration is also effortless: many AI agents come with a Strap plugin; if not, install its CLI, and from creating products to debugging, human involvement is minimal. What humans need to handle is pricing decisions — one-time purchase or subscription, how much to charge, and whether to offer coupons.

Decisions humans need to make

The paywall is the security linchpin of a knowledge base website. Some content requires a Pro membership to unlock, and it must never be blocked only via frontend styling — the backend API must not respond with paid content to the frontend at all. The author recommends having AI review from every angle to confirm there are no business-related data leakage issues.

Server-side enforcement of the paywall is a basic requirement for content product security. Frontend styling occlusion (such as CSS blurring or hiding DOM nodes) is only visual-level hiding — the paid content itself has already been sent to the browser along with the page, and users can obtain the full text through developer tools, packet capture, or directly requesting the API, rendering the paywall useless. The correct approach is to determine the current user's membership status during server-side rendering or API response: when an unpaid user requests, the backend simply doesn't return the paid field content, so the text doesn't exist in the data the frontend receives. This requires content storage and permission checks to be bound within the same request chain, rather than returning everything first and letting the frontend decide whether to display it. The author's emphasis on "having AI review from every angle" is precisely because such vulnerabilities are easily overlooked when generating code.

Content production: interview-style writing and AI-flavor governance

During content planning, the author had AI analyze subtitles, transcripts, and scripts from all past videos to distill systematic course topics. But directly having AI organize spoken scripts into course articles has four obvious problems: video information density is insufficient — spoken delivery contains a lot of on-the-fly additions, and a video tens of minutes long becomes only a few hundred words as an article; the narrative thread AI organizes differs from the author's own, reading off-key; the text should be a super-condensed version of the video; and old videos have timeliness issues, with AI writing in outdated models and past thinking.

The solution is interview-style writing: AI acts as the interviewer, asking questions around a topic while the author uses voice input to state their current real practices and judgments, and AI records each round of oral dictation verbatim — not a single character may be changed. After everything is discussed and the original transcript confirmed accurate, AI is then asked to organize it into formal chapters, with only minimal adjustments allowed.

Even so, AI's organization still embellishes and forgets earlier requirements. The author therefore wrote a copy review lint script that sets words absolutely not allowed to appear and checks automatically after each writing session. It mainly targets Gemini's verbal tics, such as stiff clichés like "a very specific pain point," "a very specific problem," "very direct," and "the reason is very real," as well as self-emphasis like "what I'm telling you now is plain talk," and anthropomorphic exaggerated modifiers like "underlying," "temper," "sweat to death," and "dizzy."

The problem of too many single-character verbs

After each writing session, an independent sub-agent also does two reviews: read through to check whether transitions are natural; and from the perspective of a reader unfamiliar with the content, check whether any concepts are introduced abruptly without context — for example, function parameters that are too complex, which are laborious for non-technical readers.

For illustrations, text descriptions are separated from images — images are AI-generated, while the descriptive text above is written separately by AI rather than generated into the image, making later editing easier. AI image generation is also used for icons, logos, and book covers. Cover specifications require avoiding duplication with existing images, and prompts are retained after each generation for AI's reference.

"AI flavor" refers to the templated expressions and rhetorical habits that repeatedly appear in large-model-generated text, typically manifesting as empty summary sentences ("this is key," "the reason is very real"), excessive self-emphasis, stiff anthropomorphic modifiers, and high-frequency abstract words like "underlying logic" and "essentially." It arises because models learn the statistically most common phrasing combinations from large corpora and tend to fill content with safe, generic, universally applicable sentences. There are generally two ways to govern AI flavor: input-side control, using interview-style writing to make real oral dictation the sole source of truth and limit the model's room for free improvisation; and output-side control, using lint scripts to maintain a banned-word list and distilling human review experience into automatically executable rules. Only by combining both can generated text retain personal judgment and linguistic feel.

Deployment: Vercel + Cloudflare domain

The service runs on Vercel, code is hosted on GitHub, pushing code triggers automatic Vercel deployment, and subdomains are configured in Vercel. The domain is purchased on Cloudflare; a typical cheap domain costs about $10 (roughly 70 RMB), and you can reuse it by adding prefixes under the main domain — one domain can serve multiple websites.

The newsletter feature is implemented with Resend: after publishing a new article, call a script to find users from the data table who are logged in and have confirmed they want notifications, then send emails. Email templates can be made more polished, and so can the login verification code template — these are all HTML, so you can have AI design them and send test emails to your own account to confirm the effect, which noticeably strengthens the mature-product feel.

Key takeaways

  • The core value of a self-built independent website lies in organic traffic exposure, fully customizable interaction, and lower long-term learning costs.
  • The combination of Next.js + Neon + local Markdown balances SEO, free-tier quotas, and AI-friendliness.
  • Oil Plan's two designs — "human-readable" and "sub-agent review" — compensate for the built-in agent plan mode's insufficient business control.
  • Paid content must be intercepted on the server side and cannot rely on frontend styling occlusion.
  • Interview-style writing plus lint scripts is a viable path to controlling AI flavor and preserving personal judgment.
#Vibe Coding#AI knowledge base#Next.js#Neon#Stripe paywall#AI-flavor governance#Vercel deployment
Share:

Related articles