How huangyixin666/methodpal- works
MethodPal is an AI-assisted data-analysis workspace for social-science researchers. Users authenticate, create a project, upload or edit a dataset, review variables and choose an analysis method; they can run analyses manually or ask the agent to clarify goals and execute a resumable workflow, then inspect charts, explanations and exported reports. The graph combines the documented product workflow with sampled API, persistence and orchestration relationships. Several feature modules are represented at their exact directory path because their implementation was not sampled; those links are documented capabilities, not claims of source inspection.
Main entry points: App.tsx App shell · api.ts API client · AiPanel.tsx Agent panel · datasets.py Dataset API
Components 24
Workspace UI
- App shell
src/app/App.tsx - Authentication UI
src/app/components/AuthGate.tsx - Workspace state
src/app/context/WorkspaceContext.tsx - Dataset editor
src/app/components/UploadPage.tsx - Agent panel
src/app/components/AiPanel.tsx - API client
src/app/lib/api.ts
API and data
- Project API
backend/app/api/projects.py - Dataset API
backend/app/api/datasets.py - Data profiling
backend/app/services/data_profiler.py - Agent API
backend/app/api/agent.py - Analysis API
backend/app/api/analysis.py
Analysis and agents
- Method selection
backend/app/services/method_recommender.py - Autonomous workflow
backend/app/services/langgraph_agent/autonomous_workflow.py - Agent tools
backend/app/services/agent_tools - Analysis runner
backend/app/services/analysis_runner.py - Statistical models
backend/app/services/model_tools
Persistence and jobs
- Background jobs
backend/app/services/background_jobs.py - Owner-scoped store
backend/app/services/store.py - SQLite database
backend/app/services/database.py
Results and exports
- Results and charts
src/app/components/ResultsPage.tsx - Chart service
backend/app/services/chart_tools/chart_runner.py - Report export
backend/app/api/reports.py
Other components
- Researcher
- DeepSeek service
Connections 27
- Researcher → App shell: uses workspace
README.md - App shell → Authentication UI: gates access
src/app/App.tsx - App shell → Workspace state: provides state
src/app/App.tsx - App shell → Dataset editor: shows upload
src/app/App.tsx - App shell → Agent panel: shows assistant
src/app/App.tsx - Dataset editor → API client: uploads data
src/app/components/UploadPage.tsx - Workspace state → API client: loads and saves
src/app/context/WorkspaceContext.tsx - Agent panel → API client: sends requests
src/app/components/AiPanel.tsx - API client → Project API: requests projects
backend/app/api/projects.py - API client → Dataset API: requests datasets
backend/app/api/datasets.py - Dataset API → Data profiling: profiles data
backend/app/api/datasets.py - Researcher → Method selection: selects method
README.md - Agent panel → Agent API: submits prompts
src/app/components/AiPanel.tsx - Agent API → Autonomous workflow: runs autonomous analysis
backend/app/api/agent.py - Autonomous workflow → Agent tools: uses tools
backend/app/services/langgraph_agent/autonomous_workflow.py - Agent API → Background jobs: dispatches background runs
backend/app/services/background_jobs.py - Researcher → Analysis API: requests manual analysis
README.md - Analysis API → Analysis runner: runs analysis
backend/app/api/analysis.py - Analysis runner → Statistical models: executes methods
- Project API → Owner-scoped store: reads and writes
backend/app/api/projects.py - Dataset API → Owner-scoped store: reads and writes
backend/app/api/datasets.py - Owner-scoped store → SQLite database: persists records
backend/app/services/store.py - Background jobs → SQLite database: uses job persistence
backend/app/services/background_jobs.py - Researcher → Results and charts: reviews results
README.md - Researcher → Chart service: requests charts
README.md - Researcher → Report export: exports reports
README.md - Report export → DeepSeek service: uses report writing