Skip to content

IBs-DevStudio/Cogniva-Personalized.AI.Tutoring-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

38 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Cogniva - Instant AI Learning Platform

Part of IB's Dev World Project Series

An AI-powered learning companion that delivers personalized tutoring for any subject in 2-60 minute focused sessions. Perfect for students cramming before exams, professionals preparing for interviews, or anyone needing instant knowledge access.

✨ Key Features

  • πŸ€– Custom AI Companions - Create personalized tutors in 60 seconds
  • πŸŽ™οΈ Voice-Powered Learning - Natural conversations with AI tutors using Vapi
  • ⚑ Instant Access - From 2-minute quick reviews to 60-minute deep dives
  • πŸ“š 7 Core Subjects - Interview, Coding, CS Fundamentals, Math, Science, Communication, ML
  • πŸ“ˆ Progress Tracking - Gamified learning journey with detailed analytics
  • πŸ’Ύ Personal Library - Your custom tutors available 24/7

🎯 Perfect For

  • Students preparing for exams with limited time
  • Job seekers needing quick interview preparation
  • Professionals requiring focused skill refreshers
  • Anyone wanting personalized learning on-demand

πŸ› οΈ Tech Stack

  • Frontend: Next.js 14, TypeScript, Tailwind CSS
  • Authentication: Clerk
  • Database: Supabase
  • Voice AI: Vapi
  • Payments: Stripe
  • Deployment: Vercel

πŸš€ Getting Started

Prerequisites

  • Node.js 18+ installed
  • npm/yarn/pnpm/bun package manager

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/cogniva.git
    cd cogniva
  2. Install dependencies

    npm install
    # or
    yarn install
    # or
    pnpm install
    # or
    bun install
  3. Environment Setup Create a .env.local file in the root directory:

    # Clerk Authentication
    NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
    CLERK_SECRET_KEY=your_clerk_secret_key
    
    # Supabase
    NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
    NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
    
    # Vapi Voice AI
    VAPI_API_KEY=your_vapi_api_key
    
    # Stripe
    STRIPE_PUBLIC_KEY=your_stripe_public_key
    STRIPE_SECRET_KEY=your_stripe_secret_key
  4. Run the development server

    npm run dev
    # or
    yarn dev
    # or
    pnpm dev
    # or
    bun dev
  5. Open your browser Navigate to http://localhost:3000 to see the application.

πŸ“± Usage

Creating Your First AI Companion

  1. Sign up/Login using Clerk authentication
  2. Navigate to "Build & Personalize" section
  3. Choose your subject from 7 core categories
  4. Configure your tutor - name, description, voice, teaching style
  5. Set session duration (2-60 minutes)
  6. Click "Build Your Companion" - ready in seconds!

Starting a Learning Session

  1. Go to your Companion Library
  2. Select any companion
  3. Click "Launch Lesson"
  4. Start voice conversation with your AI tutor
  5. Learn naturally through conversation

🎨 Project Structure

cogniva/
β”œβ”€β”€ app/                    # Next.js App Router
β”‚   β”œβ”€β”€ dashboard/         # Dashboard pages
β”‚   β”œβ”€β”€ companions/        # Companion management
β”‚   β”œβ”€β”€ api/              # API routes
β”‚   └── globals.css       # Global styles
β”œβ”€β”€ components/           # Reusable UI components
β”œβ”€β”€ lib/                 # Utility functions
β”œβ”€β”€ public/              # Static assets
└── types/               # TypeScript definitions
cogniva-saas/
β”œβ”€β”€ app/                    # Next.js 14 App Router
β”‚   β”œβ”€β”€ api/               # API Routes
β”‚   β”‚   └── sentry-example-api/
β”‚   β”‚       └── route.ts   # Example API endpoint
β”‚   β”œβ”€β”€ companions/        # AI Companion Management
β”‚   β”‚   β”œβ”€β”€ [id]/         # Dynamic companion routes
β”‚   β”‚   β”‚   └── page.tsx  # Individual companion page
β”‚   β”‚   β”œβ”€β”€ new/          # Create new companion
β”‚   β”‚   β”‚   └── page.tsx
β”‚   β”‚   └── page.tsx      # Companions listing
β”‚   β”œβ”€β”€ my-journey/       # User progress tracking
β”‚   β”‚   └── page.tsx
β”‚   β”œβ”€β”€ sign-in/          # Authentication
β”‚   β”‚   └── [[...sign-in]]/
β”‚   β”‚       └── page.tsx  # Clerk auth integration
β”‚   β”œβ”€β”€ subscription/     # Subscription management
β”‚   β”‚   └── page.tsx
β”‚   β”œβ”€β”€ sentry-example-page/  # Error monitoring
β”‚   β”‚   └── page.tsx
β”‚   β”œβ”€β”€ favicon.ico
β”‚   β”œβ”€β”€ global-error.tsx  # Global error boundary
β”‚   β”œβ”€β”€ globals.css       # Global styles
β”‚   β”œβ”€β”€ layout.tsx        # Root layout
β”‚   └── page.tsx          # Landing page
β”œβ”€β”€ components/           # Reusable React Components
β”‚   β”œβ”€β”€ ui/              # Shadcn/ui Component Library
β”‚   β”‚   β”œβ”€β”€ accordion.tsx
β”‚   β”‚   β”œβ”€β”€ button.tsx
β”‚   β”‚   β”œβ”€β”€ form.tsx
β”‚   β”‚   β”œβ”€β”€ input.tsx
β”‚   β”‚   β”œβ”€β”€ label.tsx
β”‚   β”‚   β”œβ”€β”€ select.tsx
β”‚   β”‚   β”œβ”€β”€ table.tsx
β”‚   β”‚   └── textarea.tsx
β”‚   β”œβ”€β”€ CTA.tsx          # Call-to-action component
β”‚   β”œβ”€β”€ CompanionCard.tsx    # AI companion card
β”‚   β”œβ”€β”€ CompanionComponent.tsx   # Main companion interface
β”‚   β”œβ”€β”€ CompanionForm.tsx    # Companion creation form
β”‚   β”œβ”€β”€ CompanionsList.tsx   # List of companions
β”‚   β”œβ”€β”€ NavItems.tsx     # Navigation items
β”‚   β”œβ”€β”€ Navbar.tsx       # Main navigation
β”‚   β”œβ”€β”€ SearchInput.tsx  # Search functionality
β”‚   └── SubjectFilter.tsx    # Subject filtering
β”œβ”€β”€ lib/                 # Core Business Logic
β”‚   β”œβ”€β”€ actions/         # Server actions
β”‚   β”‚   └── companion.actions.ts  # Companion CRUD operations
β”‚   β”œβ”€β”€ supabase.ts      # Supabase client configuration
β”‚   β”œβ”€β”€ utils.ts         # Utility functions
β”‚   └── vapi.sdk.ts      # Vapi SDK integration
β”œβ”€β”€ types/               # TypeScript Definitions
β”‚   β”œβ”€β”€ index.d.ts       # Global type definitions
β”‚   └── vapi.d.ts        # Vapi-specific types
β”œβ”€β”€ constants/           # Application Constants
β”‚   β”œβ”€β”€ index.ts         # General constants
β”‚   └── soundwaves.json  # Audio visualization data
β”œβ”€β”€ public/              # Static Assets
β”‚   β”œβ”€β”€ icons/           # SVG icons
β”‚   β”‚   β”œβ”€β”€ bookmark-filled.svg
β”‚   β”‚   β”œβ”€β”€ bookmark.svg
β”‚   β”‚   β”œβ”€β”€ coding.svg
β”‚   β”‚   β”œβ”€β”€ maths.svg
β”‚   β”‚   β”œβ”€β”€ mic-off.svg
β”‚   β”‚   β”œβ”€β”€ mic-on.svg
β”‚   β”‚   └── [other icons]
β”‚   β”œβ”€β”€ images/          # Static images
β”‚   β”‚   β”œβ”€β”€ cta.svg
β”‚   β”‚   β”œβ”€β”€ logo.svg
β”‚   β”‚   └── limit.svg
β”‚   └── readme/          # Documentation assets
β”œβ”€β”€ middleware.ts        # Next.js middleware
β”œβ”€β”€ instrumentation.ts   # Monitoring setup
β”œβ”€β”€ sentry.*.config.ts   # Error monitoring config
└── components.json      # Shadcn/ui configuration

πŸ’‘ How It Works

@@ -138,17 +202,16 @@

πŸš€ Deployment

Deploy on Vercel (Recommended)

Push to GitHub repository Connect to Netlify - netlify.com/start Add environment variables in Netlify dashboard under Site settings > Environment variables Deploy - Automatic deployment on every push

  1. Push to GitHub repository
  2. Connect to Vercel/netlify - vercel.com/new
  3. Add environment variables in Vercel dashboard
  4. Deploy - Automatic deployment on every push Alternative Deployment Options

Alternative Deployment Options

  • Netlify: Connect your repo and deploy
  • Railway: Simple deployment with database included
  • Docker: Use provided Dockerfile for containerization Vercel: Connect your repo for seamless Next.js deployment Railway: Simple deployment with database included Docker: Use provided Dockerfile for containerization

🀝 Contributing

@@ -159,11 +222,7 @@ 3. Commit your changes (git commit -m 'Add amazing feature') 4. Push to the branch (git push origin feature/amazing-feature) 5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Next.js team for the amazing framework @@ -174,10 +233,10 @@

πŸ“ž Contact & Support

About

An AI learning app where students get instant voice tutors for interviews, exams, and learning any subject quickly

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors