How devilsanket/psychoanalysis works
ISF Child Psycho-Analysis Portal is a React/FastAPI application for turning field reports into child observations and supporting ongoing roster review. Its principal workflow is report entry and extraction, profile matching and human review, then saving observations; users can subsequently inspect child histories, AI summaries, tasks, risk indicators, and center-level analytics. The graph reflects documented imports, calls, and the README’s frontend/backend arrangement. Some UI features and router internals are unsampled, so their specific backend connections are omitted rather than inferred.
Main entry points: api.py FastAPI application · db.py MongoDB data · AdminPanel.tsx Admin panel · api.ts API client
Components 23
Portal UI
- App workflow
frontend/src/App.tsx - Report entry
frontend/src/components/ReportInput.tsx - Profile review
frontend/src/components/ReviewProfiles.tsx - API client
frontend/src/api.ts - Admin panel
frontend/src/components/AdminPanel.tsx
API and workflows
- FastAPI application
api.py - Report endpoints
routers/extraction.py - Extract and match
pipeline.py - Child profiles
routers/children.py - AI child analysis
routers/ai.py - Analytics endpoints
routers/analytics.py - Administration endpoints
routers/admin.py - Center endpoints
routers/centers.py - Shared API models
common.py
Persistence
- MongoDB data
db.py
Roster insights
- Roster insights
frontend/src/components/RosterInsights.tsx - Risk dashboards
frontend/src/components/ChildRiskDashboard.tsx - Falling-through review
frontend/src/components/FallingThroughCracks.tsx - Center heatmap
frontend/src/components/BalgruhaHeatMap.tsx - Task analytics
frontend/src/components/TaskAnalytics.tsx - Success stories
frontend/src/components/SuccessStories.tsx
Other components
- Portal user
- Gemini / LLM
Connections 31
- Portal user → App workflow: uses
frontend/src/App.tsx - App workflow → Report entry: renders
frontend/src/App.tsx - App workflow → Profile review: renders
frontend/src/App.tsx - Report entry → API client: requests extraction
frontend/src/components/ReportInput.tsx - Profile review → API client: saves profiles
frontend/src/components/ReviewProfiles.tsx - API client → FastAPI application: HTTP requests
README.md - FastAPI application → Report endpoints: routes to
api.py - FastAPI application → Child profiles: routes to
api.py - FastAPI application → AI child analysis: routes to
api.py - FastAPI application → Analytics endpoints: routes to
api.py - FastAPI application → Administration endpoints: routes to
api.py - FastAPI application → Center endpoints: routes to
api.py - Report endpoints → Extract and match: invokes extraction
routers/extraction.py - Extract and match → MongoDB data: reads and writes
pipeline.py - Child profiles → MongoDB data: reads and writes
routers/children.py - AI child analysis → MongoDB data: reads and updates
routers/ai.py - AI child analysis → Gemini / LLM: generates analysis
- Administration endpoints → MongoDB data: reads and updates
routers/admin.py - Analytics endpoints → MongoDB data: reads analytics
routers/analytics.py - Center endpoints → MongoDB data: reads centers
routers/centers.py - Report endpoints → Shared API models: uses models
routers/extraction.py - Child profiles → Shared API models: uses models
routers/children.py - AI child analysis → Shared API models: uses helpers
routers/ai.py - Admin panel → API client: requests admin data
frontend/src/components/AdminPanel.tsx - App workflow → Admin panel: renders
frontend/src/App.tsx - Roster insights → API client: fetches child data
frontend/src/components/RosterInsights.tsx - Admin panel → Risk dashboards: renders
frontend/src/components/AdminPanel.tsx - Admin panel → Falling-through review: renders
frontend/src/components/AdminPanel.tsx - Admin panel → Center heatmap: renders
frontend/src/components/AdminPanel.tsx - Roster insights → Task analytics: renders
frontend/src/components/RosterInsights.tsx - Roster insights → Success stories: renders
frontend/src/components/RosterInsights.tsx