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

blackcoffee2

v2.1.2

Published

A app server built with Insitu Framework

Readme

☕ BlackCoffee v2.1.x - App Server

Version Insitu Framework Node.js License Progress


🎯 ¿Qué es BlackCoffee?

BlackCoffee es un Application Server construido con Insitu Framework que permite:

  • Deploy de múltiples aplicaciones en el mismo servidor
  • Aislamiento lógico por aplicación (/app-name/version/)
  • Configuración externa sin modificar el código base
  • Auto-deploy al iniciar el servidor
  • Hot Reload de aplicaciones y bases de datos
  • Database Pools centralizados (SQLite, MariaDB, MySQL, Memory)
  • CLI completa para gestión de aplicaciones
  • UI Web para administración (Dashboard, Deploy, Database Pools)

🚀 Quick Start

# Instalar dependencias
npm install

# Iniciar servidor (HTTPS por defecto, puerto 9791)
node server.js

# Acceder al servidor
https://localhost:9791

# Admin Console Web
https://localhost:9791/admin

# Admin Console TCP
telnet 127.0.0.1 9999

Endpoints Disponibles

| Método | Endpoint | Descripción | |--------|----------|-------------| | GET | / | Landing page del servidor | | GET | /api/health | Health check | | GET | /admin | Admin Console Web | | GET | /admin/database | Database Pools Manager | | GET | /test/1.0.0/ | Test App (ejemplo) | | GET | /mvc-demo/1.0.0/ | MVC Demo (ejemplo) | | GET | /users-app/1.0.0/ | Users App (DB + CRUD) |


📁 Estructura del Proyecto

blackcoffee/
├── server.js                    # Entry point
├── core/
│   ├── appLoader.js             # Cargador de aplicaciones
│   ├── hotReload.js             # Hot Reload Manager
│   └── databasePoolManager.js   # Database Pool Manager
├── includes/
│   ├── appHooks.js              # Hooks para apps
│   ├── routeLoader.js           # Cargador de rutas
│   └── adminExtension.js        # Consola administrativa
├── cli/
│   └── commands/
│       ├── app.js               # Comandos de apps
│       ├── db.js                # Comandos de DB
│       └── config.js            # Comandos de config
├── controllers/
│   └── admin/
│       ├── AdminController.js   # Admin API
│       └── DatabaseAdminController.js  # Database API
├── public/
│   └── admin/
│       ├── index.html           # Dashboard
│       ├── database.html        # Database Pools UI
│       ├── css/
│       └── js/
├── config/
│   ├── server.json              # Configuración
│   └── database.json            # Database Pools
├── apps/                        # Aplicaciones desplegadas
│   └── {app-name}/{version}/
│       ├── package.json
│       ├── controllers/
│       ├── models/
│       ├── views/
│       ├── routes/
│       └── public/
├── routes/                      # Rutas declarativas
│   └── static.json
├── programatically/
│   └── PRoutes.js               # Rutas del núcleo
├── bin/
│   └── blackcoffee              # CLI
└── certs/                       # Certificados SSL

🛠️ CLI Commands

Aplicaciones

blackcoffee app:deploy ./mi-app-1.0.0.tar.gz   # Desplegar app
blackcoffee app:list                           # Listar apps
blackcoffee app:status <app> [version]         # Ver estado
blackcoffee app:restart <app> [version]        # Reiniciar
blackcoffee app:undeploy <app> [version]       # Eliminar
blackcoffee app:logs <app> [--tail=100]        # Ver logs
blackcoffee app:create <nombre>                # Crear template

Base de Datos

blackcoffee db:pool:create <nombre> <tipo>     # Crear pool
blackcoffee db:pool:list                       # Listar pools
blackcoffee db:pool:remove <nombre>            # Eliminar pool
blackcoffee db:pool:connect <nombre>           # Conectar
blackcoffee db:pool:disconnect <nombre>        # Desconectar
blackcoffee db:pool:stats                      # Estadísticas

Configuración

blackcoffee config:list                        # Listar config
blackcoffee config:get <key>                   # Obtener valor
blackcoffee config:set <key> <value>           # Establecer

Servidor

blackcoffee server:status                      # Estado
blackcoffee server:restart                     # Reiniciar
blackcoffee server:logs --tail=50              # Ver logs

🗄️ Database Pools

Configurar (config/database.json)

{
  "pools": {
    "default": {
      "type": "sqlite",
      "filename": "data/myapp.sqlite"
    },
    "production": {
      "type": "mariadb",
      "host": "localhost",
      "port": 3306,
      "user": "root",
      "password": "secret",
      "database": "myapp_prod",
      "connectionLimit": 10
    },
    "cache": {
      "type": "memory"
    }
  }
}

Hot Reload

Los cambios en config/database.json se aplican automáticamente sin reiniciar.


🌐 Admin Console Web

Dashboard (/admin)

  • 📊 Estadísticas en tiempo real
  • 📦 Lista de aplicaciones
  • 🚀 Deploy drag & drop
  • ⚙️ Configuración

Database Pools (/admin/database)

  • ➕ Crear pools
  • 🔌 Conectar/desconectar
  • 🗑️ Eliminar pools
  • 📊 Estadísticas

📊 API Endpoints

Admin

| Método | Endpoint | Descripción | |--------|----------|-------------| | GET | /api/admin/apps | Listar aplicaciones | | GET | /api/admin/apps/:name/:version | Info de app | | POST | /api/admin/apps/deploy | Deploy | | DELETE | /api/admin/apps/:name/:version | Undeploy | | POST | /api/admin/apps/:name/:version/restart | Restart | | GET | /api/admin/stats | Estadísticas | | GET | /api/admin/config | Configuración |

Database

| Método | Endpoint | Descripción | |--------|----------|-------------| | GET | /api/admin/database/pools | Listar pools | | POST | /api/admin/database/pools | Crear pool | | DELETE | /api/admin/database/pools/:name | Eliminar pool | | POST | /api/admin/database/pools/:name/connect | Conectar | | POST | /api/admin/database/pools/:name/disconnect | Desconectar |


📦 Roadmap

| Fase | Estado | Descripción | |------|--------|-------------| | Fase 0 | ✅ | Base Estable | | Fase 1 | ✅ | App Server Core | | Fase 2 | ✅ | CLI | | Fase 3 | ✅ | UI Web | | Fase 4 | ✅ | Hot Reload | | Fase 5 | ✅ | Database Integration | | Fase 6 | ⏳ | Advanced Features | | Fase 7 | ⏳ | Production Hardening |

Progreso: 71% (5/7 fases completadas)


🔗 Enlaces


BlackCoffee v2.0.0 - Construido con Insitu Framework v1.3.0