Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

18 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧠 Synapse AI

Transform passive reading into active learning with AI-powered Knowledge Graphs

Python FastAPI Next.js Gemini License

Built for the Prometheus August AI Challenge


🎯 The Problem

Students read hundreds of pages — but passive reading has a brutal truth: most of it is forgotten within days. Highlighting and re-reading feel productive, but they don't build durable understanding or reveal how concepts connect.

✨ The Solution

Synapse AI turns any educational PDF into an interactive Knowledge Graph, then pairs it with Sage Mode 🌿 — a Socratic AI tutor that tests your understanding instead of handing you the answer.

📄 Upload a PDF → 🕸️ Get a living concept map → 🌿 Get quizzed by Sage

🚀 Key Features

Feature Description
📄 PDF → Knowledge Graph AI extracts core concepts (nodes) and relationships (edges) from any text-based PDF
🕸️ Interactive Visualization Drag, zoom, and explore concepts with ReactFlow
🌿 Sage Mode A Socratic tutor that asks guiding questions and never gives away the answer
🎚️ Adaptive Difficulty From "Explain Like I'm 5" to "Expert" — the AI adapts its vocabulary and analogies
🌙 Dark Mode Polished, SaaS-grade UI with smooth animations

🏗️ Architecture

┌─────────────┐  PDF + level  ┌──────────────┐  extract text  ┌─────────┐
│  Frontend   │ ────────────► │   FastAPI    │ ─────────────► │ PyPDF2  │
│  Next.js +  │               │   Backend    │                └─────────┘
│  ReactFlow  │ ◄──────────── │  (port 8000) │  send prompt   ┌─────────┐
│ (port 3000) │   JSON graph  │              │ ─────────────► │ Gemini  │
└─────────────┘               └──────────────┘                └─────────┘

⚡ Quick Start

Prerequisites: Python 3.10+, Node.js 18+, and a free Google Gemini API key from aistudio.google.com/app/apikey

1️⃣ Backend

cd backend
python -m venv venv
.\venv\Scripts\activate      # Windows (source venv/bin/activate on Mac/Linux)
pip install -r requirements.txt
echo "GOOGLE_API_KEY=your_key_here" > .env
uvicorn main:app --reload    # → http://localhost:8000

2️⃣ Frontend

cd frontend
npm install
npm run dev                  # → http://localhost:3000

📡 API Reference

POST /api/generate-graph

Form data: file (PDF), level (e.g. "High School")

{
  "status": "success",
  "graph": {
    "nodes": [{ "id": "1", "label": "Photosynthesis", "description": "..." }],
    "edges": [{ "source": "1", "target": "2", "label": "uses" }]
  }
}

POST /api/feynman-chat (Sage Mode 🌿)

{
  "concept_a": "Photosynthesis",
  "concept_b": "Sunlight",
  "relationship": "uses",
  "chat_history": [],
  "user_message": "Plants eat sunlight!",
  "level": "High School"
}

🎓 The Learning Science

  • Active Recall — retrieving knowledge strengthens memory far more than re-reading.
  • The Feynman Technique — explaining in your own words exposes gaps in understanding.
  • Dual Coding — visuals (graphs) + language = double the memory encoding.
  • Adaptive Learning — the same content, tuned to the learner's level.

🗺️ Roadmap

  • Multi-modal input (YouTube URLs, whiteboard photos)
  • Anki / flashcard export
  • Saved graphs with Supabase
  • Voice mode for Sage

👥 Team

podiliichandu gaddameedinishanth-cyber

📄 License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages