Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

feat(payments): subscription data model and plan settings

Aperta
#848 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@Priyanshubhartistm ci sta già lavorando.

Dal 16/10/2026.

  • #849 di @Priyanshubhartistm — aperta

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

enhancement

Is your feature request related to a problem? Please describe.
Admission is a one-time boolean (users.is_admitted). There is nowhere to record a paid period, a plan, or when access ends, so recurring billing and tiered access (#673) cannot be built. This is the first, behaviour-neutral step.

Describe the solution you'd like

  • A user_subscriptions table (pubkey, plan id, status, period start/end, grace end, cancel-at-period-end) and the invoices columns plan_id, period_start, period_end, via a migration. A subscription is keyed by pubkey, so no separate subscription id is needed.
  • payments.subscriptionPlans[] in settings (id, price, interval, grace period, per-plan limits), with types, defaults (empty list), validation in validateSettings, and CONFIGURATION.md docs.
  • IUserSubscriptionRepository (find by pubkey, upsert, list due for renewal/expiry) and the invoice repository/Invoice type changes, with unit tests.
  • The migration grandfathers every existing is_admitted user onto a non-expiring plan so enabling plans later never locks anyone out.
  • No change to runtime behaviour: with no plans configured the relay behaves exactly as today.

Additional context

  • Design: #673. Earlier groundwork for the same layer.
Lingua principale
TypeScript
Stelle
829
Fork
234
Merge medio
22h 43m
PR unite (30g)
52

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di cameri/nostream

Tutte le issue di cameri/nostream

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.