data-api-builder icon indicating copy to clipboard operation
data-api-builder copied to clipboard

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

Open JerryNixon opened this issue 2 years ago • 3 comments

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

  • Opportunity to build a stand alone full stack Blazor application with power of .NET and C#
  • Understand how to quickly turn any Azure Database into modern APIs (REST, GraphQL)
  • Integrate with an open source project to showcase impact

Type

1 Software Engineer

Feasibility

  • POC already implemented as part of internal hackathon so easy to kick off with a given baseline
  • Clear Goals achievable in a tight timeframe with opportunity for stretch goals

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.

JerryNixon avatar Aug 25 '23 00:08 JerryNixon

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.

thomasgauvin avatar Sep 29 '23 15:09 thomasgauvin

  • #1622
  • #1623

Aniruddh25 avatar Oct 17 '23 21:10 Aniruddh25

An alternative could be:

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

Each has pros and cons.

JerryNixon avatar Jun 15 '24 00:06 JerryNixon