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

create-sps-beas-template

v1.0.0

Published

Template generator for SPS projects (SAP, BEAS, Workers)

Downloads

43

Readme

create-sps-beas-template 🚀

Gerador de templates padrão para novos projetos integrados da SPS (SAP Business One + BEAS Manufacturing + Workers + Websockets).

Este gerador automatiza a criação de projetos base estruturados em um monorepo contendo uma API Hono (Backend), um painel Next.js (Frontend), orquestração via Docker Compose e Proxy Reverso Nginx pronto para VPNs e ambientes de datacenter.


🛠️ Tecnologias do Template

Backend (/backend)

  • Core: Node.js v20+, TypeScript, Hono API.
  • Database: PostgreSQL (via TypeORM) com migrações e persistência de dados.
  • SAP B1 & BEAS Integrations:
    • SpsSapAdapter: Conector direto SQL suporte a HANA e MSSQL com descriptografia de credenciais.
    • ServiceLayerAdapter: Cliente HTTP para SAP Service Layer com autoreconexão.
    • BeasServiceLayerAdapter: Cliente HTTP para BEAS Service Layer.
    • SapDocumentResolver: Resolutor de DocNum/DocEntry via OData.
  • Workers de Fila (Workers):
    • OutboxWorker: Processador de outbox transacional com lógica de retentativa (recursiveTries).
    • UdtSyncWorker: Sincronizador de buffer de tabelas customizadas (UDT) do SAP.
    • SyncWorker: Casca de cron pronto para sincronismo de staging/mirror.
  • Realtime: Servidor WebSocket (UpdateNotifier) integrado com heartbeat e broadcast de status.

Frontend (/frontend)

  • Core: Next.js (App Router), React 19, TypeScript.
  • Styling: Tailwind CSS v4.
  • Shared UI & Hooks: Componentes com controle de foco (FocusTrap), atalhos de teclado (GlobalHotkeys), redimensionamento de escala, seleções de tabela e carregamento.
  • Realtime: WebSocketProvider conectado ao worker de outbox exibindo alertas de integração ao vivo.
  • Painéis Base: Fluxo completo de Login (/auth) e Painel de Configurações de Conexão do SAP/BEAS (/settings).

Infraestrutura (/)

  • docker-compose.yml: Inicialização em container do Frontend, Backend, Banco PostgreSQL Alpine e Nginx.
  • nginx.conf: Proxy reverso unificando Frontend na raiz (/), API no /api, Swagger no /ui e websockets no /ws sob a mesma porta 80.

🚀 Como Usar o Gerador

Para gerar um novo projeto a partir deste template:

npx create-sps-beas-template

O CLI solicitará o nome do projeto (ex: sps-cliente-projeto), criará a estrutura limpa e deixará as pastas estruturadas.


💻 Como Executar o Projeto Gerado (Local)

  1. Configurar as Variáveis de Ambiente:

    • Copie o arquivo .env.example na raiz do projeto gerado e renomeie-o para .env.
    • Copie o arquivo backend/.env.example e renomeie-o para backend/.env (preenchendo as variáveis de desenvolvimento).
  2. Subir o ambiente multi-container: Execute o comando abaixo na raiz do projeto gerado:

    docker-compose up -d --build
  3. Acesso:

    • Frontend: http://localhost/
    • Swagger UI (Backend docs): http://localhost/ui
    • API / Health check: http://localhost/backend/

📦 Como Publicar Atualizações deste Gerador no NPM

Se você é o mantenedor deste pacote gerador e deseja publicar alterações:

  1. Incremente a versão do pacote em package.json (ou use o comando npm version <patch|minor|major>).
  2. Faça login na sua conta do NPM (caso não esteja logado):
    npm login
  3. Publique a nova versão no registro:
    npm publish
    (Caso utilize pacotes escopados privados/públicos da organização: npm publish --access public).