NeuroTwin is a cutting-edge platform that creates personalized Digital Brain Twins from EEG data, enabling medical professionals to:
- ๐ Analyze EEG patterns for neurological conditions
- ๐ Simulate medication responses before prescription
- ๐ฎ Predict surgical outcomes with high accuracy
- ๐ง Visualize brain activity patterns in 3D
- ๐ค Leverage AI for automated clinical insights
Note: NeuroTwin is a next-generation neural modeling platform that transforms how clinicians interact with patient brain data.
๐ EEG Analysis | ๐งช Treatment Simulation | ๐ง Brain Visualization | ๐ค AI Assistant |
---|---|---|---|
Epilepsy detection | Medication response | 3D neural mapping | Clinical insights |
Seizure risk | Surgical outcomes | Temporal activity tracking | Report generation |
Cognitive patterns | Side effect prediction | Regional abnormality view | Diagnostic support |
- Next.js 15 - React framework with SSR & App Router
- React 19 - Component-based UI library
- Tailwind CSS - Utility-first styling
- Shadcn UI - Accessible component library
- Electron - Desktop application support (optional)
- FastAPI - High-performance Python API framework
- Supabase - Database & authentication
- PyTorch - Neural network models
- MNE - EEG/MEG data processing
- Groq API - LLM integration for clinical insights
- Node.js 18+
- Python 3.8+
- Supabase account
- Groq API key
git clone https://github.com/yourusername/NeuroTwin.git
cd NeuroTwin
NeuroTwin has two backend services: a FastAPI server and a Flask server. Both need to be running for full functionality.
# Create and activate virtual environment
cd server
python -m venv venv
# Linux/macOS
source venv/bin/activate
# Windows
venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Create .env file (see template below)
# Start the FastAPI server
uvicorn main:app --reload --host 0.0.0.0 --port 8000
# With the same virtual environment active
cd server
# Start the Flask server
python app.py
# This will run on port 5000 by default
Backend .env
Template:
SUPABASE_URL=your-supabase-url
SUPABASE_KEY=your-supabase-anon-key
SUPABASE_SERVICE_KEY=your-supabase-service-role-key
GROQ_API_KEY=your-groq-api-key
SECRET_KEY=your-jwt-secret-key
ALGORITHM=HS256
# Navigate to client directory
cd client
# Install dependencies
npm install
# Start development server
npm run dev
Client .env.local
Template:
NEXT_PUBLIC_API_URL=http://localhost:8000
- Web App: http://localhost:3000
- API Documentation: http://localhost:8000/docs
Upload and process EEG data to create personalized brain models and detect neurological conditions.
Interactive 3D visualization of brain activity patterns, allowing temporal exploration and abnormality detection.
Simulate the effects of medications on brain activity with personalized Digital Twin models.
Predict outcomes of different surgical approaches for neurological conditions.
Manage patient data, EEG recordings, and analysis results in a secure dashboard.
# Run tests
pytest
# Generate OpenAPI schema
python -c "import main; print(main.app.openapi())" > openapi.json
# Create migration
python -m alembic revision --autogenerate -m "migration message"
# Apply migration
python -m alembic upgrade head
# Run development server
npm run dev
# Build for production
npm run build
# Start production server
npm start
# Run Electron app (desktop)
npm run electron-dev
# Build Electron app
npm run electron-build
# Using Gunicorn
gunicorn -w 4 -k uvicorn.workers.UvicornWorker main:app
# Build Next.js app
npm run build
# Deploy to Vercel
vercel
NeuroTwin can also run as a desktop application using Electron:
# Run Electron dev mode
npm run electron-dev
# Package for distribution
npm run electron-build
- All EEG data is processed locally before storage
- End-to-end encryption for patient records
- Role-based access control for clinical teams
- Compliance with healthcare data regulations
- Fork the repository
- Create a feature branch (
git checkout -b amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin amazing-feature
) - Open a Pull Request
- Harshal - Developer - GitHub
- Ghruank - Developer - GitHub
- Prathamesh - Developer - GitHub
- Yadnesh - Developer - GitHub
NeuroTwin: Transforming Neurological Care with Digital Brain Twins
Made with โค๏ธ by the NeuroTwin Team