How sey4192/exaisemproj works
EXAI is a mobile-centered check-in and intervention product: users enter session details or request a simulated session, receive a risk result, and can review explanations and trends. Tymeout’s app context coordinates prediction, local history, and reminders; the Flask backend provides prediction and model metrics. The README also documents simulated-data training, SHAP/LIME explanations, and a rule-based persuasion engine. Backend internals were not excerpted, so their connections are documented at the product level rather than inferred as code calls.
Main entry points: AppContext.js App workflow · App.js App navigation · app.py Flask API · CheckScreen.js Session check-in
Components 24
Tymeout app
- App navigation
mobile/App.js - Session check-in
mobile/src/screens/CheckScreen.js - App workflow
mobile/src/context/AppContext.js - API client
mobile/src/api/client.js - High-risk alert
mobile/src/screens/AlertScreen.js - Low-risk result
mobile/src/screens/LowRiskResultScreen.js - Explanation view
mobile/src/screens/ExplanationScreen.js - Check-in history
mobile/src/screens/HistoryScreen.js - Personal insights
mobile/src/screens/InsightsScreen.js - Dashboard
mobile/src/screens/DashboardScreen.js - Onboarding
mobile/src/screens/OnboardingScreen.js - Settings
mobile/src/screens/SettingsScreen.js
Risk service
- Flask API
backend/app.py - Persuasion rules
backend/app.py - Model metrics
backend/app.py
Model and explanations
- Risk prediction
backend/ml/train_model.py - SHAP and LIME
backend/ml/explainability.py - Simulated data
backend/ml/generate_data.py - Model evaluation
backend/ml/evaluate_extra.py
Local state and reminders
- Local persistence
mobile/src/storage/storage.js - Reminder scheduling
mobile/src/notifications/notifications.js - Background reminders
mobile/src/notifications/backgroundTask.js
Other components
- User
- Notification service
Connections 27
- User → App navigation: uses
- App navigation → Onboarding: routes to
mobile/App.js - App navigation → Dashboard: routes to
mobile/App.js - App navigation → Session check-in: routes to
mobile/App.js - App navigation → Check-in history: routes to
mobile/App.js - App navigation → Personal insights: routes to
mobile/App.js - User → Session check-in: enters session
- Session check-in → App workflow: uses workflow
mobile/src/screens/CheckScreen.js - App workflow → API client: requests prediction
mobile/src/context/AppContext.js - App workflow → Local persistence: loads and saves
mobile/src/context/AppContext.js - App workflow → Reminder scheduling: configures
mobile/src/context/AppContext.js - App workflow → Background reminders: registers
mobile/src/context/AppContext.js - API client → Flask API: sends requests
mobile/src/api/client.js - Flask API → Risk prediction: predicts risk
- Flask API → SHAP and LIME: explains prediction
- Flask API → Persuasion rules: selects intervention
backend/app.py - Simulated data → Risk prediction: trains with
- Risk prediction → Model evaluation: evaluated by
- Flask API → Model metrics: serves metrics
backend/app.py - App workflow → High-risk alert: navigates on high risk
mobile/src/context/AppContext.js - App workflow → Low-risk result: navigates on low risk
mobile/src/context/AppContext.js - User → Explanation view: reviews
- User → Check-in history: reviews
- User → Personal insights: reviews
- Reminder scheduling → Notification service: schedules alerts
- Settings → App workflow: updates preferences
mobile/src/screens/SettingsScreen.js - Personal insights → API client: fetches metrics
mobile/src/screens/InsightsScreen.js