input-output-hk / catalyst-voices

🎙️ Catalyst Voices provides a unified experience and platform including production-ready liquid democracy, meaningful collaboration opportunities & data-driven context for better onboarding & decisions.
https://input-output-hk.github.io/catalyst-voices/
Apache License 2.0
26 stars 8 forks source link

🛠️ [TASK] : Design Architecture Solution for Campaign/Proposal Builder #1146

Open minikin opened 1 week ago

minikin commented 1 week ago

Summary:

To architect a dynamic UI system that uses a backend-defined JSON structure to generate the Proposal Editor and Campaign Builder interfaces within a Flutter application. The system must prioritize flexibility and ensure that UI components are rendered in the exact order specified in the JSON, as the sequence can dynamically change.

Core Requirements

Backend Specifications

JSON Structure Guidelines

Example JSON Structure

{
  "sidebar": {
    "sections": [
      {
        "label": "Proposal Setup",
        "items": [
          { "label": "Title", "type": "topic" },
          { "label": "Proposal Summary", "type": "topic" },
          { "label": "Public Description", "type": "topic" }
        ]
      },
      {
        "label": "Tasks",
        "items": [
          { "label": "Task 1", "type": "task" },
          { "label": "Task 2", "type": "task" }
        ]
      }
    ]
  },
  "mainContent": {
    "tabs": [
      {
        "label": "Proposal Setup",
        "components": [
          {
            "type": "CollapsiblePanel",
            "title": "Detail Category Brief",
            "content": {
              "type": "TextInput",
              "placeholder": "Enter brief...",
              "maxLength": 250
            },
            "actions": [
              { "type": "Button", "label": "Save", "action": "saveCategoryBrief" }
            ]
          },
          {
            "type": "CollapsiblePanel",
            "title": "Proposal Summary",
            "sections": [
              {
                "type": "TextInput",
                "label": "Problem Statement",
                "maxLength": 300
              },
              {
                "type": "TextInput",
                "label": "Solution Statement",
                "maxLength": 300
              }
            ]
          },
          {
            "type": "RichContent",
            "title": "Hint Text - Topic 1234",
            "imageUrl": "https://example.com/image.jpg",
            "text": "Legend Text About Amethyst The Great Smith"
          }
        ]
      }
    ]
  },
  "rightSidebar": {
    "tabs": [
      { "label": "Guidance", "content": "Guidance text or tips" },
      { "label": "Comments", "content": "Comments section for collaboration" },
      { "label": "Actions", "content": "Additional actions or tools" }
    ]
  }
}

Frontend (Flutter) Specifications

Key Considerations

Deliverables

Additional Resources