v1.1.0
HopFrame
A simple backend management api for ASP.NET Core Web APIs
Features
- Database management
- User authentication
- Permission management
- Frontend dashboards
Usage
There are two different versions of HopFrame, either the Web API version or the full Blazor web version.
Ho to use the Web API version
-
Add the HopFrame.Api library to your project:
dotnet add package HopFrame.Api -
Create a DbContext that inherits the
HopDbContextand add a data sourcepublic class DatabaseContext : HopDbContextBase { protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { base.OnConfiguring(optionsBuilder); optionsBuilder.UseSqlite("..."); } } -
Add the DbContext and HopFrame to your services
builder.Services.AddDbContext<DatabaseContext>(); builder.Services.AddHopFrame<DatabaseContext>();
How to use the Blazor API
-
Add the HopFrame.Web library to your project
dotnet add package HopFrame.Web -
Create a DbContext that inherits the
HopDbContextand add a data sourcepublic class DatabaseContext : HopDbContextBase { protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { base.OnConfiguring(optionsBuilder); optionsBuilder.UseSqlite("..."); } } -
Add the DbContext and HopFrame to your services
builder.Services.AddDbContext<DatabaseContext>(); builder.Services.AddHopFrame<DatabaseContext>(); -
Add the authentication middleware to your app
app.UseMiddleware<AuthMiddleware>(); -
Add the HopFrame pages to your Razor components
app.MapRazorComponents<App>() .AddHopFrameAdminPages() .AddInteractiveServerRenderMode();
Description
Languages
C#
81.4%
HTML
10.5%
CSS
6%
JavaScript
2.1%