Inspiration
What it does
How we built it
Challenges we ran into# SYNAPULS
Unified Alzheimer's Disease Analysis & Digital Twin Platform
SYNAPULS is a high-performance neuro-biometric analysis platform designed for advanced threat detection in neurodegenerative pathologies. It integrates real-time biometrics, genomic risk profiling, MRI imaging analysis, and high-fidelity 3D digital twins into a unified command center for Alzheimer's disease research and patient monitoring.
🎯 Features
Core Capabilities
- Genomic Analysis: SNP file parsing (TSV/BED), polygenic risk scoring, and AI-powered variant analysis
- Digital Twin: 3D brain visualization with real-time biometric overlay and lesion mapping
- Patient Management: Comprehensive patient profiles with history tracking and treatment management
- Biometric Monitoring: Real-time vital signs tracking with AI-powered anomaly detection
- Inventory Management: Medical supply chain and inventory tracking
- AI Integration: Google Gemini-powered medical consultancy and analysis
- Imaging Analysis: MRI feature extraction and vectorization
- Session Management: Patient session tracking and data playback
Key Modules
- Brain3D: WebGL-based volumetric data visualization using Three.js
- Genomics Engine: SNP analysis and Neuro-Resilience Score calculation
- Biometrics Service: Real-time vital signs monitoring and analysis
- Treatment Catalog: Comprehensive treatment and medication management
- Supplier Network: Medical supplier and inventory tracking
🏗️ Architecture
SYNAPULS operates on a split-stack architecture optimized for rapid deployment and scalability.
┌─────────────────────────────────────────────────────────┐
│ CLIENT (Frontend) │
│ React 19 + Vite + Tailwind CSS v4 + Three.js (R3F) │
│ Port: 5173 (dev) / 3000 (alt) │
└──────────────────┬──────────────────────────────────────┘
│ HTTP/REST API
┌──────────────────▼──────────────────────────────────────┐
│ SERVER (Backend) │
│ FastAPI + Python 3.10+ + Pandas + Google Gemini │
│ Port: 8000 │
└──────────────────────────────────────────────────────────┘
Client (Tactical Interface)
- Role: Operator Dashboard & Visual Analytics
- Tech Stack:
- React 19 (RC)
- Vite 6.0
- Tailwind CSS v4 (Alpha)
- Zustand (State Management)
- Three.js / React-Three-Fiber (3D Visualization)
- Recharts (Data Visualization)
Server (Intelligence Core)
- Role: Data Ingestion, Inference & Orchestration
- Tech Stack:
- FastAPI (High-performance AsyncIO)
- Python 3.10+
- Pandas, NumPy (Data Science)
- Google Generative AI (Gemini)
- Python-dotenv (Configuration)
📁 Project Structure
synapuls/
├── client/ # Frontend application
│ ├── src/
│ │ ├── components/ # React components
│ │ │ ├── Brain3D.tsx
│ │ │ ├── DigitalTwin.tsx
│ │ │ ├── GenomicsUpload.tsx
│ │ │ ├── PatientWorkspace.tsx
│ │ │ └── ...
│ │ ├── hooks/ # Custom React hooks
│ │ ├── services/ # API service layer
│ │ ├── store/ # Zustand state management
│ │ └── assets/ # Static resources
│ ├── public/ # Public assets
│ └── package.json
│
├── server/ # Backend API
│ ├── app/
│ │ ├── api/ # API route handlers
│ │ │ ├── brain.py
│ │ │ ├── genomics.py
│ │ │ └── sensors.py
│ │ └── services/ # Business logic services
│ │ ├── genomics.py
│ │ ├── gemini.py
│ │ └── biometrics.py
│ ├── routers/ # FastAPI routers
│ │ ├── genomics.py
│ │ ├── patients.py
│ │ ├── treatments.py
│ │ ├── inventory.py
│ │ └── ...
│ ├── data/ # JSON data stores
│ ├── main.py # FastAPI application entry
│ └── requirements.txt
│
├── docs/ # Documentation
│ ├── protocols/ # Operational procedures
│ └── archive/ # Legacy documentation
│
└── README.md # This file
🚀 Getting Started
Prerequisites
- Node.js: v20+ (Download)
- Python: 3.10+ (Download)
- npm or yarn: Package manager
- pip: Python package manager
Installation
1. Clone the Repository
git clone <repository-url>
cd synapuls
2. Backend Setup
cd server
# Create virtual environment (recommended)
python -m venv venv
# Activate virtual environment
# Windows:
.\venv\Scripts\activate
# macOS/Linux:
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
3. Frontend Setup
cd client
# Install dependencies
npm install
4. Environment Configuration
Create a .env file in the server directory (optional, for AI features):
GOOGLE_API_KEY=your_gemini_api_key_here
Note: The application will run without
GOOGLE_API_KEY, but AI-powered analysis features will be disabled.
🏃 Running the Application
Development Mode
Start the Backend Server
cd server
# If using virtual environment, activate it first
# Windows: .\venv\Scripts\activate
# macOS/Linux: source venv/bin/activate
# Run the server
uvicorn main:app --reload --host 0.0.0.0 --port 8000
The API will be available at:
- API: http://localhost:8000
- API Docs: http://localhost:8000/docs (Swagger UI)
- ReDoc: http://localhost:8000/redoc
Start the Frontend Client
cd client
# Start development server
npm run dev
The frontend will be available at:
- Client: http://localhost:5173
Production Build
Build Frontend
cd client
npm run build
The optimized build will be in client/dist/.
Run Backend (Production)
cd server
uvicorn main:app --host 0.0.0.0 --port 8000
📡 API Documentation
Base URL
http://localhost:8000
Core Endpoints
Health & Status
GET /- Root endpoint (system status)GET /health- Health check endpoint
Genomics
GET /api/v1/genomics/status- Get genomics module statusPOST /api/v1/genomics/upload- Upload SNP file (TSV/BED format)POST /api/v1/genomics/parse- Parse genome file (alias for upload)GET /api/v1/genomics/score- Get current Neuro-Resilience ScorePOST /api/v1/genomics/analyze- Trigger AI analysis of genomics data
Patients
GET /patients- List all patientsGET /patients/{id}- Get patient by IDPOST /patients- Create new patientPUT /patients/{id}- Update patientDELETE /patients/{id}- Delete patient
Treatments
GET /treatments- List all treatmentsGET /treatments/{id}- Get treatment by IDPOST /treatments- Create new treatmentPUT /treatments/{id}- Update treatment
Inventory
GET /inventory- List inventory itemsGET /inventory/{id}- Get inventory item by IDPOST /inventory- Add inventory itemPUT /inventory/{id}- Update inventory item
Suppliers
GET /suppliers- List suppliersGET /suppliers/{id}- Get supplier by IDPOST /suppliers- Create supplier
Statistics
GET /stats- Get system statisticsGET /stats/patients- Patient statisticsGET /stats/treatments- Treatment statistics
Brain AI
POST /brain/analyze- Analyze brain data with AI
Sensors
GET /sensors- Get sensor dataPOST /sensors- Submit sensor readings
Session
GET /session- Get current sessionPOST /session- Create/start sessionPUT /session- Update session
Imaging
POST /api/v1/imaging/upload- Upload MRI imageGET /api/v1/imaging/{id}- Get imaging analysis
Interactive API Documentation
Once the server is running, visit:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
🛠️ Development
Code Style
Frontend:
- ESLint configured for React/TypeScript
- Prettier (recommended)
- TypeScript strict mode enabled
Backend:
- PEP 8 style guide
- Type hints recommended
- Async/await for I/O operations
Testing
# Frontend linting
cd client
npm run lint
# Backend (add tests as needed)
cd server
pytest # If tests are added
Adding New Features
- Backend: Add new routers in
server/routers/and register inserver/main.py - Frontend: Add components in
client/src/components/and update routing inApp.tsx
📊 Key Technologies
Frontend
- React 19: UI framework
- Vite: Build tool and dev server
- TypeScript: Type safety
- Tailwind CSS v4: Utility-first CSS
- Zustand: Lightweight state management
- Three.js / R3F: 3D graphics
- Recharts: Data visualization
- Axios: HTTP client
- Framer Motion: Animations
Backend
- FastAPI: Modern Python web framework
- Uvicorn: ASGI server
- Pandas: Data manipulation
- NumPy: Numerical computing
- Google Generative AI: Gemini integration
- Python-dotenv: Environment configuration
🔒 Security Notes
- CORS is configured for development (localhost:5173, localhost:3000)
- For production, update CORS origins in
server/main.py - API keys should be stored in environment variables (
.envfile) - Never commit
.envfiles to version control
📝 License & Status
Status: Active Development (v2.0)
This project is part of the AI4Alzheimer's Hackathon challenge and is designed for research and educational purposes.
🤝 Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
📚 Additional Documentation
- Frontend README - Client-side documentation
- Backend README - Server-side documentation
- Git Workflow - Development workflow
🐛 Troubleshooting
Common Issues
Backend won't start:
- Ensure Python 3.10+ is installed
- Check that all dependencies are installed:
pip install -r requirements.txt - Verify port 8000 is not in use
- If using
server.main:app, run from parent directory, or usemain:appfrom server directory
Frontend won't start:
- Ensure Node.js v20+ is installed
- Clear node_modules and reinstall:
rm -rf node_modules && npm install - Check that port 5173 is not in use
API 404 errors:
- Ensure backend server is running
- Check CORS configuration matches frontend URL
- Verify endpoint paths match API documentation
Genomics analysis not working:
- Check if
GOOGLE_API_KEYis set in.envfile - Without API key, basic analysis works but AI features are disabled
📧 Support
For issues, questions, or contributions, please open an issue on the repository.
Built with ❤️ for Alzheimer's Disease Research
Log in or sign up for Devpost to join the conversation.