mirror of
https://github.com/azaion/admin.git
synced 2026-06-21 16:41:09 +00:00
3a925b9b0f
- Deleted the `POST /resources/get/{dataFolder?}` and `GET /resources/get-installer` endpoints as part of the architectural shift towards simplified resource management.
- Removed associated methods and configurations, including `ResourcesService.GetEncryptedResource`, `ResourcesService.GetInstaller`, and related properties in `ResourcesConfig`.
- Cleaned up environment variables and configuration files to reflect the removal of installer-related settings.
- Eliminated the `GetResourceRequest` DTO and its validator, along with the `WrongResourceName` error code.
- Updated documentation to clarify the changes in resource handling and the retirement of per-user file encryption.
Co-authored-by: Cursor <cursoragent@cursor.com>
6.3 KiB
6.3 KiB
Module Layout
Language: csharp
Layout Convention: solution-flat (legacy — pre-src/ convention)
Root: ./ (csproj folders sit at workspace root)
Last Updated: 2026-05-13
Layout Rules
- This admin/ workspace is one deployable (the
Azaion.AdminApiHTTP service) split across three production csproj projects + one e2e test csproj:Azaion.AdminApi,Azaion.Services,Azaion.Common,e2e/Azaion.E2E. (TheAzaion.Testunit-test project was removed in cycle 2 once its only test class —SecurityTest.cs— was deleted along with the encrypted-download stack; no in-process unit tests remain.) - Existing task specs (
_docs/02_tasks/*/AZ-*.md) all useComponent: Admin APIas a single coarse identifier covering this entire workspace. The Per-Component Mapping below honors that convention rather than rewriting every task spec. - The conceptual sub-components documented in
_docs/02_document/components/01_data_layer..05_admin_api/are read-time documentation aids, not write-time ownership boundaries. They are listed under "Conceptual Sub-Components" below for reference only. - Public API surface = the namespaces / interfaces exposed across csproj boundaries (
I*Serviceinterfaces inAzaion.Services, request DTOs inAzaion.Common/Requests/, entities inAzaion.Common/Entities/). - Tests live in
e2e/Azaion.E2E/(HTTP black-box). Production code never imports from there.
Per-Component Mapping
Component: Admin API
- Epic: AZ-181 (and any other admin-API epic, e.g. AZ-509 for the Detection Classes feature)
- Directory: workspace root (multi-csproj, see below)
- Owns (exclusive write during implementation):
Azaion.AdminApi/**Azaion.Services/**Azaion.Common/**e2e/Azaion.E2E/**(xUnit/HttpClient-based black-box tests)e2e/db-init/**(test-DB seed/init scripts consumed by the e2e harness)docker-compose.test.yml
- Public API (visible to other csprojs within the workspace):
Azaion.Services/I*Service.csinterfaces (UserService, AuthService, ResourcesService, …)Azaion.Services/Security.cs,Azaion.Services/Cache.cs(used byAzaion.AdminApi/Program.cs)Azaion.Common/Requests/*request DTOsAzaion.Common/Entities/*linq2db entitiesAzaion.Common/Database/*IDbFactory+ connection helpersAzaion.Common/Configs/*strongly-typed config recordsAzaion.Common/Extensions/*extension methodsAzaion.Common/BusinessException.csAzaion.AdminApi/Program.cs(composition root + minimal-API endpoints)Azaion.AdminApi/BusinessExceptionHandler.cs
- Internal (do NOT import across csproj boundaries):
- private/internal members within each csproj (default C# visibility rules apply)
Azaion.AdminApi/appsettings*.json(loaded by the host, not imported)e2e/Azaion.E2E/Helpers/*(test-only helpers, never imported by production)
- Imports from: (none — this is the only deployable in the workspace; the Loader is architecturally retired per
suite/_docs/_repo-config.yamlunresolved:loader-retirement-arch-doc) - Consumed by: HTTP clients (UI workspace, edge services on secured Jetson, SaaS browser sessions) — out of process
Conceptual Sub-Components (documentation only — NOT ownership boundaries)
These come from _docs/02_document/components/ and exist for reading the codebase, not for assigning task ownership. A single task may legitimately touch multiple sub-components within the Admin API umbrella.
| # | Sub-component | Primary file locations |
|---|---|---|
| 1 | Data Layer | Azaion.Common/Database/, Azaion.Common/Configs/, Azaion.Common/Entities/ (incl. DetectionClass.cs added cycle 1; Resource.cs added then removed in same cycle — see post-cycle-1 revert) |
| 2 | User Management | Azaion.Services/UserService.cs (incl. RegisterDevice added cycle 1 / AZ-196 — calls RegisterUser end-to-end after security-audit consolidation, finding F-3), Azaion.Common/Requests/Register{User,DeviceResponse}.cs, LoginRequest.cs, SetUserQueueOffsetsRequest.cs |
| 3 | Auth & Security | Azaion.Services/AuthService.cs, Azaion.Services/Security.cs (post-cycle-2 — only ToHash remains; GetApiEncryptionKey / EncryptTo / DecryptTo removed with the encrypted-download endpoint), Azaion.Services/Cache.cs |
| 4 | Resource Management | Azaion.Services/ResourcesService.cs (GetResourceRequest.cs removed in cycle 2 with POST /resources/get; SetHWRequest.cs removed by AZ-197; ResourceUpdateService.cs + GetUpdateRequest.cs + PublishResourceRequest.cs removed when AZ-183 was reverted) |
| 4b | Detection Classes | Azaion.Services/DetectionClassService.cs + Azaion.Common/Requests/{Create,Update}DetectionClassRequest.cs (added cycle 1 / AZ-513) |
| 5 | Admin API (HTTP) | Azaion.AdminApi/Program.cs, Azaion.AdminApi/BusinessExceptionHandler.cs, Azaion.AdminApi/appsettings*.json |
Allowed Dependencies (csproj layering)
| Layer | csproj | May reference |
|---|---|---|
| 4. Entry / Host | Azaion.AdminApi |
Azaion.Services, Azaion.Common |
| 3. Application | Azaion.Services |
Azaion.Common |
| 2. Foundation | Azaion.Common |
(none) |
| —. Tests (out-of-process e2e) | e2e/Azaion.E2E |
(none from production csprojs — HTTP only) |
A reference from a lower production layer to a higher production layer is an Architecture finding (High severity) in /code-review Phase 7. Test projects may reference any production csproj; production csprojs may NOT reference test projects.
Layout Conventions (reference)
| Language | Root | Per-component path | Public API file | Test path |
|---|---|---|---|---|
| C# (.NET) | ./ (this workspace, legacy flat layout) |
./<Csproj>/ |
namespace-root types in each csproj | e2e/Azaion.E2E/ |
Notes
- This file was authored 2026-05-13 by
/autodevStep 10 to satisfy/implementStep 4. The_docs/artifact set predates the Step 1.5 module-layout addition, so this is a backfill rather than a fresh decompose Step 1.5 run. - If the project later splits into multiple deployables (e.g. carving out
Azaion.AnnotationsApi), re-run/decomposeStep 1.5 to produce a finer-grained mapping.