# How to Vibe Code Your Own Tettra (and Stop Paying for It)

> AI-powered internal knowledge base and wiki for teams

- Site: https://tettra.com
- Category: SaaS / Knowledge Management
- Verdict: **Solid side project** (68/100 vibecodeable)
- Estimated effort: 2-3 weeks part-time

## Verdict

Build a personal internal wiki with AI semantic search and Slack answers in a few weeks, but paying $80/mo is rational if you lack time to wire Slack webhooks.

Building a personal knowledge base with markdown editing and a vector search RAG pipeline is a classic full-stack side project that is entirely manageable with AI coding agents. The real friction points are setting up Slack's Socket Mode event subscriptions, managing secure OAuth token handshakes for chat integration, and ensuring your vector chunks filter out unverified drafts. Since Tettra enforces a 10-user minimum ($80/month), building a personal instance for yourself or a tiny team saves money, provided you are willing to spend a couple of weekends wrestling with Slack event payloads.

### What you can't replicate

- Tettra's massive base of 20,000+ corporate teams
- Official GSoft corporate backing and maintenance
- Pre-existing user habits embedded in corporate Slack workspaces

## What it does

An internal knowledge management system featuring markdown documentation, content verification schedules, and an AI knowledge assistant that answers questions directly inside the web app or via Slack.

### Core features

- Markdown document editor with category hierarchy tree-view
- Google Docs and markdown file import engine
- Vector embeddings ingestion and chunking pipeline for knowledge base pages
- RAG query engine using OpenAI/Anthropic models for semantic Q&A
- Slack bot integration (Socket Mode, interactive block kits, thread summaries, channel Q&A)
- Content verification workflows (scheduled SME reviews, stale page detection)
- Public category sharing / static HTML export

## The business

### Pricing

- Scaling Plan: $8/mo — Per user per month with a 10-user minimum ($80/mo absolute floor). Includes core AI features, Slack bot integration, Google Workspace import, usage analytics, and API access.
- Enterprise Plan: Custom — For larger teams requiring advanced compliance, onboarding, and dedicated support.

### Funding

$1.5M raised.
- Seed (2016): $250K & $664K
- Seed (2018): $590K
Investors: Undisclosed angel investors, Micro-VCs, Acquired by GSoft (October 2023)

Founded 2015.
Team size: 7 to 15 employees.

## The hard parts

- Slack Socket Mode event handling, interactive block kits, and asynchronous thread summarization workflows
- Strict metadata filtering in RAG queries to ensure the AI only indexes verified, non-stale pages and respects document permissions
- Reliable recursive tree-view UI state management for deeply nested categories and article versioning

## How to vibe code Tettra

### Prerequisites

- Node.js (free): Required runtime for the Next.js full-stack application and CLI tools.
- GitHub (free): Source code repository and continuous deployment source for Vercel.
- Slack App Account (free): Required to register a custom Slack app, obtain Bot tokens, and configure Event Subscriptions for the AI assistant bot.

### Recommended AI tools

- Claude Code: Unmatched capability for scaffolding full-stack apps, writing robust backend database migrations, and configuring complex asynchronous event handlers like Slack webhooks.
- Cursor: Essential for iterative UI development, component styling with Tailwind, and inspecting complex React tree-view layouts.

### Stack

- Frontend: Next.js with Tailwind CSS and shadcn/ui components
- Backend: Next.js API routes / Server Actions with Node.js background processors
- Database: Neon (Serverless Postgres with pgvector extension for RAG embeddings)
- Auth: better-auth
- Payments: None (Personal-use clone skips billing entirely)
- Other: Vercel AI SDK, OpenAI API (GPT-4o & text-embedding-3-small), Slack Bolt for JavaScript (@slack/bolt)

### Hosting

- Vercel (Hosting the Next.js frontend, serverless API routes, and cron endpoints): $0/mo (Hobby tier)
- Neon (Serverless Postgres database with pgvector for document storage and semantic vector embeddings): $0/mo (Free tier)

### Build guide

1. **Project Scaffolding & Database Schema** — Initialize the Next.js 16 project with Tailwind CSS, shadcn/ui, better-auth, and connect to Neon Postgres with pgvector enabled.

```
Create a new Next.js project with TypeScript, Tailwind CSS, and App Router. Set up better-auth for email/password authentication. Configure Drizzle ORM to connect to Neon Postgres. Create database schemas for users, categories (with parent_id for hierarchical nesting), pages (title, content, category_id, status, verified_at, author_id), and page_embeddings (page_id, chunk_text, vector(1536)). Ensure pgvector extension is enabled via migration SQL. Deliver a clean, responsive dashboard layout with a sidebar category tree and markdown editor viewport.
```

