Skip to content

Dev-muse/kitt

Repository files navigation

KittDen Logo

AI-Powered Voice Companion for Your Book Library

Upload your books, choose a voice persona, and have a real-time spoken conversation about any book in your library — powered by Vapi AI.


✨ Features

  • 🎙️ AI Voice Conversations — Talk to an AI assistant about any book using real-time voice sessions powered by Vapi AI and ElevenLabs voices.
  • 📚 Personal Book Library — Upload and manage your own collection of PDF books.
  • 🧠 Voice Personas — Assign unique AI voice personas to each book for a tailored conversational experience.
  • 💬 Live Transcripts — See your conversation transcribed in real time, including streaming partial messages.
  • 🔐 Authentication — Secure sign-in and sign-up via Clerk.
  • 💳 Subscription Management — Usage-based session limits tied to billing periods.
  • 🖼️ Cover Uploads — Upload custom book covers stored via Vercel Blob.
  • 🌗 Theme Support — Light and dark mode via next-themes.

🛠️ Tech Stack

Layer Technology
Framework Next.js 16 (App Router)
Language TypeScript 5
UI React 19, Tailwind CSS v4, shadcn/ui, Radix UI, Lucide Icons
Auth Clerk
Database MongoDB + Mongoose
AI Voice Vapi AI + ElevenLabs
File Storage Vercel Blob
PDF Processing pdfjs-dist
Forms React Hook Form + Zod
Notifications Sonner
Animations tw-animate-css

📂 Project Structure

kitt/
├── app/
│ ├── (root)/
│ │ ├── page.tsx # Book library homepage
│ │ ├── books/
│ │ │ ├── new/page.tsx # Upload a new book
│ │ │ └── [slug]/page.tsx # Book detail + voice controls
│ ├── api/
│ │ └── upload/ # File upload API routes
│ └── layout.tsx
├── components/
│ ├── BookCard.tsx # Library book card
│ ├── HeroSection.tsx # Landing hero
│ ├── VapiControls.tsx # Voice session controls
│ ├── Transcript.tsx # Real-time conversation transcript
│ ├── UploadForm.tsx # Book upload form
│ └── ui/ # Shared UI components (Navbar, Button, etc.)
├── database/
│ └── models/
│ ├── books.model.ts
│ ├── book-segments.model.ts
│ └── voice-sessions.model.ts
├── hooks/
│ └── useVapi.ts # Vapi session lifecycle hook
├── lib/
│ ├── actions/
│ │ ├── book.actions.ts # Book server actions
│ │ └── session.actions.ts # Voice session server actions
│ ├── constants.ts # Voice options, plans, etc.
│ └── subscription-contants.ts # Billing helpers
└── types.d.ts # Global TypeScript types

🚀 Getting Started

Prerequisites

1. Clone the repository

git clone https://github.com/Dev-muse/kitt.git
cd kitt

2. Install dependencies

npm install

3. Configure environment variables

Create a .env.local file in the project root:

# Clerk Authentication
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
CLERK_SECRET_KEY=your_clerk_secret_key
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
  
# MongoDB
MONGODB_URI=your_mongodb_connection_string

# Vapi AI
NEXT_PUBLIC_VAPI_API_KEY=your_vapi_public_key

# Vercel Blob
BLOB_READ_WRITE_TOKEN=your_vercel_blob_token

4. Run the development server

npm run dev

Open http://localhost:3000 in your browser.


📖 Usage

  1. Sign up / Sign in using the navbar auth buttons.
  2. Upload a book via the "Add New" page — provide a title, author, optional voice persona, PDF file, and cover image.
  3. Browse your library on the homepage and click a book to open it.
  4. Start a voice session by clicking the microphone button on the book page.
  5. Speak with the AI about the book — your conversation is transcribed in real time.
  6. End the session by clicking the mic button again.

🗃️ Database Models

Model Description
IBook Stores book metadata, file/cover URLs, voice persona, and slug
IBookSegment Stores extracted PDF content segments for AI context
IVoiceSession Tracks voice session start/end times and duration for billing

📜 License

This project is private and not currently licensed for public use.


Built with ❤️ by Dev-muse

```

Note: The logo is referenced from ./public/logo.png. If you'd also like to use the full SVG logo (./assets/logo-full.svg) for a crisper render at larger sizes in the README header, simply swap the src in the <img> tag to ./assets/logo-full.svg.

About

A fullstack application for document ingestion and AI-driven interaction, enabling users to upload books or documents and engage in voice-based conversations with an AI assistant trained on the uploaded content.

Resources

Stars

Watchers

Forks

Contributors