How nifelix97/llm-model works
DC-TIM is a React workspace for national-development policy analysis. Users enter through public landing/login routes, then protected workspace pages provide dashboard insights, policy optimization and monitoring, model prompting, data ingestion, model configuration, and user administration. Pages use shared authentication/state and a RAG API client to communicate with the backend. The README documents capabilities beyond the sampled implementation; page-to-API edges are supported by the source index, while detailed request behavior is only partially shown.
Main entry points: ProtectedRoute.tsx Access guard · ragApi.ts RAG API client · AppRoutes.tsx Route dispatch · DashboardPage.tsx Indicator dashboard
Components 20
App entry and access
- React bootstrap
src/main.tsx - Route dispatch
src/routes/AppRoutes.tsx - Access guard
src/components/ProtectedRoute.tsx - Public landing
src/pages/LandingPage.tsx - Login page
src/pages/LoginPage.tsx - Not found
src/pages/NotFoundPage.tsx
Policy analysis
- Indicator dashboard
src/pages/DashboardPage.tsx - Digital twin
src/pages/DigitalTwin.tsx - Policy optimization
src/pages/PolicyOptimizePage.tsx - Policy monitoring
src/pages/PolicyMonitoring.tsx - Model prompt
src/pages/PromptPage.tsx
Model and knowledge
- Data lake
src/pages/DataLakePage.tsx - Model configuration
src/pages/ModelConfigPage.tsx
Workspace operations
- User management
src/pages/UserManagementPage.tsx
Shared runtime
- Authentication state
src/context/AuthContext.tsx - Workspace shell
src/components/AppLayout.tsx - Analysis handoff
src/context/AnalysisContext.tsx - RAG API client
src/lib/ragApi.ts
Other components
- Policymaker
- RAG and auth backend
Connections 30
- Policymaker → React bootstrap: opens app
README.md - React bootstrap → Route dispatch: mounts routes
src/main.tsx - Route dispatch → Public landing: routes public
src/routes/AppRoutes.tsx - Route dispatch → Login page: routes public
src/routes/AppRoutes.tsx - Route dispatch → Access guard: guards workspace
src/routes/AppRoutes.tsx - Access guard → Indicator dashboard: renders
src/routes/AppRoutes.tsx - Access guard → Model prompt: renders
src/routes/AppRoutes.tsx - Access guard → Policy optimization: renders
src/routes/AppRoutes.tsx - Access guard → Data lake: renders
src/routes/AppRoutes.tsx - Access guard → Digital twin: renders
src/routes/AppRoutes.tsx - Access guard → Model configuration: renders
src/routes/AppRoutes.tsx - Access guard → Policy monitoring: renders
src/routes/AppRoutes.tsx - Access guard → User management: renders
src/routes/AppRoutes.tsx - Route dispatch → Not found: falls back
src/routes/AppRoutes.tsx - Login page → Authentication state: signs in
src/pages/LoginPage.tsx - Access guard → Authentication state: checks session
src/components/ProtectedRoute.tsx - Authentication state → RAG API client: auth requests
src/context/AuthContext.tsx - Authentication state → Analysis handoff: clears on logout
src/context/AuthContext.tsx - Indicator dashboard → Workspace shell: uses shell
src/pages/DashboardPage.tsx - Indicator dashboard → RAG API client: requests analysis
src/pages/DashboardPage.tsx - Indicator dashboard → Analysis handoff: loads handoff
src/pages/DashboardPage.tsx - Digital twin → RAG API client: requests data
src/pages/DigitalTwin.tsx - Policy optimization → RAG API client: requests projections
src/pages/PolicyOptimizePage.tsx - Policy monitoring → RAG API client: loads monitoring
src/pages/PolicyMonitoring.tsx - Model prompt → RAG API client: queries model
src/pages/PromptPage.tsx - Model prompt → Analysis handoff: shares analysis
README.md - Data lake → RAG API client: manages training data
src/pages/DataLakePage.tsx - Model configuration → RAG API client: configures models
src/pages/ModelConfigPage.tsx - User management → RAG API client: manages users
src/pages/UserManagementPage.tsx - RAG API client → RAG and auth backend: sends requests
src/lib/ragApi.ts