# EasyTemplate.Blazor.Web - Simple Blazor Backend Management System Template

#### Introduction
A lightweight backend system framework built with Blazor Server, featuring an integrated frontend-backend architecture (monolithic design).
Key objectives of this repository:
1.  Maximize simplicity by minimizing architectural layers and complex invocations
2.  Demonstrate complete workflow for Ant Design-based development on Blazor Server
3.  Enable single-developer implementation of management systems

#### Tech Stack
.NET 8 + Ant Design + Blazor Server + SqlSugar

#### Installation Guide
1.  Database Setup (Currently MySQL-only), Modify ConnectionString in EasyTemplate.Tool/Configuration/DataBase.json
2.  Set EasyTemplate.Blazor.Web as the startup project and run
3.  Adjust login expiration time via App:ExpiredTime in EasyTemplate.Tool/Configuration/App.json

#### Project Structure
1.  EasyTemplate.Blazor.Web: Main entry point with UI components and pages
2.  EasyTemplate.Service: Provides API services using dynamic controller for automatic generation, To access Swagger JSON: Append /swagger/all/swagger.json to base URL
3.  EasyTemplate.Tool: Contains: Configuration files (Configuration/); Entity classes (Entity/); Utilities (Util/)

#### Core Features
1.  Basic user-role-menu-department relationships (single role per user)
2.  Custom page authorization (non-Blazor native AuthorizeView/[Authorize])
3.  JWT-based API authentication (see EasyTemplate.Service/Common/BaseFilter)

#### Database Setup
1.  Uses SqlSugar's code-first approach (auto-generates tables from entities)
2.  Enable initialization via InitDatabase method in EasyTemplate.Tool/Util/Sql.cs
Note: Disable initialization if existing database schema exists

#### Component Reference
Ant Design Blazor Documentation: https://antblazor.com/zh-CN