GitHub - SARAMALI15792/AINativeBook: AI-Native Learning Platform for Physical AI & Humanoid Robotics Education


๐Ÿ”„ Export Agent โ€” Convert to Any Framework

IntelliStack ships with a built-in Export Agent (gitagent/) that lets any developer port the entire platform โ€” or just one layer โ€” to their preferred language and framework.

Target Language Frameworks Supported
Python Django REST Framework
TypeScript / Node.js NestJS, Express.js, Hono, Elysia
Java Spring Boot
PHP Laravel
Ruby Ruby on Rails
Go Go Fiber, Gin, Echo
C# ASP.NET Core Minimal APIs

How it works โ€” just ask in plain language:

"Convert IntelliStack to NestJS with Prisma"
"Port only the auth layer to Laravel"
"Give me the Go Fiber version of the RAG chatbot"
"Convert the database models to TypeORM"

The agent reads the live codebase, produces a migration plan, then outputs production-ready, framework-idiomatic code with all imports, env vars, and a wire-up checklist.

Start here: gitagent/workflows/convert.md ยท Example scenarios: NestJS ยท Django ยท Go Fiber


What Is IntelliStack?

IntelliStack is an AI-native Learning Management System purpose-built for Physical AI and Humanoid Robotics education. It replaces static course platforms with an intelligent, adaptive environment where learners progress through 5 gated stages โ€” from foundational robotics concepts to a full capstone project โ€” guided by a RAG-powered chatbot and a Socratic AI tutor at every step.

The problem it solves:

  • Traditional LMS platforms have no AI layer โ€” learners get stuck with no contextual help
  • Robotics education content is scattered across docs, papers, and videos with no unified path
  • Instructors have no visibility into where students struggle or how to adapt content
  • Institutions lack the tools to manage cohorts, track progress, and deliver assessments at scale

How it works:

graph LR
    A[Student Signs Up] --> B[Personalized Onboarding]
    B --> C[Stage 1 Unlocked]
    C --> D{Learn via Lessons}
    D --> E[Ask RAG Chatbot]
    D --> F[Use AI Tutor]
    D --> G[Complete Assessment]
    G -->|Pass| H[Stage 2 Unlocked]
    G -->|Fail| D
    H --> I[...]
    I --> J[Stage 5 Capstone]
    J --> K[Certificate Issued]
Loading

Scale: The platform is architected to handle 10,000+ concurrent learners โ€” async FastAPI backend with connection pooling, Redis-backed rate limiting and caching, Qdrant vector search with sub-50ms retrieval, and horizontally scalable Railway deployments.


๐Ÿ—๏ธ System Architecture

graph TB
    subgraph Client["Client Layer"]
        FE["Next.js 14 Frontend\n(Netlify)"]
        DOCS["Docusaurus Docs\n(GitHub Pages)"]
    end

    subgraph Auth["Auth Layer"]
        AUTH["Better-Auth OIDC Server\n(Railway ยท Node.js)"]
        JWKS["JWKS Endpoint\n/.well-known/jwks.json"]
    end

    subgraph API["API Layer"]
        BACKEND["FastAPI Backend\n(Railway ยท Python 3.11)"]
        MW["JWKS Middleware\nJWT Validation"]
    end

    subgraph AI["AI Layer"]
        RAG["RAG Pipeline\nQdrant + Cohere + OpenAI"]
        TUTOR["AI Tutor\nLangGraph ยท Socratic Method"]
        CHATKIT["ChatKit\nStreaming SSE"]
    end

    subgraph Data["Data Layer"]
        PG[("PostgreSQL\nNeon")]
        REDIS[("Redis\nCache + Rate Limit")]
        QDRANT[("Qdrant\nVector Store")]
    end

    FE -->|"OAuth / Session"| AUTH
    FE -->|"API Calls"| BACKEND
    DOCS -->|"Auth Redirect"| AUTH
    AUTH --> JWKS
    AUTH --> PG
    BACKEND --> MW
    MW --> JWKS
    BACKEND --> RAG
    BACKEND --> TUTOR
    BACKEND --> CHATKIT
    BACKEND --> PG
    BACKEND --> REDIS
    RAG --> QDRANT
    RAG -->|"OpenAI API"| CHATKIT
Loading

๐Ÿ”„ Request Flow

sequenceDiagram
    participant U as User
    participant FE as Next.js Frontend
    participant AUTH as Better-Auth OIDC
    participant API as FastAPI Backend
    participant AI as RAG / Tutor AI
    participant DB as PostgreSQL

    U->>FE: Visit intellistack-app.netlify.app
    FE->>AUTH: Sign In (Email / Google / GitHub)
    AUTH-->>FE: JWT Access Token (RS256)
    FE->>API: API Request + Bearer Token
    API->>AUTH: Verify via JWKS endpoint
    AUTH-->>API: Token valid
    API->>DB: Fetch user/content data
    DB-->>API: Data
    API->>AI: RAG query / Tutor session
    AI-->>API: Streamed response (SSE)
    API-->>FE: Response
    FE-->>U: Rendered content
