Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

feat(payments): subscription data model and plan settings

Cerrado
#848 0 comentarios 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 1 día

@Priyanshubhartistm ya está trabajando en esto.

Desde el 16/10/2026.

  • #849 de @Priyanshubhartistm — abierto

Evaluación

Este issue todavía no se ha evaluado.

Descripción

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.
Lenguaje dominante
TypeScript
Estrellas
829
Forks
234
Merge medio
17 h 46 min
PR fusionados (30 d)
73

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de cameri/nostream

Todos los issues de cameri/nostream

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.