Skip to content

Overview

Create a top-level system design specifying interfaces, dependencies, and interactions between the layers of the system and what Apps, Components, and Resources support the Item Image Upload use cases.

The following documents are informative background. They are not binding on this system design — decisions made here may diverge from prior work.

#ActorDescriptionRepository
1UserHuman accessing the system through a modern web browser
2SPABrowser single-page application (React)arda-frontend-app
3BFFNext.js server application (Backend-for-Frontend pattern)arda-frontend-app
4BackendBusiness services (REST APIs). Main component: operations. Shared library: common-module.operations, common-module
5AWS ResourcesS3, CloudFront, and other cloud resources. Treated as a black box in scenario definitions; specific resources identified in the actor document.infrastructure

The referenced repositories do not contain any capabilities related to this feature yet.

Arrows point from the actor that initiates interactions or has advance knowledge of the other’s interface.

PlantUML diagram

Decisions made during the system design session. Recorded in the Project Decision Log under the “System Design” section.

IdTopicDecision
TD-01Fetch-and-store for external URLsSPA-side. When a user provides an external HTTPS URL, the SPA fetches the image, renders it in the editor for crop/zoom/rotate, then uploads via the managed presigned-upload path. No server-side fetch.
TD-02URL reachability checkSPA with BFF fallback. The SPA attempts the reachability and content-type validation directly. If CORS blocks the request, the BFF proxies the HEAD (or full GET) against the external URL. The BFF never checks URLs on our own storage — those are known-good.
TD-03Presigned credential generationBackend (Operations). Operations generates presigned POST credentials. The BFF proxies the request, adding auth headers and tenant context.
TD-04Copyright acknowledgmentSPA-only. The upload itself is evidence of acceptance. No backend logging of the acknowledgment. Further recording is a follow-up improvement if needed.
TD-05Backend URL validationTightened. With fetch-and-store, all persisted image URLs originate from managed storage. The backend validates that provided URLs match the expected CDN host and key pattern. External URLs are never persisted directly.
TD-06Direct payload transferClient-to-storage. Pure file payload uploads go directly from the SPA to S3 using presigned credentials. The BFF and backend are not in the data path for file bytes — they only broker credentials and persist metadata.
TD-07AWS resources abstractionBlack box in scenarios. Sequence diagrams reference “Storage” as a single participant. Specific AWS resources (S3 buckets, CloudFront distributions, IAM roles) are identified in module identification only.

Documents are organized into system-level pages and per-actor pages. Each actor page consolidates the actor’s requirements, interfaces, state, and modules into a single document.

FileContent
index.mdThis page — goal, references, sub-systems, dependency diagram, decisions, scenario inventory, conventions.
design.mdStructural design — sub-system responsibilities, information ownership, dependency diagram, write/read path data flows, shared interface contracts (object key convention, presigned POST, CDN access control). Read first for technical context.
requirements.mdFR-NNN (functional) and NFR-NNN (non-functional) requirements derived from references. Each requirement must be verifiable by an independent agent once the system is built. Includes traceability links to source use cases. Also contains User behavioral assumptions.
scenarios.mdSequence diagrams (PlantUML) with narrative for each in-scope use case. Happy path focus; error paths in narrative. Traceability to use case IDs and design decisions.
oam-requirements.mdOperations, Administration, and Maintenance requirements following the FCAPS model: Fault, Configuration, Performance, Security, and Accounting Management.
risks-and-assumptions.mdRisks, obstacles, and assumptions the design makes, including pre-existing data migration concerns. Items may be out of scope for implementation but must be recorded for project-level tracking.
phasing.mdRecommended implementation phasing based on capability dependencies identified in the design. Final phasing decision is a separate deliverable outside this session.

Each sub-system document contains four sections: Requirements (functional and non-functional), Interfaces (API contracts and component interfaces), State (information the sub-system maintains), and Modules (modules to develop or modify). All sections include traceability links to scenarios, requirements, and decisions. See design.md for the structural overview.

FileSub-SystemNotes
spa-specification.mdSPA (React)Input detection, editor, upload orchestration, CDN rendering.
bff-specification.mdBFF (Next.js)API proxy, URL reachability check, cookie signing, auth enrichment.
backend-specification.mdBackend (Operations / common-module)Presigned credential generation, entity persistence, URL validation.
aws-specification.mdStorage (AWS Resources)Specific resource identification (S3 buckets, CloudFront, IAM). Black box in scenarios; detailed here.

Based on the Scoping document, the following scenarios require sequence diagrams. Scenarios that share the same system interactions at the actor level (e.g., different SPA viewing modes that require no BFF/backend differentiation) are consolidated into a single scenario.

ScenarioUse Cases CoveredNotes
S1: Upload Image (Managed Path)GEN::MEDIA::0001::0001.UC, 0002.FS (file/drag-drop/clipboard), 0003.FS (formats/limits), 0005.FS (preview/crop), 0006.FS (confirm/persist)Primary scenario. Covers: SPA validates → BFF proxies upload-url request → Backend generates presigned credentials → SPA uploads to Storage → SPA persists entity via BFF/Backend.
S2: Set Image from External URLGEN::MEDIA::0001::0002.FS (URL text entry), 0004.FS (URL validation)Fetch-and-store variant. SPA sends URL to BFF for reachability check → BFF validates → SPA fetches image → SPA renders in editor → then follows S1 upload path.
S3: Remove ImageGEN::MEDIA::0002::0001.UCSPA confirms with user → updates entity via BFF/Backend with null image reference.
S4: View Image (Read Path)GEN::MEDIA::0003::0001.UC (grid thumbnail), 0002.FS (hover quick inspection), 0003.FS (fallback/error)Single scenario: SPA retrieves entity with image URL → renders from CDN via signed cookies. Hover popover for quick inspection. Error/fallback handling is SPA-internal.
S5: Grid Inline EditGEN::MEDIA::0001::0007.FSOwn scenario. Entry point differs (grid cell edit trigger). References S1 for upload mechanics. Highlights that system uses existing entity data as the “current image” source.
S6: Set Image During Item CreationREF::ITM::0003::0010.UCItem-specific. Image upload interleaved with item creation. References S1 for upload mechanics.
S7: Change/Remove Image During Item EditREF::ITM::0004::0006.UCItem-specific. Combines S1 (change) or S3 (remove) within the item edit flow.
  • Diagrams: PlantUML per PlantUML Guide. Validate all diagrams before committing.
  • Document format: Per Design Document template and Authoring Guide.
  • Decision traceability: New decisions recorded in the Project Decision Log under a “System Design” section with TD-NN identifiers. All deliverables include traceability links back to the source use cases, requirements, and decisions that inform them.
  • DRY principle: Scenarios that share system-level interactions reference the primary scenario rather than repeating details. Actor documents reference scenarios by ID rather than duplicating sequence descriptions.
  • Links: Use .md extension on all internal links per documentation site conventions.

Copyright: (c) Arda Systems 2025-2026, All rights reserved