| Author ✏️ | Ko Ko Maung |
| Version 🔐 | v1.0 |
| Date 🚀 | 2025-10-14 |
➕
| Tech | ASP .NET Core | MS SQL | Entity Framework | Dapper | Automapper | Microsoft.Bcl.Cryptography | OpenApi | Serilog |
| Design | Onion Architecture | |||||||
-
The Dynamic Menu Generator is designed to automatically create and manage system menus based on relational database structures and defined user interface components. This document outlines the specifications, flow, and data design used to generate and display menus.
-
The system provides a dynamic approach to menu management by retrieving data from pre-defined database tables. It supports flexible updates, user-level customization, and automatic menu hierarchy generation.
-
The process begins with retrieving menu metadata from the database tables. The system then analyzes the relationships and dependencies among menu items to construct a hierarchical structure. The generated menu is rendered dynamically on the user interface based on user roles and permissions.
Simplified flow:1. Fetch menu data → 2. Build hierarchy → 3. Apply user access filters → 4. Display on UI
-
Menus are generated through the analysis of database relationships between parent and child tables. Each record in the menu table corresponds to a menu item, which can reference a parent ID for nesting. The system reads these relationships and constructs the corresponding user interface structure.
-
- After a user successfully logs in, the Web UI sends a request to the API to validate the user's credentials.
- Upon successful authentication, the API responds with detailed user information, a JWT access token, and a refresh token.
- The Web UI stores the JWT token securely in a cookie using Microsoft.AspNetCore.Authentication.
- Subsequent API requests from the Web UI include the JWT token retrieved from the cookie to authorize and access protected resources.



