Integrated Platform for Neurodegenerative Analysis & Social Intelligence
A consolidated, hardened system combining advanced neuroscience modeling with real-time social media trend detection. Built for medical research, clinical decision support, and market intelligence.
The suite has been completely refactored from a fragmented prototype into a unified, production-grade stack:
core_api/): Unified FastAPI gateway serving both Neuro and Trends endpointsdashboard_app.py): Premium Streamlit interface for all analysis modesshared/lib/): Common utilities including PII scrubbing, logging, and database managementThe following directories are legacy and will be removed in future versions:
neurodegenerai/src/api/ -> Migrated to core_api/src/api/v1/endpoints/neuro.pytrend-detector/src/api/ -> Migrated to core_api/src/api/v1/endpoints/trends.py# Start all services (API, Dashboard, PostgreSQL, pgAdmin)
docker-compose up --build
# Install dependencies
pip install -r requirements.txt
# Run Core API
export PYTHONPATH=$PYTHONPATH:.
python -m uvicorn core_api.src.api.main:app --host 0.0.0.0 --port 8000
# Run Dashboard (in separate terminal)
streamlit run dashboard_app.py --server.port 8501
Create a .env file:
# Database
POSTGRES_USER=trends
POSTGRES_PASSWORD=your_secure_password
POSTGRES_DB=trends
# Reddit API (Optional)
REDDIT_CLIENT_ID=your_client_id
REDDIT_CLIENT_SECRET=your_client_secret
REDDIT_USER_AGENT=neuro-trends-suite/1.0
# System
ENV=production
LOG_LEVEL=INFO
NEURO_DEMO_MODE=false
POST /v1/neuro/tabular - Biomarker predictionPOST /v1/neuro/mri - MRI volume analysisPOST /v1/neuro/eeg - EEG state decodingGET /v1/trends/top - Top trending topicsPOST /v1/trends/search - Semantic searchGET /health - Health check with DB statusFull API documentation: http://127.0.0.1:8000/docs
# Run all tests
pytest
# Verify Core API
curl http://127.0.0.1:8000/health
# Test PII Scrubber
python -c "from shared.lib.io_utils import PIIScrubber; s = PIIScrubber(); print(s.scrub('Contact: john@example.com'))"
patients - Patient demographics (anonymized)neuro_predictions - All model predictions with metadatasocial_posts - Ingested social media datatrend_topics - Detected trending topics with scores# Auto-create tables on first run
docker-compose up
# Manual migration (if needed)
alembic upgrade head
API won’t start:
# Check PostgreSQL is running
docker-compose ps
# View logs
docker-compose logs core-api
Dashboard connection error:
# Ensure Core API is accessible
curl http://127.0.0.1:8000/health
# Check CORE_API_URL in dashboard_app.py
Import errors:
# Verify PYTHONPATH
export PYTHONPATH=$PYTHONPATH:.
MIT License - See LICENSE file for details
This software is for research and educational purposes only. It is not FDA-approved and should not be used for clinical diagnosis without proper validation and regulatory approval.
Built with: FastAPI, Streamlit, PostgreSQL, PyTorch, Scikit-learn, BERTopic, PRAW