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

buscalogo-server

v1.0.0

Published

Web-based content collection & analysis server with scraping, P2P search, and PouchDB

Readme

BuscaLogo Server

Servidor web de coleta e análise de conteúdo com scraping, busca P2P e PouchDB.

Instalação

# Global
npm install -g buscalogo-server

# Comandos: bls ou buscalogo-server
bls
# ou: npx bls

Uso Rápido

# 1. Configurar ambiente
cp .env.example .env
# Edite .env com suas configurações

# 2. Iniciar
bls
# ou: npx bls

Servidor em http://localhost:3005 (ou PORT no .env).

A pasta db/ é criada automaticamente em process.cwd()/db. Com npx ou instalação global, defina POUCHDB_PATH no .env para escolher outro diretório (ex: persistir fora do cache npm).

Características

  • PouchDB – Banco local com sincronização
  • Scraping – Coleta web com fila e progresso em tempo real
  • Interface – Dashboard com Tailwind CSS
  • WebSocket – Comunicação em tempo real
  • P2P – Comunicação entre instâncias

Scripts

| Script | Descrição | |--------|-----------| | npm start | Inicia servidor | | npm run start:daemon | Inicia em segundo plano (detached) | | npm run dev | Desenvolvimento com hot-reload | | npm run build | Build CSS + JS | | npm run build:prod | Build otimizado (executado antes do publish) |

Segundo plano (daemon)

# Via flag (global ou npx)
bls -d
# ou: npx bls --daemon

# Via npm (no projeto)
npm run start:daemon

# Via PM2 (produção)
npm install -g pm2
pm2 start ecosystem.config.cjs
pm2 save && pm2 startup

Estrutura

├── server.js          # Entry point
├── src/
│   ├── routes/        # API e web
│   ├── services/      # PouchDB, scraping, P2P, auth
│   ├── views/         # Templates EJS
│   └── middleware/
└── public/            # CSS, JS estáticos

API

Bancos

  • GET/POST /api/databases – Listar/criar
  • DELETE /api/databases/:name – Remover
  • POST /api/databases/:name/connect-remote – Conectar remoto
  • POST /api/databases/:local/sync/:remote – Sincronizar

Scraping

  • GET/POST /api/scraping/tasks – Listar/criar tarefas
  • GET/DELETE /api/scraping/tasks/:id – Status/cancelar

Documentos

  • GET/POST /api/databases/:db/docs – Listar/adicionar
  • PUT/DELETE /api/databases/:db/docs/:id – Atualizar/remover

Variáveis de Ambiente

PORT=3005
NODE_ENV=development
POUCHDB_ADAPTER=memory
POUCHDB_PREFIX=buscalogo_
POUCHDB_PATH=/caminho/absoluto    # Persistência (recomendado com npx/global)
MAX_CONCURRENT_SCRAPING=3
DEFAULT_TIMEOUT=30000
SESSION_SECRET=change-me-in-production
P2P_SIGNALING_URLS=ws://localhost:3001

Pré-requisitos

  • Node.js 18+

Licença

MIT – LICENSE