2. **Knowledge Base Editor & Category Management** — Build the hierarchical category tree navigation and the markdown page editor with versioning and import capabilities.

```
Build a robust category and page management system in Next.js. Implement a collapsible sidebar tree-view supporting nested categories and drag-and-drop or reordering actions. Create a markdown editing view using a clean split-pane editor with live preview. Add server actions to handle creating, updating, archiving, and deleting pages and categories. Implement a simple file import utility that parses uploaded markdown files or pasted text into structured database pages.
```

3. **Vector Ingestion & RAG Pipeline** — Implement the text chunking, embedding generation via OpenAI, and pgvector semantic search engine.

```
Implement an automated RAG pipeline using the Vercel AI SDK and OpenAI embeddings (`text-embedding-3-small`). When a knowledge base page is created or updated, split its markdown content into overlapping text chunks (approx 500 tokens each), generate embedding vectors for each chunk via OpenAI API, and store them in the `page_embeddings` table linked to the page ID. Create an internal semantic search API route that accepts a natural language query, generates its embedding, performs a cosine similarity search against `page_embeddings` filtered by active/verified pages, and returns the top 5 relevant document chunks.
```

4. **AI Q&A Assistant (Kai) Web Interface** — Build the AI chat drawer and inline Q&A interface that answers questions using the company knowledge base chunks with citations.

```
Build an AI assistant chat interface component named 'Kai' accessible via a floating drawer in the web app. Using the Vercel AI SDK `useChat` hook, connect it to an API route that queries the RAG pipeline from Step 3, injects retrieved document chunks as context into system prompts for GPT-4o, and streams back answers with clear markdown source citations pointing to the original knowledge base pages. Handle edge cases where no relevant context is found by prompting the user to submit a page request.
```

5. **Slack Bot Integration** — Configure the Slack Bolt app to handle slash commands, app mentions, and direct messages, querying the RAG pipeline and posting answers back to Slack.

```
Implement a Slack integration module using `@slack/bolt` in Socket Mode. Set up event handlers for app mentions (`app_mention`) and direct messages (`message.im`). When a teammate asks a question in Slack, invoke the RAG semantic search pipeline to retrieve verified knowledge base answers, construct a formatted Slack Block Kit message with the answer and source links, and reply directly in the thread or channel. Include error handling for when Kai cannot find an answer, triggering an automated suggestion to notify a human expert.
```

6. **Content Hygiene & Verification Workflows** — Add verification schedules, unowned/stale page detection reports, and page request tracking.

```
Build a knowledge management hygiene dashboard. Implement a database tracking column for `verification_interval_days` and `last_verified_at` on pages. Create an automated query/report route that flags pages where `last_verified_at` exceeds the interval (stale pages) or where `author_id` is null (unowned pages). Build a UI page displaying these audit reports with action buttons for Subject Matter Experts (SMEs) to recertify pages in one click. Add a page request feature allowing team members to submit missing documentation requests.
```

7. **Polish, Export, & Deployment** — Add static HTML export for categories, configure environment variables, and deploy to Vercel.

```
Implement an export feature that allows users to export any category and its child pages as a structured zip archive of clean HTML files. Ensure all database queries, environment variables (`OPENAI_API_KEY`, `DATABASE_URL`, `SLACK_BOT_TOKEN`, `SLACK_SIGNING_SECRET`), and error boundaries are robust. Write clear deployment instructions for pushing the repository to GitHub and configuring production environment variables on Vercel.
```

### Cost vs paying

**Starting costs (one-time):**

- AI Coding Assistant subscription (Claude Pro / Cursor): $20
- Domain name (optional): $12
- Total: ~$32 one-time

**Ongoing costs (monthly):**

- Vercel Hobby Hosting & Neon Free Postgres: $0/mo
- OpenAI API Usage (Embeddings & GPT-4o queries for personal team): ~$3-5/mo
- Total: ~$4/mo

- Paying for the SaaS instead: $80/mo (10-user minimum on Scaling plan)
- Build time: 25-35 hours
- AI tool credits: $20 (one-month Claude Pro / Cursor subscription)
- Break-even: Immediate (replaces $80/mo minimum Tettra bill)

## Sources

- [Tettra Official Website & Pricing Pages](https://tettra.com)
- [GetLatka – Tettra Revenue & Financial Data Profile](https://getlatka.com/companies/tettra)
- [PitchBook – Tettra Company Profile & Funding History](https://pitchbook.com)
- [Slack App Marketplace – Tettra Integration Specs](https://slack.com)