# System Requirements (Spec Kit Baseline)

> For the complete documentation index, see [llms.txt](https://deploy-preview-472--lucky-concha-f3599f.netlify.app/llms.txt).

## Functional Requirements

*   [`SYS-FR-001`](https://deploy-preview-472--lucky-concha-f3599f.netlify.app/specs/baseline-uncontainerized-parity/system/system-requirements.md) The system SHALL start the baseline services in deterministic dependency order using explicit ports.
*   [`SYS-FR-002`](https://deploy-preview-472--lucky-concha-f3599f.netlify.app/specs/baseline-uncontainerized-parity/system/system-requirements.md) The UI SHALL load all accounts at startup through account-service and render them for selection.
*   [`SYS-FR-003`](https://deploy-preview-472--lucky-concha-f3599f.netlify.app/specs/baseline-uncontainerized-parity/system/system-requirements.md) The UI SHALL load initial trades and positions for a selected account via position-service.
*   [`SYS-FR-004`](https://deploy-preview-472--lucky-concha-f3599f.netlify.app/specs/baseline-uncontainerized-parity/system/system-requirements.md) The UI SHALL subscribe to trade-feed account topics and render incremental trade/position updates.
*   [`SYS-FR-005`](https://deploy-preview-472--lucky-concha-f3599f.netlify.app/specs/baseline-uncontainerized-parity/system/system-requirements.md) The system SHALL expose ticker lookup/list APIs through reference-data.
*   [`SYS-FR-006`](https://deploy-preview-472--lucky-concha-f3599f.netlify.app/specs/baseline-uncontainerized-parity/system/system-requirements.md) The trade-service SHALL validate account and ticker before publishing new trade orders.
*   [`SYS-FR-007`](https://deploy-preview-472--lucky-concha-f3599f.netlify.app/specs/baseline-uncontainerized-parity/system/system-requirements.md) The trade-processor SHALL persist trades, update trade state, and upsert positions in database.
*   [`SYS-FR-008`](https://deploy-preview-472--lucky-concha-f3599f.netlify.app/specs/baseline-uncontainerized-parity/system/system-requirements.md) The account-service SHALL support account create/update and account-user mapping operations.
*   [`SYS-FR-009`](https://deploy-preview-472--lucky-concha-f3599f.netlify.app/specs/baseline-uncontainerized-parity/system/system-requirements.md) The account-service SHALL validate users with people-service before persisting account-user mappings.
*   [`SYS-FR-010`](https://deploy-preview-472--lucky-concha-f3599f.netlify.app/specs/baseline-uncontainerized-parity/system/system-requirements.md) The system SHALL provide health/readiness endpoints used by startup and smoke checks.
*   [`SYS-FR-011`](https://deploy-preview-472--lucky-concha-f3599f.netlify.app/specs/baseline-uncontainerized-parity/system/system-requirements.md) The generated codebase SHALL preserve current baseline API/event contracts required for UI and service interoperability.
*   [`SYS-FR-012`](https://deploy-preview-472--lucky-concha-f3599f.netlify.app/specs/baseline-uncontainerized-parity/system/system-requirements.md) Submitting a valid trade through trade-service SHALL produce realtime account-scoped trade and position websocket updates consumable without page refresh.
*   [`SYS-FR-013`](https://deploy-preview-472--lucky-concha-f3599f.netlify.app/specs/baseline-uncontainerized-parity/system/system-requirements.md) The UI position blotter SHALL upsert realtime position updates by security key so existing rows are updated in place and duplicates are not created.
*   [`SYS-FR-014`](https://deploy-preview-472--lucky-concha-f3599f.netlify.app/specs/baseline-uncontainerized-parity/system/system-requirements.md) The UI SHALL provide an `All Accounts` selection that loads aggregated trades and merged positions across all known accounts.
*   [`SYS-FR-015`](https://deploy-preview-472--lucky-concha-f3599f.netlify.app/specs/baseline-uncontainerized-parity/system/system-requirements.md) In `All Accounts` mode, the UI SHALL disable trade-ticket creation and display explanatory guidance.
*   [`SYS-FR-016`](https://deploy-preview-472--lucky-concha-f3599f.netlify.app/specs/baseline-uncontainerized-parity/system/system-requirements.md) Security entry in trade ticket SHALL use typeahead matching by combined ticker/company label and disable browser autocomplete.
*   [`SYS-FR-017`](https://deploy-preview-472--lucky-concha-f3599f.netlify.app/specs/baseline-uncontainerized-parity/system/system-requirements.md) Account administration UI SHALL resolve usernames to people-service full names for account-user display with fallback to username on lookup failure.

## Non-Functional Requirements

*   [`SYS-NFR-001`](https://deploy-preview-472--lucky-concha-f3599f.netlify.app/specs/baseline-uncontainerized-parity/system/system-requirements.md) Baseline pre-ingress mode SHALL allow required cross-origin browser calls between UI and API ports.
*   [`SYS-NFR-002`](https://deploy-preview-472--lucky-concha-f3599f.netlify.app/specs/baseline-uncontainerized-parity/system/system-requirements.md) Baseline runtime ports SHALL remain stable and configurable through environment variables.
*   [`SYS-NFR-003`](https://deploy-preview-472--lucky-concha-f3599f.netlify.app/specs/baseline-uncontainerized-parity/system/system-requirements.md) Generated components SHALL be runnable on local developer workstations using language-native toolchains.
*   [`SYS-NFR-004`](https://deploy-preview-472--lucky-concha-f3599f.netlify.app/specs/baseline-uncontainerized-parity/system/system-requirements.md) The system SHALL provide deterministic smoke-testable startup and stop scripts.
*   [`SYS-NFR-005`](https://deploy-preview-472--lucky-concha-f3599f.netlify.app/specs/baseline-uncontainerized-parity/system/system-requirements.md) Requirements SHALL be traceable to user stories, acceptance criteria, generated components, and verification commands.
*   [`SYS-NFR-006`](https://deploy-preview-472--lucky-concha-f3599f.netlify.app/specs/baseline-uncontainerized-parity/system/system-requirements.md) Angular UI branding assets and FINOS/TraderX identity SHALL remain intact in baseline UI generation.
*   [`SYS-NFR-007`](https://deploy-preview-472--lucky-concha-f3599f.netlify.app/specs/baseline-uncontainerized-parity/system/system-requirements.md) Spec-first generation SHALL not require hydration from deleted legacy source trees.
*   [`SYS-NFR-008`](https://deploy-preview-472--lucky-concha-f3599f.netlify.app/specs/baseline-uncontainerized-parity/system/system-requirements.md) Trade and position blotters SHALL keep responsive readability through side-by-side layout with wrap and minimum pane width constraints.
*   [`SYS-NFR-009`](https://deploy-preview-472--lucky-concha-f3599f.netlify.app/specs/baseline-uncontainerized-parity/system/system-requirements.md) Dependency upgrade targets SHALL be declared in canonical repository artifacts before template or patchset version changes are accepted, and MUST propagate to all generated state releases. Template smoke checks SHALL run before top-level state generation, and generated-output/branch validation gates SHALL fail before merge or publish when target versions do not propagate.
*   [`SYS-NFR-010`](https://deploy-preview-472--lucky-concha-f3599f.netlify.app/specs/baseline-uncontainerized-parity/system/system-requirements.md) Generated states SHALL enforce a lifecycle script contract with distinct build/start/stop/readiness commands. Uncontainerized states SHALL provide `start --build-only`; containerized/Kubernetes states SHALL provide `--skip-build` or equivalent build/start separation mode.
