AlbinXXX / FlowForms

FormFlow is a dynamic form management and data collection platform.
https://www.figma.com/design/0h7EP6qnrSbjwL1p9IZDI1/FlowForm?m=auto&t=BPyFMOGmc3UA0MrF-1
Other
4 stars 5 forks source link

Create Dashboard Overview Page #89

Closed AlbinXXX closed 3 weeks ago

AlbinXXX commented 1 month ago

Design a dashboard page displaying project and form summaries.

AlbinXXX commented 3 weeks ago

@AnujChhikara, it would be fantastic if you could take on this task. The goal is to implement the frontend to match the design specified in the Figma dashboard precisely. I'll handle the backend integration once the frontend is set up.

For state management, please use either Redux or Zustand (with a preference for Zustand combined with React Query (ZWR)) to facilitate clean and efficient data handling. Additionally, please maintain an industry-standard folder structure to ensure scalability and organization throughout the project.

If you have any questions about the design requirements or structure, feel free to reach out. Thank you!

Folder Structure

my-app/
├── public/                   # Static assets, like index.html, favicon, etc.
├── src/                      # Source code
│   ├── assets/               # Images, icons, and other assets
│   ├── components/           # Reusable components
│   │   ├── ui/               # Shadcn UI components (e.g., Button, Card)
│   │   ├── layout/           # Layout components (e.g., Header, Footer)
│   │   ├── form/             # Form components (e.g., Input, FormField)
│   │   └── index.js          # Central export for components
│   ├── features/             # Feature-based folders for grouping components and logic
│   ├── hooks/                # Custom hooks (e.g., useUser)
│   ├── pages/                # Page components for routes
│   ├── services/             # API calls and external services (React Query)
│   ├── store/                # State management with ZWR (Zustand with React Query)
│   │   ├── useStore.js       # Core Zustand store configuration
│   │   ├── queries/          # React Query hooks and configurations
│   │   └── mutations/        # React Query mutations
│   ├── styles/               # Global styles and Tailwind configurations
│   │   ├── globals.css       # Global CSS (integrate Tailwind's base styles here)
│   │   ├── theme.css         # Custom ShadCN theme overrides
│   │   └── tailwind.css      # Tailwind CSS imports and configurations
│   ├── utils/                # Utility functions
│   ├── App.js                # Main app component
│   └── index.js              # Entry point
├── .env                      # Environment variables
├── tailwind.config.js        # Tailwind CSS configuration
├── postcss.config.js         # PostCSS configuration
├── package.json              # Project dependencies and scripts
└── README.md                 # Project overview
AnujChhikara commented 3 weeks ago

Okay @AlbinXXX can you share what kind of api response i will be getting. It will be super useful if we can list down all the api responses in a file like what data filed i can expect for user, form etc.

AlbinXXX commented 3 weeks ago

API Integration Guide for FlowForm

Overview

For now, focus on building the main UI. You don’t need to worry about backend integration just yet. The primary structure is simple:

This document provides sample API responses to give you an idea of what data will be available, so you can design the UI accordingly.


Sample API Responses

1. List of Projects

The API might return a list of available projects, each with a unique ID and basic details:

[
    {
        "id": "proj_123",
        "name": "Customer Feedback",
        "description": "Form for collecting customer feedback on products.",
        "created_at": "2024-01-15T10:30:00Z"
    },
    {
        "id": "proj_456",
        "name": "Newsletter Signup",
        "description": "Sign-up form for monthly newsletters.",
        "created_at": "2024-02-10T14:15:00Z"
    }
]

This allows the UI to display an overview of projects or forms with basic information for each.

2. Form Submissions

For form submissions within a project, the API might return a list like this:

[
    {
        "submission_id": "subm_001",
        "project_id": "proj_123",
        "submitted_at": "2024-03-12T12:45:00Z",
        "fields": {
            "name": "Alice Smith",
            "email": "alice@example.com",
            "feedback": "Great service, very satisfied!"
        }
    },
    {
        "submission_id": "subm_002",
        "project_id": "proj_123",
        "submitted_at": "2024-03-13T09:20:00Z",
        "fields": {
            "name": "Bob Brown",
            "email": "bob@example.com",
            "feedback": "Product arrived late, but good quality."
        }
    }
]

This structure includes each submission's ID, the related project ID, the submission date, and the form data. The UI can use this structure to present each submission’s details clearly.


Next Steps

  1. Focus on the UI: Start by designing core UI elements without backend integration. The goal is to create a visual and layout structure.

  2. API Structure Reference: Use the sample responses above to build the UI with future flexibility in mind, ensuring components can connect to the API.

  3. Final Integration: Once the UI is ready, we’ll connect the API and adapt any final parts as needed.

This approach allows us to work on each part separately, making development clearer and more efficient. Let me know if you’d like additional details on any API response or specific UI components.