LogneBudo / MudRoles

MudBlazor Template dotnet new mudblazor --interactivity Auto --auth Individual --all-interactive, installed with Secure API based on roles
MIT License
12 stars 2 forks source link

Muddy Banner Image generated by Copilot and DALL-E 3.

MudRoles

Static Badge GitHub License GitHub repo size

MudBlazor Template: dotnet new mudblazor --interactivity Auto --auth Individual --all-interactive, installed with Secure API based on roles.

This project includes an API management interface.

API Management

Overview

MudRoles is a sample project demonstrating the use of Blazor with Identity and roles, integrated with MudBlazor for UI components. This project includes a Web API protected by role-based authorization and showcases how to access APIs based on roles. It also features API key management, rate limiting, and user secrets for secure configuration. The application includes dedicated pages explaining various setups:

Features

Prerequisites

Getting Started

Installation

  1. Clone the repository:
git clone https://github.com/LogneBudo/MudRoles.git
cd MudRoles
  1. Restore NuGet packages:
dotnet restore
  1. Update the database:

Api key database setup:

dotnet ef database update --context ApiKeyDbContext

Application database setup:

dotnet ef database update --context ApplicationDbContext

If you use the Package Manager Console:

Update-Database -Context ApiKeyDbContext
Update-Database -Context ApplicationDbContext

Configuration

  1. AppSettings: Ensure your appsettings.json is configured correctly for your database and authentication settings.

Running the Application

  1. Run the application:
dotnet run
  1. Open in browser: Navigate to https://localhost:[YourPortNumber] to see the application in action.

Project Structure

Roles and Authorization

Default Roles

Upon registration, new users are automatically assigned the "User" role. The "Admin" role must be assigned manually.

Useful Links

Additional Resources

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For any questions or feedback, please contact Djovani.