StepSyncAI is a modular health and wellness platform built with a service-oriented architecture. The system consists of 6 independent applications that integrate through a unified dashboard API.
┌──────────────────────────────────────────────────────────────────┐
│ StepSyncAI Platform │
│ Production-Grade Health Platform │
└──────────────────────────────────────────────────────────────────┘
┌──────────────┐
│ User CLI │
└──────┬───────┘
│
┌───────────────────────┼───────────────────────┐
│ │ │
┌───────▼────────┐ ┌─────────▼────────┐ ┌───────▼────────┐
│ Mental Health │ │ Medication │ │ Sleep Tracker │
│ Tracker │ │ Tracker │ │ │
│ │ │ │ │ │
│ • Mood logging │ │ • Med scheduling │ │ • Duration │
│ • Symptoms │ │ • Adherence │ │ • Quality │
│ • Insights │ │ • Drug warnings │ │ • Patterns │
│ • Correlations │ │ • Reminders │ │ • Analysis │
└────────┬───────┘ └────────┬─────────┘ └────────┬───────┘
│ │ │
│ ┌───────────▼────────────┐ │
└─────────► Daily Dashboard API ◄──────────┘
│ │
│ • Data Aggregation │
│ • Wellness Scoring │
│ • Correlation Engine │
│ • Trend Analysis │
│ • Smart Recommendations│
│ • Export System │
└───────────┬────────────┘
┌─────────────────────┼─────────────────────┐
│ │ │
┌────────▼────────┐ ┌────────▼────────┐ ┌──────▼─────┐
│ Exercise │ │ AWS Learning │ │ Reminder │
│ Tracker │ │ Guide │ │ Service │
│ │ │ │ │ │
│ • Activity log │ │ • Lessons │ │ • Cron │
│ • Goals │ │ • Quizzes │ │ • Notifs │
│ • Intensity │ │ • Progress │ │ • Alerts │
└─────────────────┘ └─────────────────┘ └────────────┘
┌──────────────────────────────────────────────────────────────────┐
│ Data Layer │
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ JSON Files │ │ Backups │ │ Exports │ │
│ │ │ │ │ │ │ │
│ │ • Local │ │ • Timestamped│ │ • CSV/JSON │ │
│ │ • Private │ │ • Versioned │ │ • PDF │ │
│ │ • Encrypted │ │ • Restorable │ │ • Reports │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
└──────────────────────────────────────────────────────────────────┘
┌──────────────────────────────────────────────────────────────────┐
│ CI/CD & Quality │
│ │
│ GitHub Actions → Tests (1,927) → Coverage (82%) → Deploy │
│ │
│ • Multi-version testing (Node 18.x, 20.x) │
│ • Automated security audits │
│ • Quality gates enforcement │
└──────────────────────────────────────────────────────────────────┘
Purpose: Comprehensive PTSD/trauma recovery support
Features:
- Mood tracking with 1-10 scale
- Symptom monitoring (11 types)
- Trigger identification
- Coping strategy management
- Journal entries (4 types)
- Correlation analysis
Data: mental-health-data.json
Lines of Code: ~92,000
Purpose: Medication management and adherence
Features:
- Medication scheduling
- Adherence tracking
- Drug interaction warnings (65+ interactions)
- Reminder system
- History tracking
Data: medications.json
Lines of Code: ~55,000
Purpose: Sleep pattern monitoring
Features:
- Bedtime/wake time logging
- Quality ratings (1-10)
- Duration calculation
- Sleep debt tracking
- Weekly insights
Data: sleep-data.json
Lines of Code: ~19,000
Purpose: Physical activity monitoring
Features:
- Activity logging
- Intensity levels (low/moderate/high)
- Goal tracking (30 min/day)
- Exercise history
- Statistics
Data: exercise-data.json
Lines of Code: ~10,000
Purpose: Unified wellness overview and data aggregation
Features:
- Wellness scoring (0-100)
- Data aggregation from all trackers
- Correlation analysis (sleep/exercise/medication → mood)
- Trend analysis (8-week visualization)
- Goal setting & tracking
- Smart recommendations
- Export system (CSV/JSON/PDF)
Data: dashboard-goals.json
Lines of Code: ~192,000
Purpose: Cloud certification preparation
Features:
- 20+ AWS concepts explained
- Practice quizzes
- Progress tracking
- Exam readiness scoring
Data: aws-learning-progress.json
Lines of Code: ~85,000
Purpose: Cross-app notification system
Features:
- Cron-based scheduling
- Desktop notifications
- Medication reminders
- Study reminders
- Journal prompts
Test Coverage: 100% 🎯
Lines of Code: ~9,600
User Input → CLI → Tracker → JSON File → Validation → Storage
All Trackers → Dashboard API → Aggregation Engine → Unified View
Historical Data → Statistical Engine → Pearson Correlation → Insights
Dashboard Data → Export Manager → Format Converter → CSV/JSON/PDF
// Mood logging
tracker.logMood(rating, notes)
// Symptom tracking
tracker.logSymptom(type, severity, notes)
// Get insights
tracker.getInsights(days)
// Correlations
tracker.analyzeCorrelations(days)// Add medication
tracker.addMedication(name, dosage, frequency, times)
// Mark as taken
tracker.takeMedication(id, notes)
// Check interactions
tracker.checkInteractions()
// Get adherence
tracker.getAdherence(days)// Get wellness score
dashboard.calculateWellnessScore(date)
// Get correlations
dashboard.analyzeCorrelations(days)
// Get trends
dashboard.getTrends(weeks)
// Export data
dashboard.export(format, days)Total Tests: 1,927
Test Suites: 37
Coverage: 82.55% statements, 90.56% functions
- Unit Tests: Individual function testing
- Integration Tests: Multi-component workflows
- Error Handling Tests: Edge cases and failures
- Performance Tests: Response time benchmarks
Push → GitHub Actions → Install → Lint → Test → Coverage → Security Audit
{
"timestamp": "2025-12-08T12:00:00",
"mood": 8,
"notes": "Feeling great today",
"triggers": [],
"symptoms": []
}{
"id": 1234567890,
"name": "Aspirin",
"dosage": "100mg",
"frequency": "daily",
"times": ["08:00"],
"active": true
}{
"date": "2025-12-08",
"bedtime": "23:00",
"wakeTime": "07:00",
"duration": 8.0,
"quality": 9,
"notes": "Slept well"
}{
"date": "2025-12-08",
"type": "Running",
"duration": 30,
"intensity": "high",
"notes": "Morning jog"
}- Local Storage: All data stored locally (no cloud)
- No External APIs: No data sent to third parties
- File Permissions: Data files have restricted access
- Backup Encryption: Optional encryption for backups
- Type checking on all inputs
- Range validation (e.g., mood 1-10)
- SQL injection prevention (N/A - no SQL)
- XSS prevention for future web version
- Performance Cache: 100 entries, 5-minute TTL
- Query Results: Cached for repeated requests
- Correlation Calculations: Memoized results
- Max History: 10,000 entries per tracker
- Max Export: 365 days
- Max Backup Size: 100MB
- Single user
- Local JSON storage
- CLI interface
Lambda Functions → API Gateway → DynamoDB → CloudFront
React Frontend → REST API → PostgreSQL → Redis Cache
React Native App → GraphQL API → Microservices → Kafka
- Node.js: 18.x or 20.x
- chalk: ^4.1.2 (CLI colors)
- cli-table3: ^0.6.5 (Tables)
- node-cron: ^4.2.1 (Scheduling)
- node-notifier: ^10.0.1 (Notifications)
- pdfkit: ^0.17.2 (PDF export)
- asciichart: ^1.5.25 (Charts)
- jest: ^30.2.0 (Testing framework)
npm install
npm test
npm run mental # or other apps# Convert to Lambda
serverless deploy
# Setup DynamoDB
aws dynamodb create-table --table-name wellness-data
# Deploy API Gateway
aws apigateway create-rest-api --name StepSyncAI- Console logs
- Test output
- Error tracking via try/catch
- CloudWatch logs
- Error tracking (Sentry)
- Performance monitoring (New Relic)
- User analytics (Mixpanel)
See CONTRIBUTING.md for:
- Development setup
- Coding standards
- Testing requirements
- PR process
MIT License - See LICENSE
Last Updated: December 2025 Version: 3.12.0 Maintainer: Isaloum