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 🙏

© 2025 – Pkg Stats / Ryan Hefner

skailan-core

v6.0.0

Published

Servicio de autenticación y multitenancy para Skailan.

Readme

@skailan/core

Servicio de autenticación y multitenancy para la plataforma Skailan.

Descripción

Este módulo proporciona la funcionalidad base de autenticación, autorización y gestión de multitenancy para la plataforma Skailan. Incluye:

  • Autenticación de usuarios con JWT
  • Gestión de organizaciones y membresías
  • Sistema de permisos y roles
  • Multitenancy con esquemas de base de datos separados
  • Gestión de productos y pagos

Instalación

npm install @skailan/core

Uso

Importación básica

import { app } from '@skailan/core';

// El servidor se inicia automáticamente
app.listen(3006, () => {
  console.log('Core service running on port 3006');
});

Configuración de variables de entorno

DATABASE_URL="postgresql://user:password@localhost:5432/skailan"
JWT_SECRET="your-jwt-secret"
RESEND_API_KEY="your-resend-api-key"

API Endpoints

Autenticación

  • POST /auth/login - Iniciar sesión
  • POST /auth/register - Registrar usuario
  • POST /auth/forgot-password - Solicitar restablecimiento de contraseña
  • POST /auth/reset-password - Restablecer contraseña

Organizaciones

  • GET /organizations - Listar organizaciones
  • POST /organizations - Crear organización
  • GET /organizations/:id - Obtener organización
  • PUT /organizations/:id - Actualizar organización

Membresías

  • GET /memberships - Listar membresías
  • POST /memberships - Crear membresía
  • GET /memberships/:id - Obtener membresía

Características

  • Multitenancy: Cada organización tiene su propio esquema de base de datos
  • Autenticación JWT: Tokens seguros para autenticación
  • Gestión de permisos: Sistema de roles y permisos granular
  • Migraciones automáticas: Migraciones de esquemas por tenant
  • Validación de datos: Validación robusta de entrada

Dependencias

  • Express.js para el servidor web
  • Prisma para ORM y migraciones
  • JWT para autenticación
  • bcryptjs para hash de contraseñas
  • Resend para envío de emails

Desarrollo

# Instalar dependencias
npm install

# Ejecutar en modo desarrollo
npm run dev

# Construir para producción
npm run build

# Generar cliente Prisma
npm run prisma:generate

# Ejecutar migraciones
npm run prisma:migrate

Licencia

MIT