4.3 KiB
4.3 KiB
NuQloud Implementation Matrix
This maps product requirements to concrete implementation surfaces.
1. System surfaces
nextcloud/custom_apps/*:- admin/user UI - (maybe only admins can control backups? - Users just aware of features? - determine best path.)
- settings persistence
- mode-specific UX
services/qortal-oidc-broker/*:- OIDC broker
- provisioning bridge
- internal auth/cors enforcement
external-authintegration:- session lifecycle
- wallet/approval flow
- request transport semantics
scripts/*+deploy/*:- install/recreate automation
- runtime env defaults
docs/*:- admin/operator documentation
- claims and terminology consistency
2. Feature matrix
| Feature | Nextcloud App | Broker | External Auth | Scripts/Deploy | Docs |
|---|---|---|---|---|---|
SC_MODE switch |
Add admin mode toggle + UI conditionals | Expose mode-aware metadata endpoint (optional) | N/A | Set default in install scripts | Mode guide |
| NuQloud naming in powered mode | Replace labels/copy strings via mode map | N/A | N/A | N/A | Language policy |
| Full Qortal mode parity | Keep existing components behind flags | Keep existing routes stable | Existing | N/A | Full mode guide |
| OIDC identity provider | OIDC app setup + mappings | Maintain issuer/jwks/token/userinfo | Session-backed qortal requests | Env scaffolding | OIDC setup doc |
| Internal broker token auth | Send header from app | Enforce token middleware | N/A | Generate + export token | Security docs |
| Session auto-refresh | Handle retries in app UI | Recover session on 401 | Provide session endpoint | Ensure env values set | Troubleshooting |
| Approval policy UX | Mode-aware modal/settings | N/A | Permission endpoints | N/A | User/admin docs |
| NuQloud backups | Admin controls + status UI | Backup orchestration endpoint(s) | Request handlers | Schedule defaults | Backup docs |
| Replication guarantees | Status dashboard + alerts | Status aggregation API | (if involved) | Tier/env template | Package docs |
| Credits abstraction | Show credits not QORT in powered | Optional metering API | N/A | Tier defaults | Pricing docs |
| QORT request queue | User request + admin actions | Optional notify API | Transaction call path | N/A | Ops guide |
| Debug mode isolation | Admin-only toggle + warning | Optional debug endpoint gating | N/A | Disable in prod templates | Debug policy |
3. Flag-to-storage mapping
| Flag family | Source of truth | Mirror target |
|---|---|---|
| UI/mode flags | Nextcloud app config | Optional runtime cache |
| Security runtime (token/cors) | .env* |
broker process env |
| External-auth node settings | .env* + admin sync |
external-auth runtime |
| Package/tier limits | Nextcloud app config (or control plane DB) | broker/app runtime |
4. Data model additions (proposed)
sc_mode:- enum:
powered,full_qortal
- enum:
sc_flags:- JSON object of booleans/limits
sc_credit_ledger:id,tenant,event_type,delta,balance_after,metadata,created_at
sc_replication_status:tenant,target_replicas,healthy_replicas,last_verified_at,state
sc_backup_proofs:backup_id,proof_hash,published_at,integrity_state
5. Cross-cutting constraints
- No breaking changes to existing OIDC mapping behavior.
- Existing full-qortal flows must remain available when
SC_MODE=full_qortal. - Powered mode must hide direct wallet semantics in UI strings.
- Runtime scripts must fail fast when required security env is missing.
6. Test matrix (minimum)
- Mode switch regression:
powered -> full_qortal -> powered
- OIDC auth:
- new user invite flow
- existing mapped user flow
- Backup:
- create backup proof
- verify restore preview
- Replication:
- healthy state
- degraded state
- Security:
- direct broker API call without token fails
- with token succeeds
7. Migration and compatibility
- Existing installs default to
full_qortalon first upgrade. - New installs default to
powered. - Add migration command to seed flags with safe defaults.
- Keep reversible mapping for terminology and settings.
8. Billing architecture companion
Detailed billing/credits implementation spec:
docs/product/pricing-packages-v1.mddocs/engineering/billing-architecture-v1.md