Loading

๐ŸŽ“ 5-Stage Learning Path

graph LR
    S1["Stage 1\nFoundations"]
    S2["Stage 2\nROS 2 & Simulation"]
    S3["Stage 3\nPerception & Planning"]
    S4["Stage 4\nAI Integration"]
    S5["Stage 5\nCapstone"]

    S1 -->|"Unlock"| S2
    S2 -->|"Unlock"| S3
    S3 -->|"Unlock"| S4
    S4 -->|"Unlock"| S5

    style S1 fill:#3B82F6,color:#fff
    style S2 fill:#22C55E,color:#fff
    style S3 fill:#EAB308,color:#000
    style S4 fill:#F97316,color:#fff
    style S5 fill:#EF4444,color:#fff
Loading

Each stage unlocks based on passing assessments in the previous stage. Progress is tracked at lesson, exercise, and assessment level with badge issuance and certificate generation upon completion.


๐Ÿ› ๏ธ Technology Stack

Frontend

Next.js React TypeScript Tailwind CSS Framer Motion Three.js

Backend

Python FastAPI SQLAlchemy PostgreSQL Redis Qdrant

Auth Server

Node.js Better Auth Drizzle ORM Express

AI & ML

OpenAI Google Gemini Cohere LangGraph

Infrastructure

Railway Netlify GitHub Actions Docker


โœจ Key Features

๐Ÿค– RAG Chatbot

  • OpenAI + SSE streaming responses
  • Qdrant hybrid vector retrieval
  • Cohere rerank-v3.5 for precision
  • Source citations with passage viewer
  • Stage-locked content access
  • Text-selection triggered queries

๐ŸŽ“ AI Tutor

  • Socratic method dialogue engine
  • Code review & debugging assistant
  • LangGraph multi-agent architecture
  • Safety guardrails built-in
  • Session persistence

๐Ÿ” Authentication

  • Better-Auth OIDC (RS256 JWT)
  • Email/password + Google + GitHub OAuth
  • JWKS endpoint for token verification
  • Role-based access: student / instructor / admin

๐Ÿ“ Content Authoring

  • MDX editor with live preview
  • Version history & diff viewer
  • Review workflow: draft โ†’ in_review โ†’ published
  • RAG auto-ingestion pipeline for new content

๐Ÿซ Institution Management

  • Cohort creation with enrollment limits
  • Instructor assignment & management
  • Webhook notifications with retry logic
  • Analytics aggregation dashboards

๐ŸŽฏ Personalization

  • Adaptive content recommendations
  • Profile-based learning path adjustments
  • Progress tracking (lesson / exercise / assessment)
  • Badge issuance & certificate generation

๐Ÿ”„ Export Agent โ€” Convert to Any Framework or Language

  • Port any layer (backend / auth / database / frontend / RAG) to your preferred stack
  • Supports 7 languages: Python, TypeScript, Java, PHP, Ruby, Go, C#
  • Frameworks: Django, NestJS, Express, Spring Boot, Laravel, Rails, Go Fiber, and more
  • Full migration plan produced before any code is written
  • Production-ready output: imports, full bodies, env vars, wire-up checklist
  • See gitagent/workflows/convert.md to get started

๐Ÿš€ Getting Started

Prerequisites

Tool Version
Node.js 20+
Python 3.11+
PostgreSQL 16+ (or Neon cloud)
Redis 7+
Qdrant 1.7+ (or Qdrant Cloud)

1. Clone

git clone https://github.com/SARAMALI15792/AINativeBook.git
cd AINativeBook

2. Configure Environment

cp intellistack/.env.example intellistack/.env
cp intellistack/auth-server/.env.example intellistack/auth-server/.env

Key values in intellistack/.env:

DATABASE_URL=postgresql://user:password@host:5432/intellistack
REDIS_URL=redis://localhost:6379/0
QDRANT_HOST=localhost
OPENAI_API_KEY=sk-...
BETTER_AUTH_URL=http://localhost:3001
BETTER_AUTH_SECRET=<min-32-random-chars>

3. Start Auth Server

cd intellistack/auth-server && npm install && npm run migrate && npm run dev
# Runs on http://localhost:3001

4. Start Backend API

cd intellistack/backend
pip install -r requirements.txt && alembic upgrade head
uvicorn src.main:app --reload --port 8000
# API docs: http://localhost:8000/docs

5. Start Frontend

cd intellistack/frontend && npm install && npm run dev
# Runs on http://localhost:3000

