Neopric-Inc / NeoApps.AI-CodeGenerator

World's first no-code low-code app builder focuses on a data-first approach, allowing users to create applications from scratch. The code generator builds a drag-and-drop React application along with a .NET Core API and a MySQL database.
https://neoapps.ai/
BSD 3-Clause "New" or "Revised" License
18 stars 6 forks source link

User-Defined Views with Parameter Configuration #12

Open NeoAppsAI opened 1 month ago

NeoAppsAI commented 1 month ago

Feature: Allow Users to Declare Custom Views with Parameter Configuration

Description:

Implement a feature that allows users to declare custom views they have created in the database, along with the ability to configure parameters for those views. This feature will enable users to store and manage view names and associated parameters, making it possible to dynamically select and execute views within frontend components. When using a component, users should be able to drag the component into place, select a stored view, and enter values for the incoming parameters required by the view. Tasks:

Backend: Create a new table (user_defined_views) to store information about custom views declared by the user. Fields should include: view_id (Primary Key) view_name (Name of the view) parameter_configuration (JSON or serialized data structure to store parameter names, types, and default values) created_by (User who declared the view) created_at (Timestamp of when the view was declared) Implement an API endpoint to allow users to declare a new view, including providing the view name and configuring parameters. Implement an API endpoint to fetch declared views and their parameter configurations for use in the frontend. Implement an API endpoint to execute a declared view with user-provided parameters, returning the result set. Frontend: Create a UI for users to declare custom views, including a form to enter the view name and configure parameters. Update the MasterReportComponent to support selecting a user-defined view from a dropdown or other selection method. Add a form to the MasterReportComponent that dynamically generates input fields based on the selected view's parameter configuration. Implement logic to send the user-provided parameters to the backend API, execute the selected view, and render the resulting data. Integration: Integrate the ability to drag and drop components in a visual editor, select a user-defined view, and bind it to the component. Ensure that the visual editor supports input binding for parameters, allowing users to connect component inputs with the required parameters of the selected view. Testing: Write unit tests for the backend API endpoints to validate view declaration, parameter configuration, and execution. Write frontend tests to ensure that the view selection, parameter input, and data rendering processes work correctly. Perform integration testing to ensure that the entire flow, from view declaration to execution and display, functions as intended. Expected Outcome:

Users will be able to declare custom database views and configure them with parameters. These views can then be selected and executed dynamically within the application, allowing for greater flexibility and customization. The feature will enhance the user's ability to create and display tailored reports and data visualizations directly within the application.