Skip to content

NK2552003/MINDROUTE_DOCUMENTATION

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

18 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ—ΊοΈ MindRoute - AI-Powered Learning Roadmap Generator

MindRoute Logo

Next.js TypeScript React Tailwind CSS Supabase License

Transform your learning goals into interactive, personalized roadmaps with AI-powered insights and community-driven content.

πŸ“– Table of Contents

πŸ—οΈ Getting Started

  1. Overview
  2. Features

πŸ› οΈ Development Guide

  1. Architecture & Technology Stack
  2. Project Structure
  3. User Flow & Functionality
  4. UI Components Guide

πŸ“š Technical Documentation

  1. API Reference
  2. Database Schema
  3. Tree-to-Flow Algorithm
  4. Background Jobs

🎨 Design & Assets

  1. UI Design System
  2. Component Library
  3. Responsive Design

🌟 Overview

MindRoute is an intelligent learning roadmap generator that transforms your educational goals into interactive, personalized learning paths. Built with modern web technologies and powered by AI, it provides:

🎯 Core Features

  • AI-Powered Generation: Create custom learning roadmaps using GPT-4
  • Interactive Visualization: Navigate through your learning journey with React Flow
  • Community Sharing: Discover and share roadmaps with the community
  • Progress Tracking: Monitor your learning progress with visual indicators
  • Multi-Format Content: Courses, projects, and FAQ sections for comprehensive learning
  • Responsive Design: Seamless experience across desktop, tablet, and mobile

πŸ”§ Key Capabilities

  • Generate roadmaps for any learning topic
  • Personalize based on skill level and learning style
  • Export roadmaps in multiple formats
  • Real-time collaboration and sharing
  • Integration with external learning resources

✨ Features

πŸ€– AI-Powered Roadmap Generation

  • Smart Input Form: Collect learning goals, duration, skill level, and preferences
  • GPT-4 Integration: Generate structured, comprehensive learning paths
  • Background Processing: Inngest-powered job queue for seamless user experience
  • Customizable Prompts: Tailor AI responses to specific learning domains

🎨 Interactive Visualization

  • Dynamic Flowcharts: Navigate learning paths with React Flow
  • Custom Node System: Color-coded topics with hierarchical organization
  • Multiple View Modes: Switch between flowchart and tree hierarchy
  • Zoom & Pan Controls: Explore large roadmaps with ease

πŸ“š Comprehensive Content

  • Roadmap Tab: Interactive flowchart with clickable nodes
  • Courses Tab: Curated course recommendations
  • Projects Tab: Hands-on projects and templates
  • FAQ Tab: Common questions and expert answers

πŸ‘₯ Community Features

  • Public Roadmaps: Browse featured community roadmaps
  • Private Workspaces: Create and manage personal roadmaps
  • Sharing System: Generate shareable links for collaboration
  • User Authentication: Secure access with Clerk integration

πŸ—οΈ Architecture & Technology Stack

MindRoute is built on a modern, scalable architecture that combines the best of React ecosystem with powerful AI capabilities:

πŸ”§ Core Technologies

Frontend Framework

  • Next.js 15.1.8: App Router, Server Components, API Routes
  • React 19.1.0: Functional components with modern hooks
  • TypeScript 5.x: Full type safety and developer experience

Styling & UI

  • Tailwind CSS 3.4.1: Utility-first styling with custom design system
  • React Flow 11.11.4: Interactive flowchart visualization
  • Framer Motion 12.15.0: Smooth animations and transitions
  • Lucide React: Modern icon library

Data & State Management

  • Supabase 2.49.8: PostgreSQL database with real-time subscriptions
  • Clerk 6.20.0: Authentication and user management
  • React Context: Global state management
  • Inngest 3.38.0: Background job processing

AI & External APIs

  • OpenAI GPT-4: Via GitHub Models API for roadmap generation
  • Custom Prompts: Engineered for educational content generation
  • Background Processing: Async AI generation with progress tracking

πŸ“ Project Structure

