Your personal health data, organized and accessible.
MyLabVault is a comprehensive personal health data management system designed to help you track, analyze, and visualize your lab results over time. Upload PDF lab reports, automatically parse test data, and gain insights into your health trends through interactive charts and dashboards.
- Intelligent Parsing: Automatically extract test results from LabCorp, Quest, and other major lab providers
- Bulk Upload: Process multiple PDF files simultaneously
- Selective Import: Choose which tests to import from each report
- Duplicate Detection: Automatically detect and prevent duplicate imports
- Error Handling: Robust parsing with fallback mechanisms for various PDF formats
- Interactive Dashboard: Overview of health metrics with key statistics
- Trending Charts: Track test values over time using Chart.js
- Panel-Based Organization: Group related tests for better analysis
- Abnormal Result Detection: Automatic flagging of out-of-range values
- Historical Comparisons: Compare results across different time periods
- Multi-Patient Support: Manage data for family members
- Healthcare Provider Tracking: Associate results with specific providers
- Test Categorization: Organized by medical panels (Lipid, Metabolic, CBC, etc.)
- Reference Range Validation: Automatic normal/abnormal classification
- Search & Filter: Advanced filtering across all results
- Professional Design: Built with AdminLTE 3.2.0 for a clean, medical-grade interface
- Dark/Light Mode: Toggle between themes with persistent user preferences
- Responsive Layout: Optimized for desktop, tablet, and mobile devices
- Interactive Tables: DataTables integration with search, sort, and pagination
- Modal-Based Workflows: Streamlined data entry and confirmation processes
- Local Storage: All data stays on your infrastructure - no cloud dependencies
- SQLite Database: Lightweight, reliable, and private data storage
- Docker Containerization: Isolated environment with security controls
- Health Check Monitoring: Built-in application health monitoring
- Docker (20.10+) and Docker Compose (v2.0+)
- Git for cloning the repository
-
Create docker-compose.yml
version: '3.8' services: mylabvault: image: ghcr.io/zaydons/mylabvault:latest ports: - "8000:8000" volumes: - ./data:/app/data restart: unless-stopped
Optional: Add health monitoring for production deployments
# Add these lines under mylabvault service for health monitoring: healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8000/health"] interval: 30s timeout: 10s retries: 3 start_period: 40s
-
Start the application
docker-compose up -d mylabvault
-
Clone the repository
git clone https://github.com/zaydons/MyLabVault.git cd MyLabVault -
Start the application
# Using the convenience script (recommended) ./start-dev.sh # Or manually with docker-compose docker-compose up -d mylabvault
-
Access the application
- π Web Application: http://localhost:8000
- π API Documentation: http://localhost:8000/api/docs
- π Health Check: http://localhost:8000/health
- Upload Your First PDF: Go to "PDF Import" and upload a lab report
- Review Results: Check the parsed data and select tests to import
- Explore Dashboard: View your health metrics and trends
- Manage Providers: Add your healthcare providers for better organization
- Customize Settings: Set your preferred theme and UI preferences
- Backend: Python 3.11 + FastAPI + SQLAlchemy ORM
- Frontend: Server-side Jinja2 templates + AdminLTE 3.2.0
- Database: SQLite with Alembic migrations
- PDF Processing: pypdf + pdfplumber for intelligent parsing
- UI Components: Bootstrap 4 + DataTables + Chart.js + Material Design Icons
- Containerization: Docker with health checks and network isolation
lablog/
βββ app/ # Application root
β βββ api/ # FastAPI backend
β β βββ models.py # SQLAlchemy database models
β β βββ routers/ # API route handlers
β β β βββ pdf_import.py # PDF processing endpoints
β β β βββ results.py # Lab results management
β β β βββ pages.py # Frontend page routes
β β βββ services/ # Business logic
β β βββ pdf_parser.py # Advanced PDF parsing engine
β βββ templates/ # Jinja2 HTML templates
β β βββ components/ # Reusable UI components
β β βββ dashboard.html # Main dashboard interface
β β βββ pdf-import.html # PDF upload workflow
β βββ data/ # Persistent data storage
β β βββ mylabvault.db # SQLite database
β β βββ uploads/pdfs/ # Uploaded PDF files
β βββ alembic/ # Database migrations
βββ docker-compose.yml # Container orchestration
βββ start-dev.sh # Quick start script
- Patients: Personal information and demographics
- Providers: Healthcare providers and laboratories
- Panels: Test groupings (CBC, Metabolic, Lipid, etc.)
- Labs: Individual test definitions with reference ranges
- LabResults: Test results with values and metadata
- PDFImportLog: Import history and processing status
- UserSettings: UI preferences and application settings
- Upload: Drag & drop or select PDF lab reports
- Parse: Automatic extraction of test data and metadata
- Review: Preview parsed results with confidence indicators
- Select: Choose specific tests to import (selective import)
- Import: Save selected results to your database
- Track: Monitor import history and processing status
- View All Results: Browse and filter all lab results
- Individual Lab Analysis: Detailed view with trend charts
- Provider Management: Add and organize healthcare providers
- Panel Organization: Group tests by medical categories
- Patient Profiles: Manage multiple family members
- Dashboard Overview: Key health metrics and recent results
- Trend Analysis: Chart.js visualizations of test values over time
- Abnormal Detection: Automatic flagging of out-of-range results
- Export Capabilities: Download results for external analysis
- Database:
app/data/mylabvault.db(SQLite) - Uploaded Files:
app/data/uploads/pdfs/(permanent storage) - Application Logs: Docker container logs via
docker logs mylabvault
# Backup your data
docker exec mylabvault cp -r /app/data /app/backup-$(date +%Y%m%d)
# Or backup from host
cp -r ./app/data ./backup-$(date +%Y%m%d)# View application status
docker-compose ps mylabvault
# View logs
docker logs mylabvault -f
# Restart application
docker-compose restart mylabvault
# Stop application
docker-compose down
# Rebuild and restart
docker-compose down && docker-compose build && docker-compose up -d mylabvault
# Access container shell
docker exec -it mylabvault /bin/sh- Interactive Documentation: http://localhost:8000/api/docs (Swagger UI)
- Alternative Docs: http://localhost:8000/api/redoc (ReDoc)
- OpenAPI Spec: http://localhost:8000/openapi.json
GET /api/results/ # Retrieve lab results with filtering
POST /api/pdf/upload # Upload single PDF lab report
POST /api/pdf/bulk-upload # Upload multiple PDF files
POST /api/pdf/confirm # Confirm and process PDF import
GET /api/pdf/history # Get PDF import history
GET /api/labs/ # Manage lab test definitions
GET /api/providers/ # Manage healthcare providers
GET /api/patients/ # Manage patient profiles
PDF Import Problems
# Check if PDF contains readable text
docker exec mylabvault python -c "import pdfplumber; print('PDF readable' if pdfplumber.open('/app/data/uploads/pdfs/yourfile.pdf').pages else 'PDF not readable')"
# View detailed import logs
docker logs mylabvault | grep "PDF"Database Issues
# Check database connectivity
docker exec mylabvault python -c "from api.database import engine; print('DB OK' if engine.connect() else 'DB Error')"
# Reset database (β οΈ WARNING: This will delete all data)
docker exec mylabvault rm /app/data/mylabvault.db
docker-compose restart mylabvaultApplication Not Starting
# Check Docker resources
docker system df
# Verify health status
docker-compose ps mylabvault
# View startup logs
docker logs mylabvault --tail 50- Large PDF Files: Files over 10MB may take longer to process
- Bulk Imports: Process in batches of 10-20 files for optimal performance
- Database Size: Regular cleanup of old import logs recommended for large datasets
- Check the application logs:
docker logs mylabvault - Verify Docker resources and connectivity
- Review the API documentation at
/api/docsfor endpoint details - Check file permissions in
app/data/directory
This project is licensed under the MIT License - see the LICENSE.md file for details.
MyLabVault is a personal data management tool and is not intended to provide medical advice. Always consult with qualified healthcare professionals regarding your medical data and health decisions. This software is provided for informational and organizational purposes only.
MyLabVault - Take control of your health data with privacy, security, and intelligence.