How frankdavid1503/ia_interpersonal works
NEXO helps people reflect on interpersonal situations: users sign in, submit a situation, and receive a risk-aware analysis with emotions, recommendations, and a suggested response. The frontend also supports analysis history and personalized communication preferences. The README describes the overall capabilities; sampled source confirms key frontend calls and the analysis service’s safety-before-LLM behavior. Some router-to-service wiring and unsampled subsystems are only documented or indexed, so uncertain links are omitted or marked unverified.
Main entry points: analysis_service.py Analysis orchestration · api.ts API client · main.py FastAPI app · auth_service.py Authentication
Components 32
Web experience
- Dashboard
frontend/app/dashboard/page.tsx - Situation form
frontend/components/SituationForm.tsx - Analysis view
frontend/app/analysis/[id]/page.tsx - Analysis card
frontend/components/AnalysisCard.tsx - Recommendations
frontend/components/RecommendationCard.tsx - Analysis history
frontend/app/history/page.tsx - Preferences profile
frontend/app/profile/page.tsx - Auth state
frontend/context/AuthContext.tsx - API client
frontend/services/api.ts
API and identity
- FastAPI app
backend/app/main.py - Auth routes
backend/app/routers/auth.py - Situation routes
backend/app/routers/situations.py - Analysis routes
backend/app/routers/analyses.py - Preference routes
backend/app/routers/preferences.py - Authentication
backend/app/services/auth_service.py - Situation handling
backend/app/services/situation_service.py - JWT security
backend/app/core/security.py
Analysis workflow
- Analysis orchestration
backend/app/services/analysis_service.py - Risk screening
backend/app/services/safety_service.py - Safety rules
backend/app/ai/safety.py - AI agent
backend/app/ai/agent.py - Output parser
backend/app/ai/parser.py - Prompt definitions
backend/app/ai/prompts.py
Domain data
- User preferences
backend/app/models/preference.py - Situations
backend/app/models/situation.py - Analysis records
backend/app/models/analysis.py - Emotion records
backend/app/models/emotion.py - Recommendation records
backend/app/models/recommendation.py - Safety events
backend/app/models/safety_event.py - User records
backend/app/models/user.py - Database
backend/app/core/database.py
Other components
- User
Connections 35
- User → Dashboard: uses
README.md - Dashboard → Situation form: renders
frontend/app/dashboard/page.tsx - Situation form → API client: submits situation
frontend/components/SituationForm.tsx - API client → FastAPI app: HTTP requests
README.md - Analysis view → API client: loads analysis
frontend/app/analysis/[id]/page.tsx - Analysis view → Analysis card: renders
frontend/app/analysis/[id]/page.tsx - Analysis card → Recommendations: renders
frontend/components/AnalysisCard.tsx - Analysis history → API client: loads history
frontend/app/history/page.tsx - Preferences profile → API client: reads and updates
frontend/app/profile/page.tsx - Auth state → API client: authenticates
frontend/context/AuthContext.tsx - FastAPI app → Auth routes: registers router
backend/app/main.py - FastAPI app → Situation routes: registers router
backend/app/main.py - FastAPI app → Analysis routes: registers router
backend/app/main.py - FastAPI app → Preference routes: registers router
backend/app/main.py - Auth routes → Authentication: delegates to
backend/app/routers/auth.py - Authentication → JWT security: hashes and issues tokens
backend/app/services/auth_service.py - Authentication → User records: reads and creates
backend/app/services/auth_service.py - Authentication → User preferences: creates defaults
backend/app/services/auth_service.py - Situation routes → Situation handling: delegates to
backend/app/routers/situations.py - Analysis routes → Analysis orchestration: delegates to
- Analysis orchestration → Risk screening: screens situation
backend/app/services/analysis_service.py - Analysis orchestration → AI agent: analyzes safe input
backend/app/services/analysis_service.py - Risk screening → Safety rules: checks risk
backend/app/services/safety_service.py - Analysis orchestration → Situations: loads situation
backend/app/services/analysis_service.py - Analysis orchestration → User preferences: loads preferences
backend/app/services/analysis_service.py - Analysis orchestration → Analysis records: persists analysis
backend/app/services/analysis_service.py - Analysis orchestration → Emotion records: persists emotions
backend/app/services/analysis_service.py - Analysis orchestration → Recommendation records: persists alternatives
backend/app/services/analysis_service.py - Risk screening → Safety events: records events
backend/app/services/safety_service.py - AI agent → Output parser: uses parser
backend/app/ai/agent.py - AI agent → Prompt definitions: uses prompts
backend/app/ai/agent.py - Analysis orchestration → Database: queries and commits
backend/app/services/analysis_service.py - Authentication → Database: queries and commits
backend/app/services/auth_service.py - JWT security → Database: loads user
backend/app/core/security.py - Preference routes → User preferences: reads and updates
backend/app/routers/preferences.py