Sign inSign up

[Open Source] A free runtime API interface creation project released under the MIT open-source license.

Open SourceAPI & Testing
2026-06-28 05:20 2 views • 0 downloads 0KB
[Open Source] A free runtime API interface creation project released under the MIT open-source license.

1. Project Overview

ReZero

The only project on the entire internet that provides a free API for creating runtime interfaces, along with automatically generated API documentation. Truly supports runtime creation of [Low-Code] [Online Table Creation] [Online API Creation] [Online API Documentation Generation] [Online API Testing] [Hot Swapping] [Super API] [Cloud ORM Framework] [Cloud API] [Zero].

2. Open Source License

Licensed under MIT

3. Screenshots

A .NET middleware that enables CRUD operations without writing any code. It can also be published as a standalone EXE for use by non-.NET users.

Image

View the APIs after creation.

Image

4. Feature Overview

Create API interfaces, API documentation, and perform API debugging online using an online database and table creation interface.

5. Tech Stack

1. Tutorial for Non-.NET Users

Run the application by downloading the EXE.

2. Tutorial for .NET Users

2.1 Install via NuGet

Rezero.Api

2.2 Configure with One Line of Code

Create a new .NET 6+ WEB API project and simply inject one line of code to use Rezero API.

/***No impact on existing code***/

// Register: Register Super API services
builder.Services.AddReZeroServices(api =>
{
    // Enable Super API
    api.EnableSuperApi();// Uses SQLite by default; overloads are available for database configuration

});
// Simply add this line before builder.Build
var app = builder.Build();

2.3 Using ReZero

Start the project and visit the following URL directly: [http://localhost:5267/rezero](http://localhost:5267/rezero)

Image

2.4 JWT Authorization

// Register: Register Super API services
builder.Services.AddReZeroServices(api =>
{
    // Enable Super API
    api.EnableSuperApi(new SuperAPIOptions()
    {
        InterfaceOptions = new InterfaceOptions()
        {

            // Description of AuthorizationLocalStorageName:
            //localStorage["jwt"]="token";
            // If localStorage["jwt"] contains a token, all API requests from the local HTML page will include the token.
            // Generally used when the frontend and backend share the same port and domain.
            // For cross-port or cross-domain scenarios, see the configuration method in Section 4.5.
            AuthorizationLocalStorageName = "jwt",

            // Authorization interceptor
            SuperApiAop = new JwtAop()
        }
    }); ;

});
public class JwtAop : DefaultSuperApiAop
{
    public async override Task OnExecutingAsync(InterfaceContext aopContext)
    {

         // Note: Add token=xxx to the HTML page URL to enable JWT authorization for internal API requests as well.
         var authenticateResult = await aopContext.HttpContext.AuthenticateAsync(JwtBearerDefaults.AuthenticationScheme);
         if (!authenticateResult.Succeeded)
         {
             throw new Expception("Unauthorized");
         }
        await base.OnExecutingAsync(aopContext);
    }
    public async override Task OnExecutedAsync(InterfaceContext aopContext)
    {
        await base.OnExecutedAsync(aopContext);
    }
    public async override Task OnErrorAsync(InterfaceContext aopContext)
    {
        await base.OnErrorAsync(aopContext);
    }
}

2.5 Integration into Your Own System

Simply add model=small to the URL to hide the header menu and left-side menu.

Add token=xxx to the HTML page URL to enable JWT authorization for internal API requests as well.

Image

See the screenshot below for the results.

Image

#1
资源直链https://gitee.com/DotNetNext/ReZero
Download