platformplatform / PlatformPlatform

🚀 Pre-alpha state. A platform designed for building enterprise-grade, multi-tenant products using Azure, .NET, React, TypeScript, Infrastructure as Code, etc.
https://platformplatform.github.io
MIT License
226 stars 24 forks source link

Add new BackOffice self-contained system #465

Closed tjementum closed 3 months ago

tjementum commented 3 months ago

Summary & Motivation

This pull request adds a new BackOffice self-contained system and serves as a guide for creating new self-contained systems in PlatformPlatform.

Add new BackOffice self-contained system using a copy of AccountManagement, retaining only the core structure and conventions. All endpoints, domain entities, commands, queries, etc. have been removed. The WebApp has been stripped similarly, but some duplicated design system components will need centralization later.

Add back-office/WebApp workspace to the global package.json and eslint.workingDirectories in .vscode/settings.json. These settings in the mono repository must be updated when creating a new self-contained system.

Add a new back-office-api cluster routes to AppGateway YARP configuration listening on ports 9200, and configure SPA and API routes. Each self-contained system runs on a different port, with the main AppGateway on 90xx, Account Management on 91xx, and BackOffice on 92xx.

Add BackOffice database, blob storage, API, SPA, and worker to Aspire AppHost, serving up the new BackOffice Dependencies dependencies locally.

Change the basename of the BackOffice SPA to /back-office. This is the path where the self-contained system is hosted. Update CDN_URL in BackOffice infrastructure for frontend bundles to match the SPA path.

Grant BackOfficeManagedIdentity permissions to the SQL Database to ensure the infrastructure for deploying the BackOffice SCS includes the necessary access.

Create a GitHub workflow for building and deploying the BackOffice self-contained system. This new workflow, copied from Account Management SCS, deploys BackOffice to production.

Update README with information about the BackOffice self-contained system and revamp the Application section in the mono repository to describe how multiple SCSs work together.

Checklist

sonarcloud[bot] commented 3 months ago

Quality Gate Failed Quality Gate failed

Failed conditions
51.8% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud