Skip to content

BathSalt-2/NeuroForge-

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 NeuroForge

AI-Powered Adaptive Learning Platform

NeuroForge is an intelligent learning platform that combines an AI Mentor powered by Gemma 4 E4B (running locally via Ollama β€” no cloud API keys needed), a Knowledge Graph (Neo4j), cognitive profiling, and structured learning pathways to deliver personalized education experiences.

Architecture Python React Gemma Neo4j Docker


πŸ—οΈ Architecture

NeuroForge is built as a microservices architecture with 7 backend services, an API gateway, a local LLM server (Ollama), and a React frontend β€” all orchestrated via Docker Compose.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                        Frontend (React)                     β”‚
β”‚         Dashboard β”‚ AI Mentor Chat β”‚ Concepts β”‚ Paths       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                             β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    API Gateway (:8000)                       β”‚
β”‚              Unified /api/v1/* routing + CORS                β”‚
β””β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
   β”‚      β”‚      β”‚      β”‚      β”‚      β”‚      β”‚
   β–Ό      β–Ό      β–Ό      β–Ό      β–Ό      β–Ό      β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”β”Œβ”€β”€β”€β”€β”€β”€β”β”Œβ”€β”€β”€β”€β”€β”€β”β”Œβ”€β”€β”€β”€β”€β”€β”β”Œβ”€β”€β”€β”€β”€β”€β”β”Œβ”€β”€β”€β”€β”€β”€β”β”Œβ”€β”€β”€β”€β”€β”€β”
β”‚User  β”‚β”‚Know- β”‚β”‚AI    β”‚β”‚Cogni-β”‚β”‚Cont- β”‚β”‚Learn-β”‚β”‚ Neo4jβ”‚
β”‚Svc   β”‚β”‚ledge β”‚β”‚Mentorβ”‚β”‚tive  β”‚β”‚ent   β”‚β”‚ing   β”‚β”‚ Seed β”‚
β”‚:8001 β”‚β”‚Graph β”‚β”‚Svc   β”‚β”‚Prof. β”‚β”‚Deliv.β”‚β”‚Path  β”‚β”‚Runnerβ”‚
β”‚      β”‚β”‚:8002 β”‚β”‚:8003 β”‚β”‚:8004 β”‚β”‚:8005 β”‚β”‚:8006 β”‚β”‚      β”‚
β””β”€β”€β”¬β”€β”€β”€β”˜β””β”€β”€β”¬β”€β”€β”€β”˜β””β”€β”€β”¬β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”€β”˜β””β”€β”€β”¬β”€β”€β”€β”˜β””β”€β”€β”¬β”€β”€β”€β”˜
   β”‚       β”‚       β”‚                        β”‚       β”‚
   β–Ό       β–Ό       β–Ό                        β–Ό       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”β”Œβ”€β”€β”€β”€β”€β”€β”β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”        β”Œβ”€β”€β”€β”€β”€β”€β”β”Œβ”€β”€β”€β”€β”€β”€β”
β”‚Postgrβ”‚β”‚Neo4j β”‚β”‚   Ollama   β”‚        β”‚Postgrβ”‚β”‚Neo4j β”‚
β”‚  SQL β”‚β”‚      β”‚β”‚ Gemma 4 E4Bβ”‚        β”‚  SQL β”‚β”‚      β”‚
β””β”€β”€β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜        β””β”€β”€β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”€β”˜

Services

Service Port Description
API Gateway 8000 Unified entry point, routes to all services
User Service 8001 Registration, JWT auth, profile management
Knowledge Graph Service 8002 Concepts, skills, modules via Neo4j
AI Mentor Service 8003 LLM-powered tutoring (Gemma 4 E4B + KG context)
Cognitive Profiling Service 8004 Interaction logging, mock heatmaps
Content Delivery Service 8005 Learning module content (mock CDN)
Learning Pathway Service 8006 Path management, enrollment, progress
Ollama 11434 Local LLM server running Gemma 4 E4B
Frontend 3000 React SPA with dashboard, chat, browser

πŸ€– LLM: Gemma 4 E4B (Local)

The AI Mentor runs entirely locally using Google's Gemma 4 E4B model served by Ollama. No cloud API keys or external services required.

Property Value
Model Gemma 4 E4B (gemma4:e4b)
Parameters 4.5B effective (8B with embeddings)
Context Window 128K tokens
Download Size ~9 GB
Runtime Ollama (CPU or GPU)

GPU acceleration: Uncomment the deploy.resources block under the ollama service in docker-compose.yml if you have an NVIDIA GPU with nvidia-container-toolkit installed. The model runs on CPU by default β€” just slower.


πŸš€ Quick Start

Prerequisites

  • Docker & Docker Compose
  • ~12 GB free disk space (for model download + containers)
  • 16 GB+ RAM recommended

1. Clone & configure

git clone https://github.com/BathSalt-2/NeuroForge-.git
cd NeuroForge-
cp .env.example .env

No API keys to configure β€” everything runs locally!

2. Start everything

docker compose up --build

This will:

  • Start Neo4j, PostgreSQL, and Ollama
  • Auto-pull the Gemma 4 E4B model into Ollama (~9 GB first run)
  • Seed the Knowledge Graph with 8 concepts, 4 skills, 6 modules, and 40+ relationships
  • Seed a demo user and learning path in PostgreSQL
  • Start all 7 backend services + API Gateway
  • Start the React frontend

⏳ First run takes longer due to the ~9 GB model download. Subsequent starts are fast since the model is cached in the ollama_data volume.

3. Open the app

URL What
http://localhost:3000 Frontend UI
http://localhost:8000 API Gateway
http://localhost:8000/docs Gateway API docs (Swagger)
http://localhost:7474 Neo4j Browser (neo4j / neuroforge_secret)
http://localhost:11434 Ollama API

4. Try it out

  1. Dashboard β€” See stats, quick actions, and your learning profile
  2. AI Mentor β€” Ask "What is machine learning?" or "Explain neural networks"
  3. Concepts β€” Browse the knowledge graph, see prerequisites and related concepts
  4. Learning Paths β€” Enroll in "AI Foundations", complete modules, track progress

πŸ“‘ API Quick Reference

All endpoints are accessible through the API Gateway at http://localhost:8000/api/v1/.

User Service

POST /api/v1/users/register      β€” Register a new user
POST /api/v1/users/login         β€” Login, get JWT token
GET  /api/v1/users/{user_id}     β€” Get user profile
PUT  /api/v1/users/{user_id}     β€” Update profile

Knowledge Graph

GET  /api/v1/concepts                          β€” List concepts (filter by domain, difficulty)
GET  /api/v1/concepts/{id}                     β€” Get concept details
GET  /api/v1/concepts/{id}/prerequisites       β€” Get prerequisites
GET  /api/v1/concepts/{id}/related             β€” Get related concepts
GET  /api/v1/concepts/{id}/modules             β€” Get teaching modules
GET  /api/v1/skills                            β€” List skills
GET  /api/v1/modules                           β€” List content modules

AI Mentor

POST /api/v1/mentor/query        β€” Send a question to the AI Mentor (Gemma 4 E4B)
GET  /api/v1/mentor/history/{id} β€” Get conversation history

Learning Pathways

GET  /api/v1/paths                                    β€” List learning paths
GET  /api/v1/paths/{path_id}                          β€” Get path details
POST /api/v1/users/{uid}/paths/{pid}/enroll           β€” Enroll in a path
PUT  /api/v1/users/{uid}/paths/{pid}/progress         β€” Update progress
GET  /api/v1/users/{uid}/paths/{pid}/enrollment       β€” Get enrollment status

Cognitive Profiling

POST /api/v1/profiling/interactions              β€” Log interaction event
GET  /api/v1/profiling/users/{id}/summary        β€” Get cognitive profile
GET  /api/v1/profiling/users/{id}/heatmap        β€” Get behavioral heatmap

Content Delivery

GET  /api/v1/content/{module_id}  β€” Get module content (HTML, quiz data)
GET  /api/v1/content              β€” List all available content

πŸ“‚ Project Structure

NeuroForge-/
β”œβ”€β”€ docker-compose.yml              # Full orchestration (incl. Ollama)
β”œβ”€β”€ .env.example                    # Environment template (no API keys)
β”œβ”€β”€ .gitignore
β”œβ”€β”€ frontend/                       # React SPA
β”‚   β”œβ”€β”€ Dockerfile
β”‚   β”œβ”€β”€ package.json
β”‚   β”œβ”€β”€ public/index.html
β”‚   └── src/
β”‚       β”œβ”€β”€ App.js                  # Router + layout
β”‚       β”œβ”€β”€ App.css                 # Global dark theme
β”‚       └── pages/
β”‚           β”œβ”€β”€ Dashboard.js        # Stats, actions, profile
β”‚           β”œβ”€β”€ MentorChat.js       # AI chat with personas (Gemma 4 E4B)
β”‚           β”œβ”€β”€ ConceptBrowser.js   # KG explorer
β”‚           └── LearningPath.js     # Path enrollment + progress
β”œβ”€β”€ services/
β”‚   β”œβ”€β”€ api_gateway/                # Unified API proxy
β”‚   β”œβ”€β”€ user_service/               # Auth + profiles (PostgreSQL)
β”‚   β”œβ”€β”€ knowledge_graph_service/    # Concepts, skills (Neo4j)
β”‚   β”œβ”€β”€ ai_mentor_service/          # Gemma 4 E4B + KG integration (Ollama)
β”‚   β”œβ”€β”€ cognitive_profiling_service/# Interaction logging (mock)
β”‚   β”œβ”€β”€ content_delivery_service/   # Module content (mock)
β”‚   └── learning_pathway_service/   # Paths + progress (PostgreSQL)
β”œβ”€β”€ neo4j/seed/                     # Graph seed script
β”‚   β”œβ”€β”€ Dockerfile
β”‚   └── seed.py                     # 8 concepts, 4 skills, 6 modules, 40+ rels
└── docs/                           # Design documentation
    β”œβ”€β”€ neuroforge_architecture.md
    β”œβ”€β”€ neuroforge_api_design.md
    β”œβ”€β”€ neuroforge_poc_definition.md
    β”œβ”€β”€ neuroforge_neo4j_datamodel.md
    β”œβ”€β”€ neuroforge_ai_mentor_scaffolding.md
    β”œβ”€β”€ neuroforge_cognitive_profiling_design.md
    β”œβ”€β”€ neuroforge_blockchain_credentialing_design.md
    └── neuroforge_security_privacy_framework.md

πŸ§ͺ PoC Scope & Next Steps

What's implemented (PoC)

  • βœ… Full microservices architecture with Docker Compose
  • βœ… Local LLM β€” Gemma 4 E4B via Ollama (no cloud API keys)
  • βœ… Neo4j Knowledge Graph with 8 concepts, 4 skills, 6 modules, 40+ relationships
  • βœ… AI Mentor with KG context injection and 4 personas (Socratic, Coach, Expert, Adaptive)
  • βœ… User registration/auth with JWT
  • βœ… Learning pathway enrollment and progress tracking
  • βœ… Cognitive profiling interaction logging with mock heatmaps
  • βœ… React frontend with dark theme UI (Dashboard, Chat, Concept Browser, Paths)
  • βœ… API Gateway with unified routing

Future roadmap

  • πŸ”² Blockchain credentialing (Polygon PoS, ERC-721 NFT certificates)
  • πŸ”² Real PyTorch models for cognitive profiling and behavioral heatmapping
  • πŸ”² Vector database (ChromaDB/Weaviate) for AI Mentor long-term memory
  • πŸ”² Content CDN integration and rich media delivery
  • πŸ”² Real-time WebSocket support for live tutoring sessions
  • πŸ”² RBAC with granular permissions
  • πŸ”² GDPR/FERPA compliance module
  • πŸ”² Assessment engine with adaptive question difficulty
  • πŸ”² Production deployment (Kubernetes, CI/CD, monitoring)
  • πŸ”² Fine-tune Gemma on domain-specific educational content

πŸ“œ License

See LICENSE for details.

About

NeuroForge is a revolutionary AI-powered learning platform designed to provide an adaptive, personalized, and deeply engaging educational experience. It aims to move beyond traditional one-size-fits-all learning models by leveraging cutting-edge AI, cognitive science, and blockchain technology.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 62.8%
  • JavaScript 30.9%
  • CSS 5.0%
  • Other 1.3%