tattva/
β”œβ”€β”€ πŸ“± app/                           # Next.js App Router
β”‚   β”œβ”€β”€ 🏠 pages/mindroute/          # Main MindRoute interface
β”‚   β”‚   β”œβ”€β”€ page.tsx                 # Landing page with form
β”‚   β”‚   └── _components/             # Page-specific components
β”‚   β”‚       β”œβ”€β”€ form_comp.tsx        # Input form
β”‚   β”‚       β”œβ”€β”€ header_2.tsx         # Page header
β”‚   β”‚       └── RoadmapGrip.tsx      # Roadmap grid display
β”‚   β”‚
β”‚   β”œβ”€β”€ πŸ—ΊοΈ (routes)/roadmap/[libid]/ # Dynamic roadmap pages
β”‚   β”‚   β”œβ”€β”€ page.tsx                 # Roadmap visualization
β”‚   β”‚   └── _components/             # Roadmap components
β”‚   β”‚       β”œβ”€β”€ CustomNode.tsx       # Interactive nodes
β”‚   β”‚       β”œβ”€β”€ HierarchyModal.tsx   # Tree view
β”‚   β”‚       β”œβ”€β”€ LoadingStatus.tsx    # Progress indicators
β”‚   β”‚       └── tabs/                # Content tabs
β”‚   β”‚           β”œβ”€β”€ roadmap-tab.tsx  # Flowchart view
β”‚   β”‚           β”œβ”€β”€ courses-tab.tsx  # Course recommendations
β”‚   β”‚           β”œβ”€β”€ projects-tab.tsx # Project suggestions
β”‚   β”‚           └── faq_questions-tab.tsx # FAQ section
β”‚   β”‚
β”‚   β”œβ”€β”€ πŸ”Œ api/                      # Backend API routes
β”‚   β”‚   β”œβ”€β”€ roadmap/route.ts         # Roadmap generation
β”‚   β”‚   β”œβ”€β”€ roadmap-extra-data/      # Additional content
β”‚   β”‚   └── generate-hierarchy-json/ # Tree structure API
β”‚   β”‚
β”‚   β”œβ”€β”€ 🧩 components/               # Shared components
β”‚   β”‚   β”œβ”€β”€ types/roadmap.ts         # TypeScript interfaces
β”‚   β”‚   └── utils/                   # Utility functions
β”‚   β”‚       β”œβ”€β”€ tree-to-flow.ts      # Converts tree to flowchart
β”‚   β”‚       β”œβ”€β”€ helpers.ts           # Common utilities
β”‚   β”‚       └── prompt.ts            # AI prompt templates
β”‚   β”‚
β”‚   └── πŸ”§ services/                 # External integrations
β”‚       β”œβ”€β”€ supabase.tsx             # Database client
β”‚       └── constants.ts             # Configuration
β”‚
β”œβ”€β”€ ⚑ inngest/                      # Background jobs
β”‚   β”œβ”€β”€ client.ts                    # Inngest configuration
β”‚   └── functions.ts                 # Job definitions
β”‚
β”œβ”€β”€ 🎨 public/                       # Static assets
└── πŸ“ docs/                         # Documentation
    β”œβ”€β”€ mindroute-user-flow.md       # User flow diagrams
    └── mindroute-ui-design-guide.md # UI component guide

🌊 User Flow & Functionality

For detailed user flow documentation, see: MindRoute User Flow Guide β‡ β‡ β‡ β‡ β‡ β‡ β‡ β‡ β‡ πŸ‘ˆπŸ»

🎯 Core User Journey

graph TD
    A[User visits MindRoute] --> B[Fill learning form]
    B --> C[AI generates roadmap]
    C --> D[Interactive visualization]
    D --> E[Explore content tabs]
    E --> F[Share & collaborate]
Loading

πŸ“ Step-by-Step Process

  1. Input Collection

    • Learning goal (e.g., "Frontend Developer")
    • Duration preference (e.g., "12 weeks")
    • Weekly time commitment
    • Current skill level
    • Learning style preference
  2. AI Processing

    • Background job triggered via Inngest
    • GPT-4 generates structured roadmap
    • Content saved to Supabase database
  3. Visualization

    • Tree-to-flow algorithm converts data
    • Interactive React Flow component renders
    • Color-coded hierarchical layout
  4. Content Exploration

    • Navigate flowchart nodes
    • Switch between content tabs
    • Access courses, projects, and FAQ
  5. Collaboration

    • Share roadmap with unique URLs
    • Public/private visibility options
    • Community discovery features

🎨 UI Components Guide

For comprehensive UI documentation, see: MindRoute UI Design Guide β‡ β‡ β‡ β‡ β‡ β‡ β‡ β‡ β‡ πŸ‘ˆπŸ»

🧩 Core Components

Form Component (form_comp.tsx)

  • Multi-field input collection
  • Real-time validation
  • Dropdown menus with icons
  • Progress indication

Interactive Flowchart (CustomNode.tsx)

  • Custom React Flow nodes
  • Color-coded hierarchy
  • Hover and click interactions
  • Connection handles

Tab Navigation (tab-navigation.tsx)

  • Four content sections
  • Smooth transitions
  • Mobile-responsive
  • Progress indicators

Loading States (LoadingStatus.tsx)

  • Progressive loading bars
  • Status message updates
  • Skeleton animations
  • Error handling

🎨 Design System

Color Palette

  • Primary: #178d73 (Teal green)
  • Background: #131a19 (Dark gray-green)
  • Borders: #2d3d3b (Medium gray-green)
  • Text: White with gray placeholders

Typography

  • Headers: 2.5rem, bold, tight letter-spacing
  • Body: 1rem, regular, 1.6 line-height
  • Captions: 0.875rem, medium, 0.8 opacity

πŸ“š API Reference

πŸ”Œ Core Endpoints

POST /api/roadmap

Generate a new roadmap with AI assistance.

Request Body:

{
  "libId": "uuid-string",
  "formData": {
    "goal": "Frontend Developer",
    "duration": "12 Weeks",
    "weeklyHours": "10 Hours/week",
    "skillLevel": "beginner",
    "learningStyle": "mixed"
  }
}

Response:

{
  "inngestRunId": "job-id-string",
  "status": "processing"
}

GET /api/roadmap-extra-data

Fetch additional content for existing roadmaps.

POST /api/generate-hierarchy-json

Convert AI response to structured hierarchy.

πŸ—„οΈ Database Schema

Library Table

CREATE TABLE Library (
  id SERIAL PRIMARY KEY,
  libId UUID UNIQUE NOT NULL,
  userEmail TEXT,
  searchInput TEXT,
  type TEXT DEFAULT 'roadmap',
  created_at TIMESTAMP DEFAULT NOW()
);

Roadmap Table

CREATE TABLE Roadmap (
  id SERIAL PRIMARY KEY,
  libId UUID REFERENCES Library(libId),
  FormData JSONB,
  AiResp JSONB,
  Visiblity TEXT DEFAULT 'private',
  created_at TIMESTAMP DEFAULT NOW()
);

NodeData Table

CREATE TABLE NodeData (
    id SERIAL PRIMARY KEY,
    libId UUID REFERENCES Roadmap(libId),
    HierarchySelectedText TEXT,
    generatedResp JSONB,
    created_at TIMESTAMP DEFAULT NOW()
);

🧠 Tree-to-Flow Algorithm

The core visualization algorithm converts hierarchical AI responses into interactive flowcharts:

🌳 Algorithm Overview

export function generateSpineFlow(topic: string, tree: TopicNode[]) {
  // 1. Create central spine with main topics
  // 2. Branch child topics horizontally (alternating sides)
  // 3. Calculate optimal positioning
  // 4. Generate React Flow nodes and edges
  
  return { nodes, edges };
}

πŸ“ Layout Strategy

  • Central Spine: Vertical sequence of main topics
  • Horizontal Branches: Child topics extend left/right
  • Dynamic Spacing: Adjusts based on content hierarchy
  • Connection Handles: Proper edge routing between nodes

For complete implementation details, see: Tree-to-Flow Documentation

⚑ Background Jobs

MindRoute uses Inngest for reliable background processing:

πŸ”„ Job Types

RoadmapModel Job

  • Processes form data with AI
  • Generates structured learning path
  • Saves results to database
  • Handles errors and retries

RoadmapExtraData Job

  • Fetches course recommendations
  • Generates project suggestions
  • Populates FAQ content
  • Updates existing roadmaps

πŸ“Š Job Monitoring

  • Real-time status updates
  • Progress indicators in UI
  • Error logging and alerts
  • Performance metrics

About

This repository contains how to create your own ai roadmap generator documentation

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published