Azure / data-api-builder

Data API builder provides modern REST and GraphQL endpoints to your Azure Databases and on-prem stores.
https://aka.ms/dab/docs
MIT License
821 stars 158 forks source link

RFC: Data API builder (DAB) JSON Configuration UI Editor in C# Blazor #1654

Open JerryNixon opened 11 months ago

JerryNixon commented 11 months ago

Summary

Develop a UI editor that helps creates, modify and publish the dab-config.json file used for bootstrapping Data API builder.

Motivation

The dab-config.json file is getting more and more complex. This project aims to ease creation of this comprehensive JSON configuration file, and to help developers adopt Data API builder for their Data API on Azure SQL DB, MySQL, SQL Server, Cosmos DB, and PostgreSQL. Today, it can be edited by hand, or CLI, but with this project - it can be done via a rich UI to help developers understand the settings and set them accurately.

Description

Build the C# Blazor app which will be hosted inside the Data API builder engine for a design time experience to help developers accelerate their solutions.

Old behavior

Edit the dab-config.json in a json editor by hand or CLI.

New behavior

Create & edit the dab-config.json file in a guided UI.

Hosted UI already in Data API builder

Data API builder already hosts several UI to enhance the developer experience.

  1. https://localhost:5001/swagger is the REST testbed.
  2. https://localhost:5001/api/openapi is the REST schema.
  3. https://localhost:5001/graphql is the GraphQL testbed.

New, hosted UI for configuring the dab-config.json file.

Data API builder will add a UI to continue enhancing the developer experience.

  1. https://localhost:5001/configuration is the DAB configurator.

Business Value

The configuration file is very complex. A friendly UI will help simplify adoption and improve the developer experience. As a result, they will be using a tool that promotes Azure SQL, SQL Server, and other Azure databases.

Pillar

Developer Experience

Enjoyable

Type

1 Software Engineer

Feasibility

Questions

How does the developer access the configurator? Run dab start then navigate to http://localhost:5001/configuration

What if there is no dab-config.json? It's allowed. DAB will start without errors or any endpoints.

What happens when the configurator saves changes? Until hot-reload is enabled, the runtime will restart. Hot-reload is not a dependency.

Is the configurator limited to development environment? Yes. This is for developers. This is not currently a production feature.

Does the runtime pass the path of dab-config.json or the config content to the UI? The path. It will be important that the path be passed and the UI read/write on its own.

Does the configurator have security? No. The configurator is a developer feature in the development environment without security.

Is the configurator intended to replace the CLI? No. The CLI is important to invoke the runtime. Though the CLI's role to build dab-config.json may change.

Does the configurator integrate in Azure portal? No. There is no plan to do this. The configurator is for the development environment.

thomasgauvin commented 10 months ago

Hi Jerry, thanks for putting this together. This is an important feature for Static Web Apps as well, given that we have worked closely with DAB in order to build our the Database connections feature. Here are a few changes I propose:

  1. Instead of /config, could we make it the default page of the root (ie http://localhost:5001)? Considering that we do not use the root path and that this is a main page for the development experience, it could be more easily accessible if it is accessed from the root.
  2. The configurator should be included with DAB, with no additional installs/tools necessary. It should be available with Development mode, but not Production mode.

I have some screenshots I could attach to this RFC as well, let me know if we are ready to make those public or are awaiting approvals.

Aniruddh25 commented 9 months ago
JerryNixon commented 1 month ago

An alternative could be:

  1. VS Code DAB extension
  2. Visual Studio extension
  3. SSMS extension
  4. ADS extension

Each has pros and cons.