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

gate-stack-cli

v1.0.6

Published

Gate CLI wrapper for git (gate clone/init/push/pull/status)

Readme

GateStack

Backend agora padronizado em NestJS + Prisma + PostgreSQL + Zod + BullMQ/Redis, com observabilidade em Pino + Prometheus + Grafana e infra com Docker + Nginx.

QUEUE_ENABLED e QUEUE_WORKER_ENABLED ficam desabilitados por padrao em ambiente local (fail-open) para evitar falha da API quando Redis estiver indisponivel ou com credencial incorreta.

Stack

  • Backend: NestJS (TypeScript)
  • ORM: Prisma
  • Banco: PostgreSQL
  • Filas: BullMQ + Redis
  • Validação: Zod
  • Logging: Pino (nestjs-pino)
  • Métricas: Prometheus (/metrics)
  • Dashboard: Grafana
  • Dev tools: tsx, ESLint, Prettier
  • Testes: Jest + Playwright

Backend local

npm --prefix backend install
npm --prefix backend run prisma:generate
npm --prefix backend run dev

API principal:

  • POST /api/auth/login
  • GET /health
  • GET /api/releases
  • POST /api/releases
  • POST /api/releases/:releaseId/publish
  • POST /api/releases/:releaseId/rollback
  • GET /metrics (protegido por token)

Infra completa (Docker)

docker compose up --build

Serviços:

  • Backend: http://localhost:5000
  • Nginx (reverse proxy): http://localhost
  • PostgreSQL: localhost:5432
  • Redis: localhost:6379
  • Prometheus: http://localhost:9090
  • Grafana: http://localhost:3001

Grafana já sobe com:

  • datasource Prometheus provisionado automaticamente
  • dashboard GateStack Overview provisionado automaticamente

Segurança aplicada

  • JWT + RBAC (admin, writer, reader)
  • hardening com helmet
  • rate limiting global com @nestjs/throttler
  • endpoint /metrics protegido por METRICS_TOKEN
  • Snyk com bloqueio por severidade alta no CI
  • Prometheus configurado para enviar token bearer em infra/prometheus/prometheus.yml

Prisma

npm --prefix backend run prisma:migrate:dev
npm --prefix backend run prisma:generate
npm --prefix backend run prisma:migrate:deploy
npm --prefix backend run prisma:seed

Login inicial:

  • usa ADMIN_EMAIL e ADMIN_PASSWORD configurados no ambiente
  • usuário admin é criado/atualizado automaticamente no bootstrap

Qualidade

npm --prefix backend run lint
npm --prefix backend run type-check
npm --prefix backend run test
npm --prefix backend run test:e2e

CLI gate (alias para git)

Use gate clone em vez de git clone apontando para o Git HTTP do backend.

  1. Dê permissão de execução ao wrapper:
    chmod +x scripts/gate
  2. Adicione scripts/ ao PATH ou chame direto:
    scripts/gate clone http://localhost:5000/git/<slug>
  3. Você pode usar só o slug; o host vem de GATE_HOST (default http://localhost:5000):
    GATE_HOST=https://gatestack.local scripts/gate clone meu-projeto

Comandos suportados:

  • gate clone <slug|url> [dir] (transforma slug em <GATE_HOST>/git/<slug>)
  • gate init, gate pull, gate push, gate status
  • qualquer outro comando git funciona: gate checkout -b feature/x

Variáveis:

  • GATE_HOST: base do Git HTTP.
  • GIT_BIN: caminho do binário git (default git).