69 lines
4.1 KiB
Markdown
69 lines
4.1 KiB
Markdown
# Business Overview
|
|
|
|
## Business Context Diagram
|
|
|
|
```
|
|
+--------------------------------------------------+
|
|
| SlpModularCms Platform |
|
|
| |
|
|
| +-----------+ +-----------+ +-----------+ |
|
|
| | Identity | | CMS | |Availability| |
|
|
| | Module | | Module | | Module | |
|
|
| | (Auth + | | (Content | | (System | |
|
|
| | Users) | | Mgmt) | | Status) | |
|
|
| +-----------+ +-----------+ +-----------+ |
|
|
| |
|
|
| +-------------------------------------------+ |
|
|
| | Core / Shell | |
|
|
| | (Domain entities, DbContext, Module I/F) | |
|
|
| +-------------------------------------------+ |
|
|
+--------------------------------------------------+
|
|
| |
|
|
v v
|
|
[Admin Frontend] [External Clients]
|
|
(React SPA) (API consumers)
|
|
```
|
|
|
|
## Business Description
|
|
|
|
- **Business Description**: SlpModularCms is a modular Content Management System (CMS) platform. It provides a REST API backend for managing CMS content, users, and system availability. The platform uses role-based access control (Owner, Admin, User) and supports a modular plugin architecture so that features can be added as independent modules.
|
|
- **Business Transactions**:
|
|
- **User Authentication**: Login with email/password, receive JWT access + refresh token pair; refresh tokens for continued sessions; revoke tokens on logout.
|
|
- **System Initialization**: First-time setup — create initial Owner account before normal operations can begin.
|
|
- **User Invitation**: Admins and Owners invite new users by email; new users complete their account setup via an invitation link.
|
|
- **System Availability Management**: Owners can update the system availability status (Available / Maintenance / Unavailable); anyone can query current status.
|
|
- **CMS Content Management**: (Planned — module structure is in place but CMS-specific content modules are not yet implemented.)
|
|
- **Business Dictionary**:
|
|
- **Owner**: Highest-privilege role; can manage users, modules, and system availability.
|
|
- **Admin**: Can manage users and CMS content within their scope.
|
|
- **User**: Standard access; can use CMS features but cannot manage system settings.
|
|
- **Module**: An independently deployable feature unit that integrates into the CMS shell.
|
|
- **Invitation**: A time-limited token sent to a new user allowing them to create their account.
|
|
- **Availability Status**: Available | Maintenance | Unavailable — represents the operational state of the system.
|
|
|
|
## Component Level Business Descriptions
|
|
|
|
### SlpModularCms.Api
|
|
- **Purpose**: ASP.NET Core Web API host — the entry point for all HTTP requests.
|
|
- **Responsibilities**: Bootstraps the application, registers modules, configures middleware (auth, CORS, Swagger), exposes REST endpoints.
|
|
|
|
### SlpModularCms.Core
|
|
- **Purpose**: Shared domain core — entities, DbContext, interfaces, services, and migrations.
|
|
- **Responsibilities**: Defines domain entities (ApplicationUser, ApplicationRole, Invitation, RefreshToken, GlobalAvailabilityState), persistence (EF Core + SQL Server), and shared service contracts.
|
|
|
|
### SlpModularCms.Modules.Identity
|
|
- **Purpose**: Authentication and user management module.
|
|
- **Responsibilities**: Implements AuthController (login/refresh/revoke), SetupController (initial owner creation), UsersController (invite, complete-setup, validate-invitation).
|
|
|
|
### SlpModularCms.Modules.Availability
|
|
- **Purpose**: System availability / health status module.
|
|
- **Responsibilities**: Implements AvailabilityController (get status, update status), caches status in-memory with circuit breaker, persists status changes to the database.
|
|
|
|
### SlpModularCms.Core.Tests
|
|
- **Purpose**: Unit tests for the Core layer.
|
|
- **Responsibilities**: Tests for exception classes, invitation service logic, identity services.
|
|
|
|
### SlpModularCms.Modules.Availability.Tests
|
|
- **Purpose**: Unit/integration tests for the Availability module.
|
|
- **Responsibilities**: Tests for availability service logic and controller behavior.
|