mirror of
https://github.com/harivansh-afk/betterNAS.git
synced 2026-04-15 06:04:40 +00:00
Protect the control-plane API with explicit bearer auth, add node-scoped registration/heartbeat credentials, and make export mount paths an explicit contract field so mount profiles stay correct across runtimes. Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| openapi | ||
| schemas | ||
| src | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
@betternas/contracts
This package is the machine-readable source of truth for shared interfaces in betterNAS.
Use it to keep the four product parts aligned:
- NAS node
- control plane
- local device
- cloud/web layer
What belongs here
- OpenAPI source documents
- shared TypeScript types
- route constants
- JSON schemas for payloads we want to validate outside TypeScript
What does not belong here
- business logic
- per-service config
- implementation-specific helpers
Current contract layers
src/control-plane.ts- current runtime scaffold for health and version
src/foundation.ts- first product-level entities and route constants for node, mount, and cloud flows
openapi/- language-neutral source documents for future SDK generation
schemas/- JSON schema mirrors for the first shared entities
Change rules
- Shared API shape changes happen here first.
- If the boundary changes, also update
docs/architecture.md. - Prefer additive changes until all four parts are live.
- Do not put Nextcloud-only assumptions into the core contracts unless the field is explicitly part of the cloud adapter.
- Keep the first version narrow. Over-modeling early is another form of drift.