Or skip local setup and use the live app: intellistack-app.netlify.app


๐Ÿ“– How to Use the Platform

Students โ€” Sign up โ†’ complete onboarding โ†’ work through Stage 1 lessons and exercises โ†’ ask the RAG chatbot for instant answers with source citations โ†’ use the AI Tutor when you're stuck (it guides, not gives away answers) โ†’ pass the assessment โ†’ Stage 2 unlocks โ†’ repeat through all 5 stages โ†’ receive your certificate.

Instructors โ€” Log in with an instructor account โ†’ go to Content Authoring โ†’ write lessons in MDX with live preview โ†’ submit for review โ†’ once approved, content is automatically indexed into the RAG vector store โ†’ manage your cohort enrollments and view per-student progress analytics.

Admins โ€” Log in with an admin account โ†’ manage institutions, cohorts, and user roles โ†’ monitor platform health and Prometheus metrics โ†’ configure external webhooks.


๐Ÿ“ Project Structure

AINativeBook/
โ”œโ”€โ”€ intellistack/
โ”‚   โ”œโ”€โ”€ backend/                  # FastAPI Python backend
โ”‚   โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ main.py           # App entry point
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ config/           # Settings & structured logging
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ core/             # Domain modules (auth, users, content, learning, institution, assessment)
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ ai/               # RAG, AI Tutor, ChatKit, Personalization
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ shared/           # DB, middleware, metrics
โ”‚   โ”‚   โ””โ”€โ”€ alembic/              # DB migrations
โ”‚   โ”œโ”€โ”€ auth-server/              # Better-Auth OIDC server (TypeScript/Node.js)
โ”‚   โ”œโ”€โ”€ frontend/                 # Next.js 14 App Router frontend
โ”‚   โ””โ”€โ”€ content/                  # Docusaurus learning content
โ”œโ”€โ”€ specs/                        # Feature specs, plans, and task tracking
โ”œโ”€โ”€ history/                      # Prompt History Records & ADRs
โ”œโ”€โ”€ gitagent/                     # Export Agent โ€” convert to any framework/language
โ”‚   โ”œโ”€โ”€ workflows/convert.md      # Main conversion workflow guide
โ”‚   โ”œโ”€โ”€ workflows/scenarios/      # NestJS, Django, Go Fiber worked examples
โ”‚   โ””โ”€โ”€ skills/                   # export-backend, export-auth, export-database, export-frontend, export-rag
โ””โ”€โ”€ .github/workflows/            # CI/CD (Railway + Netlify + GitHub Pages)

๐Ÿงช Testing

Frontend

cd intellistack/frontend
npm test              # Unit tests (Vitest)
npm run test:e2e      # E2E tests (Playwright)
npm run lighthouse    # Performance + accessibility audit

Backend

cd intellistack/backend
pytest

๐Ÿšข Deployment

All deployments are automated via GitHub Actions on push to main:

Workflow Path Trigger Target
deploy-backend.yml intellistack/backend/** Railway
deploy-auth.yml intellistack/auth-server/** Railway
deploy-frontend.yml intellistack/frontend/** Netlify
deploy-docs.yml intellistack/content/** GitHub Pages

Required GitHub Secrets: RAILWAY_TOKEN, NETLIFY_SITE_ID, NETLIFY_AUTH_TOKEN, RAILWAY_AUTH_URL, RAILWAY_BACKEND_URL


๐Ÿ“Š Implementation Progress

Phase 0  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ  Complete  โ€” Vertical Slice
Phase 1  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ  Complete  โ€” Setup & Infrastructure
Phase 2  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ  Complete  โ€” Auth & Foundation
Phase 3  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ  Complete  โ€” Student Learning (5-Stage Path)
Phase 4  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ  Complete  โ€” Content Authoring
Phase 5  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ  Complete  โ€” Institution Management
Phase 6  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ  Complete  โ€” RAG Chatbot
Phase 7  โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘  Pending   โ€” AI Tutor
Phase 8  โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘  Pending   โ€” Community Features
Phase 9  โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘  Pending   โ€” Assessment Engine
Phase 10 โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘  Pending   โ€” Personalization
Phase 11 โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘  Pending   โ€” Production Polish

Overall: 74.5% complete (38 / 51 tasks)


๐Ÿค Contributing

  1. Fork the repository and create a branch: git checkout -b <phase>-<feature>
  2. Keep commits small and reference task IDs
  3. Ensure tests pass before opening a PR against main

Code Standards: Python โ€” PEP 8, type hints, async-first ยท TypeScript โ€” strict mode ยท React โ€” functional components only ยท DB โ€” all schema changes via Alembic migrations


๐Ÿ“„ License

MIT โ€” see LICENSE