Skip to content

[Solution]: Developing an Deep Research Workspace #159

Description

@kstij1

1. Solution Overview: Deep Research Workspace

The Deep Research Workspace makes rigorous analysis practical. Powered by AI, it turns open-ended questions into curated source lists, structured notes, and citation-backed reports that fit Weam’s UX. Teams can run multi-step research, refine sections iteratively, and export polished findings—all inside the Weam ecosystem.

Rather than a single-shot summary, this solution enables iterative work. Users curate sources, regenerate sections as understanding evolves, and maintain traceable links back to originals. The end result is a readable, citation-backed report (Markdown/PDF) that teams can share, review, and refine—ideal for market analysis, technical evaluations, or policy briefs.

Plan, gather, and synthesize multi-source research.

Key features:

  • Multi-step web research (search, crawl, dedupe, rank)
  • Source board with notes and tagging
  • Outline builder and report generator
  • Export report (Markdown/PDF)
  • Seamless Weam auth/session integration

2. Tech Stack & Framework Standards

Frontend

  • Next.js + Weam theme components

Backend

  • Node.js / Express.js for search/crawl/summarize
  • Optional Python microservices via /pyapi/

Database

  • MongoDB with naming:
    solution_{solutionName}_{tableName}
    
    Example: solution_research_projects

3. Database Connection

Local:

MONGODB_URI=mongodb://localhost:27017/weam

Cloud:

DB_HOST=db.weam.ai
DB_USERNAME=yourUser
DB_PASSWORD=yourPass

4. Theming & UI Consistency

Use Weam’s design system for layouts, colors, and typography.


5. Authentication & Access Control

Require Weam auth; if unauthenticated, return 404. Use ironSession in Next.js.


6. Session Management

Persist user and companyId in project documents:

{
  "query": "Impact of LLMs on support ops",
  "user": { "id": "123", "email": "john@domain.com" },
  "companyId": "weam_company_456"
}

7. Sidebar Integration

src/seeders/superSolution.json:

{
  "name": "Research",
  "path": "/research",
  "icon": "ResearchIcon",
  "description": "Long-form research with sources and reports"
}

8. Deployment & Routing

Base path:

NEXT_PUBLIC_API_BASE_PATH="/research"

Examples:

Page: https://os.weam.ai/research
API:  https://os.weam.ai/research/api/run

9. NGINX Configuration

# Deep Research Workspace
location /research/ {
    proxy_pass http://localhost:3013/research/;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
}

10. Final Checklist

✅ Next.js frontend
✅ Node/Express APIs
✅ Mongo naming convention
user + companyId stored
✅ Theming matches Weam
✅ Auth (404 if missing)
✅ ironSession used
✅ Sidebar entry added
✅ Base path env set
✅ NGINX updated


11. Example Workflow

  1. User opens Research in Weam; enters a research question.
  2. System gathers ≥10 sources (metadata + summaries).
  3. User curates sources, adds notes, builds outline.
  4. Backend generates a report with citations.
  5. Export Markdown/PDF; data stored in solution_research_projects.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions