Closes #3 ## Summary - enforce `currentPeriodEnd` as a hard access boundary for generation requests - transition elapsed `active` and `past_due` subscriptions to `expired` during runtime reads - stop showing active-cycle quota for non-active subscriptions and document the current lifecycle behavior - add DB tests for post-expiry generation rejection and expired account-view normalization ## Testing - built `infra/docker/web.Dockerfile` - ran `pnpm --filter @nproxy/db test` inside the built container - verified `@nproxy/db build` and `@nproxy/web build` during the image build Co-authored-by: sirily <sirily@git.shararam.party> Reviewed-on: #19
packages/db
Database package for nproxy.
Implemented in this iteration
- Prisma package scaffold
- Current Prisma schema for persisted state
- Shared schema path export for runtime tooling
Current scope
- Users and subscription state
- Manual crypto invoices
- Generation requests and provider-key attempts
- Usage ledger
- Provider keys, optional proxies, and auditable state events
- Telegram pairing and admin allowlist
- Admin audit log