npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@seedgrid/fe-billing-platform

v2026.7.1

Published

[![npm version](https://img.shields.io/npm/v/%40seedgrid%2Ffe-billing-platform)](https://www.npmjs.com/package/@seedgrid/fe-billing-platform) [![npm downloads](https://img.shields.io/npm/dm/%40seedgrid%2Ffe-billing-platform)](https://www.npmjs.com/package

Downloads

211

Readme

@seedgrid/fe-billing-platform

npm version npm downloads TypeScript

Módulo front de billing da plataforma (backoffice de planos) do SeedGrid: cadastro de planos, faixas de preço (terms) com publicação/arquivamento e configuração do trial. É a visão de quem opera a plataforma — a visão do assinante fica no @seedgrid/fe-billing-user. Compõe sobre o motor de sessão do @seedgrid/fe-security.

Sumário

Funcionalidades

  • CRUD de planos — identidade (nome, código, descrição, ativo) e limiares de cota (upgrade prompt, warning, critical).
  • Faixas de preço (terms) — cada plano tem terms versionados: criar faixa agendada (effectiveFrom), publicar (com publicação automática no provedor de pagamento), arquivar e excluir; terms agendados aceitam PATCH.
  • Trial — leitura e edição da cota do trial (monthlyRequests).
  • i18n prontobillingPlatformMessages (en + pt-BR completos; es/fr/pt-PT com fallback).

O pacote exporta:

  • BillingPlatformPaths — contrato dos endpoints REST (/admin/plans, /admin/plans/trial, /admin/plans/{id}/terms, publish/archive por term).
  • DTOs client-safe: PlanEntry, PlanTermEntry, CreatePlanTermResponse etc. — conferidos contra o AdminPlanResource.java real.
  • billingPlatformMessages (i18n).
  • createBillingPlatformServer (em @seedgrid/fe-billing-platform/server, SERVER-ONLY) — engine tipado sobre a sessão do fe-security.

Telas entregues pelo scaffold

| Tela | Rota | O que faz | | --- | --- | --- | | Lista de planos | /platform/plans | Tabela (nome, código, preço vigente, status) com criar/editar/excluir | | Editor de plano | /platform/plans/new e /platform/plans/[publicId] | PlanEditor compartilhado: identidade do plano + limiares de cota | | Faixas de preço | dentro da edição do plano | TermsSection: lista os terms, cria faixa agendada e permite publicar / arquivar / excluir nos agendados | | Trial | /platform/plans/trial | Edita a cota mensal do trial |

O scaffold também traz as rotas-proxy de API (/api/platform/plans/**), o bootstrap de servidor (compondo createSecurityServer + createBillingPlatformServer) e a seção de navegação (useBillingPlatformAppShellSections), tudo wireado pelo SeedGrid CLI via module.json (id: "billing-platform", requires: ["security"]).

Permissões

Guardado pelo recurso CRUD PLAN (PLAN_READ, PLAN_CREATE, PLAN_UPDATE, PLAN_DELETE), mesma convenção do fe-security. No backend o AdminPlanResource é gateado por empresa-plataforma (@MonoCompany); a emissão das permissões PLAN_* fica com o seeding de roles.

Instalação

pnpm add @seedgrid/fe-billing-platform @seedgrid/fe-security @seedgrid/fe-core

Uso rápido

// server-only — compõe sobre a sessão do fe-security
import { createSecurityServer } from "@seedgrid/fe-security/server";
import { createBillingPlatformServer } from "@seedgrid/fe-billing-platform/server";

const session = createSecurityServer({ /* ... */ });
export const billingPlatform = createBillingPlatformServer(session);

// Em uma rota/action:
const planos = await billingPlatform.listPlans(); // PaginatedResult<PlanEntry>
const plano = await billingPlatform.getPlan(planId);
const criado = await billingPlatform.createTerm(planId, { /* CreatePlanTermRequest */ });
await billingPlatform.publishTerm(planId, termId);
const trial = await billingPlatform.getTrial();

Backend correspondente

AdminPlanResource do seedgrid-report-api (/admin/plans). Os DTOs e verbos foram conferidos contra o resource real (inclusive o PATCH de term agendado e a resposta de publicação automática no Stripe).

Suporte

  • Issues: https://github.com/SeedGrid/seedgrid-fe-components/issues
  • Repositório: https://github.com/SeedGrid/seedgrid-fe-components

Licença

MIT