Skip to content

About

🧠 Socratic AI Knowledge Graph & Active Recall Study Lab built for Next Byte Hacks: V4

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Repository files navigation

🧠 SynapseStudy: Socratic AI Knowledge Graph & Active Recall Lab

License: MIT React 18 TypeScript 5 Vite 6 Tailwind CSS KaTeX Demo Video Live Demo

Submitted to: Next Byte Hacks: V4
Tracks: Education, Machine Learning/AI, Beginner Friendly
Founder / Lead Judge: Venkat Kakarla
Video Walkthrough: Watch on YouTube
Live App: ayoola-tech2024.github.io/synapse-study


🌟 Overview

SynapseStudy is an interactive, visual-first study laboratory that turns dense textbooks and unstructured lecture notes into interactive, physics-based knowledge graphs paired with a voice-guided Socratic AI tutor.

Instead of flipping static text flashcards or reading passive summaries, students explore concept relationships through dynamic spring-mass graphs, KaTeX formula breakdowns, 3D flip recall cards, and scaffolded Socratic inquiry that guides them to true conceptual breakthroughs.

flowchart TD
    subgraph Client["SynapseStudy Frontend Engine"]
        UI["Modern Linear Dark Dashboard"]
        Physics["Spring-Mass Physics Graph Canvas (Euler / Verlet)"]
        Inspector["Sliding Concept Inspector & Active Recall Lab"]
        Audio["Web Audio Synthesizer & Web Speech Engine"]
    end

    subgraph Intelligence["Dual-Mode Socratic Engine"]
        Gemini["Live Google Gemini 2.0 Flash REST API"]
        Offline["Zero-Config Offline Socratic Curriculum Bank"]
        Store["Browser LocalStorage (Mastery, Streaks, Notes)"]
    end

    Physics -->|Select Node| Inspector
    Inspector -->|Ask Socratic Question| Intelligence
    Intelligence -->|Spoken Guidance| Audio
    Inspector -->|Pass Active Recall Quiz| Store
    Store -->|Update Glow Halos| Physics
Loading

✨ Key Features

  1. 🌿 Physics-Based Knowledge Graph Canvas:

    • Spring-mass relaxation engine simulating repulsion, spring tension, and directional prerequisite links.
    • Real-time dragging, zooming, panning, and orbital restructuring.
    • Dynamic color-coded halos reflecting retention: Emerald (Mastered), Amber (In Progress), Rose (Needs Review).
  2. πŸ€– Voice-Guided Socratic AI Tutor:

    • Strict pedagogical Socratic engine that guides students with questions and analogies rather than rote answers.
    • Hands-free audio speech synthesis via the Web Speech API.
    • 3-Stage Scaffolded Hint Ladder: Level 1 (Intuition) $\rightarrow$ Level 2 (Constraint) $\rightarrow$ Level 3 (Derivation).
  3. πŸ“ KaTeX High-Definition Formula Typesetting:

    • Native LaTeX rendering for complex STEM equations across neural network calculus, quantum mechanics, and biochemistry.
  4. πŸƒ 3D Flip Active Recall Cards:

    • Interactive flip cards bridging everyday mental models with formal scientific definitions.
    • Instant mastery rating slider and confetti victory celebrations.
  5. ⚑ 4 Curated STEM Curriculum Presets + Custom Notes Ingestion:

    • Machine Learning: Perceptrons, Activation Functions, Cross-Entropy, Gradient Descent, Backpropagation, Scaled Dot-Product Attention.
    • Quantum Physics: Wave-Particle Duality, Heisenberg Uncertainty, SchrΓΆdinger Equation, Quantum Superposition.
    • Cellular Bioenergetics: Glycolysis, Krebs Cycle, Electron Transport Chain, ATP Synthase.
    • Computer Science: Graph Representations, BFS vs DFS, Dijkstra's Shortest Path.
    • Custom Ingestion: Paste any textbook chapter or notes to dynamically generate a custom graph in seconds!
  6. πŸ›‘οΈ 100% Fail-Safe Offline Mode:

    • Zero-latency, zero-cost deterministic fallback ensuring hackathon judges never hit broken API quotas or rate limits.

πŸš€ Quickstart & Installation

# 1. Clone the repository
git clone https://github.com/Ayoola-tech2024/synapse-study.git

# 2. Navigate into the project folder
cd synapsestudy

# 3. Install dependencies
npm install

# 4. Start local development server
npm run dev

Open your browser at http://localhost:5173 to explore the workspace!

Building for Production:

npm run build
npm run preview

πŸ“ Repository Structure

synapsestudy/
β”œβ”€β”€ package.json                # Project dependencies & scripts
β”œβ”€β”€ vite.config.ts             # Vite configuration
β”œβ”€β”€ tsconfig.json              # TypeScript strict configuration
β”œβ”€β”€ tailwind.config.js         # Tailwind theme & custom glow animations
β”œβ”€β”€ postcss.config.js          # PostCSS configuration
β”œβ”€β”€ index.html                 # App shell with Google Fonts & KaTeX CSS
β”œβ”€β”€ DEMO_SCRIPT.md             # 3-minute video presentation script for Venkat
β”œβ”€β”€ DEVPOST_SUBMISSION.md      # Devpost copy-paste submission pack
β”œβ”€β”€ README.md                  # Project documentation & architecture
└── src/
    β”œβ”€β”€ main.tsx               # React DOM entrypoint
    β”œβ”€β”€ App.tsx                # Master state coordinator & layout
    β”œβ”€β”€ types/
    β”‚   └── graph.ts           # ConceptNode, Edge, Quiz, & Curriculum contracts
    β”œβ”€β”€ data/
    β”‚   └── presets.ts         # Curated STEM curricula (ML, Physics, Bio, CS)
    β”œβ”€β”€ services/
    β”‚   β”œβ”€β”€ aiService.ts       # Live Gemini + offline Socratic heuristics
    β”‚   β”œβ”€β”€ soundService.ts    # Web Audio API click, chime & fanfare synthesizer
    β”‚   └── storageService.ts  # LocalStorage persistence manager
    β”œβ”€β”€ components/
    β”‚   β”œβ”€β”€ Navbar.tsx         # Preset selector, search, mastery meter, sound toggle
    β”‚   β”œβ”€β”€ GraphCanvas.tsx    # Spring-mass force physics SVG canvas
    β”‚   β”œβ”€β”€ NodeInspector.tsx  # Multi-tab sliding drawer
    β”‚   β”œβ”€β”€ SocraticTutor.tsx  # Socratic AI chat with speech synthesis & hint ladder
    β”‚   β”œβ”€β”€ ActiveRecallCard.tsx # 3D flip card with intuition vs formula derivation
    β”‚   β”œβ”€β”€ QuizModal.tsx      # Active recall diagnostic challenge
    β”‚   β”œβ”€β”€ KaTeXRenderer.tsx  # High-definition LaTeX math renderer
    β”‚   β”œβ”€β”€ CustomInputModal.tsx # Text/notes ingestion engine
    β”‚   └── ApiKeyModal.tsx    # Optional Gemini API key manager
    └── styles/
        └── index.css          # Custom scrollbars, KaTeX dark styling, animations

πŸ“œ License

This project is open-source software licensed under the MIT License.

About

🧠 Socratic AI Knowledge Graph & Active Recall Study Lab built for Next Byte Hacks: V4

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages