# roystondalmeida/multi-agent-research-assistant architecture

> Architecture diagram of the GitHub repository roystondalmeida/multi-agent-research-assistant, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-07-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/roystondalmeida/multi-agent-research-assistant
- Repository: https://github.com/roystondalmeida/multi-agent-research-assistant

## Overview

1. **Overall shape**
   - This is a two-tier product: a **React/Vite frontend** in the repo root and a **FastAPI Python backend** under `backend/`.
   - The product is a research assistant that accepts a topic, runs an AI-driven workflow, stores results, and shows progress/results back to the user.

2. **Frontend boundary**
   - The frontend is a single-page app built with **React + TypeScript + Vite**.
   - Routing appears page-based (`src/pages`) with views for auth, dashboard, progress, results, history, settings, password reset, and a not-found fallback.
   - `src/main.tsx` and `src/App.tsx` likely set up global providers and route layout.

3. **Frontend state and integration layer**
   - `src/contexts/AuthContext.tsx` manages user/session state.
   - `src/contexts/ResearchContext.tsx` holds research-query state and likely coordinates results/progress across pages.
   - `src/hooks/useResearch.ts` and `src/hooks/useRealtimeProgress.ts` indicate the frontend subscribes to backend/database updates rather than polling only.
   - `src/integrations/supabase/client.ts` shows Supabase is the browser-side auth/data integration point.

4. **Frontend UI composition**
   - The UI is broken into focused components for each research lifecycle step: query submission, progress, previews, results, sources, perspectives, export, rating, and feedback.
   - `src/components/ui/*` is a large reusable design-system layer, likely shadcn/ui primitives used across the app.
   - The visual stack is **Tailwind CSS** plus component primitives, making the frontend mostly presentation + orchestration over shared UI building blocks.

5. **User-facing workflow**
   - A user signs in, submits a research query, watches real-time progress, and then navigates to a results page with report content, sources, perspectives, export actions, and feedback.
   - `Dashboard`, `History`, and `Settings` suggest persisted account-specific research history and user preferences.

6. **Backend boundary**
   - The backend is a **FastAPI** service that exposes the research API and acts as the orchestration layer for the AI workflow.
   - `backend/main.py` is the entry point, likely defining health and research endpoints described in the README.
   - The backend is not a generic CRUD API; its primary job is to authenticate requests, run the workflow, and persist/update research state.

7. **Backend workflow orchestration**
   - `backend/services/research_workflow.py` is the central orchestration module and is the best place to diagram the multi-step pipeline.
   - The README’s agent pipeline maps to backend responsibilities such as browser/search, outline generation, section research, review, writing, and publishing.
   - The workflow is likely stateful and iterative, with intermediate progress updates emitted as each stage completes.

8. **Backend service boundaries**
   - `auth_service.py` handles Supabase-backed request authentication and user context.
   - `database_service.py` centralizes persistence and retrieval of research records, statuses, and history.
   - `web_search_service.py` handles external web discovery/source gathering.
   - `gemini_service.py` encapsulates LLM calls for generation, synthesis, and review.
   - `content_service.py` likely assembles and formats the final report content from workflow outputs.

9. **Data model layer**
   - `backend/models/research_models.py` defines the backend’s research-related schemas, which are probably used by FastAPI request/response validation and internal workflow state.
   - This is an important boundary for diagramming because it separates API payloads from internal workflow data and persisted records.

10. **External systems**
   - **Supabase** is the key external platform: authentication, database/storage, and real-time updates for the frontend.
   - **Gemini** is the LLM provider used for content generation and analysis.
   - **Web search** is an additional external dependency used by the research workflow to collect sources.

11. **Real-time update path**
   - The architecture suggests the backend writes status/progress to Supabase or a database layer, while the frontend subscribes or refreshes through its realtime hook.
   - This creates a clear separation: the frontend does not manage the workflow directly; it observes workflow state updates.

12. **Deployment/runtime boundaries**
   - The repo is designed for a static frontend deployment on **Vercel** or similar and a separately hosted Python backend.
   - `vercel.json` indicates frontend deployment configuration, while `backend/requirements.txt` and `uvicorn` setup indicate a standalone API service runtime.
   - Environment variables tie the pieces together: frontend needs Supabase and backend URLs; backend needs Supabase, Gemini, and frontend origin settings.

13. **What to emphasize in an architecture diagram**
   - Draw three main zones: **browser UI**, **FastAPI orchestration backend**, and **external services (Supabase, Gemini, web search)**.
   - Show the frontend submitting research requests and rendering realtime progress/results.
   - Show the backend as the orchestrator between auth, persistence, search, AI generation, and final content publication.
   - Show Supabase as both identity and state/history backbone, not just login.

Main entry points: [`src/App.tsx`](https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/App.tsx) (App shell), [`src/pages/Results.tsx`](https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/pages/Results.tsx) (Results page), [`backend/main.py`](https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/backend/main.py) (API entry), [`backend/services/research_workflow.py`](https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/backend/services/research_workflow.py) (Workflow engine)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Frontend"]
  node_src_main(("Entry<br/>[main.tsx]"))
  node_src_app["App shell<br/>route shell<br/>[App.tsx]"]
  node_auth_context["Auth state<br/>context<br/>[AuthContext.tsx]"]
  node_research_context["Research state<br/>context"]
  node_hook_research["Research hook<br/>data hook<br/>[useResearch.ts]"]
  node_hook_progress["Realtime hook"]
  node_page_auth["Auth page<br/>[Auth.tsx]"]
  node_page_dashboard["Dashboard<br/>page<br/>[Dashboard.tsx]"]
  node_page_progress["Progress page<br/>[Progress.tsx]"]
  node_page_results["Results page<br/>[Results.tsx]"]
  node_page_history["History page<br/>[History.tsx]"]
  node_page_settings["Settings page<br/>[Settings.tsx]"]
  node_page_reset["Reset page<br/>[ResetPassword.tsx]"]
  node_page_notfound["Fallback<br/>page<br/>[NotFound.tsx]"]
  node_comp_form["Research form<br/>ui component<br/>[ResearchForm.tsx]"]
  node_comp_progress["Progress tracker<br/>ui component"]
  node_comp_results["Results view<br/>ui component<br/>[ResultsDisplay.tsx]"]
  node_comp_sources["Sources view<br/>ui component<br/>[SourcesDisplay.tsx]"]
  node_comp_preview["Preview view<br/>ui component<br/>[PreviewContent.tsx]"]
  node_comp_perspectives["Perspectives view<br/>ui component"]
  node_comp_export["Export actions<br/>ui component<br/>[ExportActions.tsx]"]
  node_comp_feedback["Feedback form<br/>ui component<br/>[FeedbackForm.tsx]"]
  node_comp_header["Header<br/>ui component<br/>[Header.tsx]"]
  node_ui_kit["UI kit<br/>design system"]
end

subgraph group_backend["Backend"]
  node_backend_main(("API entry<br/>[main.py]"))
  node_model_research["Research model<br/>schema<br/>[research_models.py]"]
  node_svc_workflow["Workflow engine<br/>orchestrator"]
  node_svc_auth["Auth service<br/>[auth_service.py]"]
  node_svc_db["Database service"]
  node_svc_search["Search service"]
  node_svc_gemini["Gemini service<br/>[gemini_service.py]"]
  node_svc_content["Content service<br/>[content_service.py]"]
end

subgraph group_external["External systems"]
  node_ext_supabase[("Supabase<br/>platform")]
  node_ext_gemini(("Gemini<br/>llm api"))
end

node_src_main -->|"boot"| node_src_app
node_src_app -->|"session"| node_auth_context
node_src_app -->|"research state"| node_research_context
node_src_app -->|"routes"| node_page_auth
node_src_app -->|"routes"| node_page_dashboard
node_src_app -->|"routes"| node_page_progress
node_src_app -->|"routes"| node_page_results
node_src_app -->|"routes"| node_page_history
node_src_app -->|"routes"| node_page_settings
node_src_app -->|"routes"| node_page_reset
node_src_app -->|"fallback"| node_page_notfound
node_page_dashboard -->|"start"| node_comp_form
node_page_progress -->|"status"| node_comp_progress
node_page_results -->|"report"| node_comp_results
node_page_results -->|"sources"| node_comp_sources
node_page_results -->|"draft"| node_comp_preview
node_page_results -->|"analysis"| node_comp_perspectives
node_page_results -->|"actions"| node_comp_export
node_page_results -->|"feedback"| node_comp_feedback
node_page_dashboard -->|"chrome"| node_comp_header
node_page_history -->|"chrome"| node_comp_header
node_page_settings -->|"chrome"| node_comp_header
node_page_auth -->|"chrome"| node_comp_header
node_auth_context -->|"auth"| node_ext_supabase
node_hook_research -->|"API"| node_backend_main
node_hook_progress -->|"realtime"| node_ext_supabase
node_hook_progress -->|"status"| node_backend_main
node_research_context -->|"orchestrate"| node_hook_research
node_research_context -->|"observe"| node_hook_progress
node_backend_main -->|"validate"| node_model_research
node_backend_main -->|"protect"| node_svc_auth
node_backend_main -->|"run"| node_svc_workflow
node_backend_main -->|"persist"| node_svc_db
node_svc_workflow -->|"discover"| node_svc_search
node_svc_workflow -->|"generate"| node_svc_gemini
node_svc_workflow -->|"assemble"| node_svc_content
node_svc_workflow -->|"update"| node_svc_db
node_svc_auth -->|"verify"| node_ext_supabase
node_svc_db -->|"store"| node_ext_supabase
node_svc_search -.->|"optional state"| node_ext_supabase
node_svc_gemini -->|"invoke"| node_ext_gemini
node_svc_content -->|"shape"| node_model_research

click node_src_main "https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/main.tsx"
click node_src_app "https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/App.tsx"
click node_auth_context "https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/contexts/AuthContext.tsx"
click node_research_context "https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/contexts/ResearchContext.tsx"
click node_hook_research "https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/hooks/useResearch.ts"
click node_hook_progress "https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/hooks/useRealtimeProgress.ts"
click node_page_auth "https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/pages/Auth.tsx"
click node_page_dashboard "https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/pages/Dashboard.tsx"
click node_page_progress "https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/pages/Progress.tsx"
click node_page_results "https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/pages/Results.tsx"
click node_page_history "https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/pages/History.tsx"
click node_page_settings "https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/pages/Settings.tsx"
click node_page_reset "https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/pages/ResetPassword.tsx"
click node_page_notfound "https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/pages/NotFound.tsx"
click node_comp_form "https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/components/ResearchForm.tsx"
click node_comp_progress "https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/components/ProgressTracker.tsx"
click node_comp_results "https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/components/ResultsDisplay.tsx"
click node_comp_sources "https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/components/SourcesDisplay.tsx"
click node_comp_preview "https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/components/PreviewContent.tsx"
click node_comp_perspectives "https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/components/PerspectivesDisplay.tsx"
click node_comp_export "https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/components/ExportActions.tsx"
click node_comp_feedback "https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/components/FeedbackForm.tsx"
click node_comp_header "https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/components/Header.tsx"
click node_ui_kit "https://github.com/roystondalmeida/multi-agent-research-assistant/tree/main/src/components/ui"
click node_backend_main "https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/backend/main.py"
click node_model_research "https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/backend/models/research_models.py"
click node_svc_workflow "https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/backend/services/research_workflow.py"
click node_svc_auth "https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/backend/services/auth_service.py"
click node_svc_db "https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/backend/services/database_service.py"
click node_svc_search "https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/backend/services/web_search_service.py"
click node_svc_gemini "https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/backend/services/gemini_service.py"
click node_svc_content "https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/backend/services/content_service.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_src_main,node_src_app,node_auth_context,node_research_context,node_hook_research,node_hook_progress,node_page_auth,node_page_dashboard,node_page_progress,node_page_results,node_page_history,node_page_settings,node_page_reset,node_page_notfound,node_comp_form,node_comp_progress,node_comp_results,node_comp_sources,node_comp_preview,node_comp_perspectives,node_comp_export,node_comp_feedback,node_comp_header,node_ui_kit toneBlue
class node_backend_main,node_model_research,node_svc_workflow,node_svc_auth,node_svc_db,node_svc_search,node_svc_gemini,node_svc_content toneAmber
class node_ext_supabase,node_ext_gemini toneMint
```

## Components

### Frontend

React/Vite single-page app, UI, state, and realtime observation layer.

- [Entry](https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/main.tsx): react entry · Bootstraps the browser app and global providers. · `src/main.tsx`
- [App shell](https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/App.tsx): route shell · Top-level layout and route composition. · `src/App.tsx`
- [Auth state](https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/contexts/AuthContext.tsx): context · Manages signed-in user and session state. · `src/contexts/AuthContext.tsx`
- [Research state](https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/contexts/ResearchContext.tsx): context · Coordinates research query, progress, and result state across pages. · `src/contexts/ResearchContext.tsx`
- [Research hook](https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/hooks/useResearch.ts): data hook · Frontend integration for starting and observing research work. · `src/hooks/useResearch.ts`
- [Realtime hook](https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/hooks/useRealtimeProgress.ts): realtime hook · Subscribes to live progress updates for active research jobs. · `src/hooks/useRealtimeProgress.ts`
- [Auth page](https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/pages/Auth.tsx): page · Sign-in and account access flows. · `src/pages/Auth.tsx`
- [Dashboard](https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/pages/Dashboard.tsx): page · Primary landing view for starting and resuming research. · `src/pages/Dashboard.tsx`
- [Progress page](https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/pages/Progress.tsx): page · Shows workflow status while research is running. · `src/pages/Progress.tsx`
- [Results page](https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/pages/Results.tsx): page · Displays the generated report and supporting material. · `src/pages/Results.tsx`
- [History page](https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/pages/History.tsx): page · Lists prior research runs and saved output. · `src/pages/History.tsx`
- [Settings page](https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/pages/Settings.tsx): page · Account and app preferences. · `src/pages/Settings.tsx`
- [Reset page](https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/pages/ResetPassword.tsx): page · Password reset flow. · `src/pages/ResetPassword.tsx`
- [Fallback](https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/pages/NotFound.tsx): page · Route fallback for unknown paths. · `src/pages/NotFound.tsx`
- [Research form](https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/components/ResearchForm.tsx): ui component · Captures the topic and starts the workflow. · `src/components/ResearchForm.tsx`
- [Progress tracker](https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/components/ProgressTracker.tsx): ui component · Visualizes the current research stage and completion state. · `src/components/ProgressTracker.tsx`
- [Results view](https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/components/ResultsDisplay.tsx): ui component · Renders the final report content. · `src/components/ResultsDisplay.tsx`
- [Sources view](https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/components/SourcesDisplay.tsx): ui component · Shows research sources and citations. · `src/components/SourcesDisplay.tsx`
- [Preview view](https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/components/PreviewContent.tsx): ui component · Surfaces intermediate or draft output. · `src/components/PreviewContent.tsx`
- [Perspectives view](https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/components/PerspectivesDisplay.tsx): ui component · Displays alternative viewpoints and analysis angles. · `src/components/PerspectivesDisplay.tsx`
- [Export actions](https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/components/ExportActions.tsx): ui component · Provides export and sharing actions for finished output. · `src/components/ExportActions.tsx`
- [Feedback form](https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/components/FeedbackForm.tsx): ui component · Collects user feedback on the generated research. · `src/components/FeedbackForm.tsx`
- [Header](https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/src/components/Header.tsx): ui component · Top-level navigation and account chrome. · `src/components/Header.tsx`
- [UI kit](https://github.com/roystondalmeida/multi-agent-research-assistant/tree/main/src/components/ui): design system · Reusable component primitives used across the interface. · `src/components/ui`

### Backend

FastAPI orchestration service for auth, workflow execution, and persistence.

- [API entry](https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/backend/main.py): fastapi entry · FastAPI application and HTTP endpoint surface. · `backend/main.py`
- [Research model](https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/backend/models/research_models.py): schema · Request, response, and workflow state schemas. · `backend/models/research_models.py`
- [Workflow engine](https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/backend/services/research_workflow.py): orchestrator · Coordinates the multi-step research pipeline. · `backend/services/research_workflow.py`
- [Auth service](https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/backend/services/auth_service.py): service · Validates Supabase-backed identity and user context. · `backend/services/auth_service.py`
- [Database service](https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/backend/services/database_service.py): service · Reads and writes research records, status, and history. · `backend/services/database_service.py`
- [Search service](https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/backend/services/web_search_service.py): service · Finds external sources and web evidence. · `backend/services/web_search_service.py`
- [Gemini service](https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/backend/services/gemini_service.py): service · Wraps LLM calls for synthesis, review, and writing. · `backend/services/gemini_service.py`
- [Content service](https://github.com/roystondalmeida/multi-agent-research-assistant/blob/main/backend/services/content_service.py): service · Assembles and formats the final report payload. · `backend/services/content_service.py`

### External systems

Third-party services used for identity, state, realtime updates, search, and generation.

- **Supabase**: platform · Identity, persistent state, and realtime backbone.
- **Gemini**: llm api · External model provider for generation and analysis.

## Connections

- Entry → App shell: boot · Initializes the app shell and providers.
- App shell → Auth state: session · Provides authentication state to the route tree.
- App shell → Research state: research state · Provides research state to pages and widgets.
- App shell → Auth page: routes · Maps route entry points to page views.
- App shell → Dashboard: routes · Maps route entry points to page views.
- App shell → Progress page: routes · Maps route entry points to page views.
- App shell → Results page: routes · Maps route entry points to page views.
- App shell → History page: routes · Maps route entry points to page views.
- App shell → Settings page: routes · Maps route entry points to page views.
- App shell → Reset page: routes · Maps route entry points to page views.
- App shell → Fallback: fallback · Handles unknown routes.
- Dashboard → Research form: start · Lets the user submit a research topic.
- Progress page → Progress tracker: status · Shows live workflow progress.
- Results page → Results view: report · Renders the final answer and sections.
- Results page → Sources view: sources · Shows citations and evidence.
- Results page → Preview view: draft · Surfaces intermediate or partial output.
- Results page → Perspectives view: analysis · Displays alternate viewpoints.
- Results page → Export actions: actions · Exports or shares the finished report.
- Results page → Feedback form: feedback · Collects post-result feedback.
- Dashboard → Header: chrome · Uses shared navigation and account header.
- History page → Header: chrome · Uses shared navigation and account header.
- Settings page → Header: chrome · Uses shared navigation and account header.
- Auth page → Header: chrome · Uses shared navigation and account header.
- Auth state → Supabase: auth · Reads and manages session state through Supabase.
- Research hook → API entry: API · Starts research jobs and fetches workflow state.
- Realtime hook → Supabase: realtime · Consumes live updates for running research.
- Realtime hook → API entry: status · Aligns UI progress with backend-managed job state.
- Research state → Research hook: orchestrate · Coordinates query submission and result lifecycle.
- Research state → Realtime hook: observe · Tracks live completion and stage changes.
- API entry → Research model: validate · Uses schemas for API and workflow payloads.
- API entry → Auth service: protect · Authenticates incoming requests.
- API entry → Workflow engine: run · Delegates research execution to the workflow engine.
- API entry → Database service: persist · Stores and retrieves research records.
- Workflow engine → Search service: discover · Collects web sources and evidence.
- Workflow engine → Gemini service: generate · Uses the LLM for synthesis and writing.
- Workflow engine → Content service: assemble · Builds the final report payload.
- Workflow engine → Database service: update · Emits progress and persists stage results.
- Auth service → Supabase: verify · Validates user identity through Supabase.
- Database service → Supabase: store · Persists research state, history, and updates.
- Search service → Supabase: optional state · May record source-related metadata or job state.
- Gemini service → Gemini: invoke · Calls the external model provider.
- Content service → Research model: shape · Formats output according to research schemas.
