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

neko-defense-unified-gateway

v1.0.0

Published

🐾 Unified API Gateway for Neko Defense Microservices - Six-personality orchestration system integrating forensic intelligence, worker defense, frame generation, and legal RAG systems

Downloads

28

Readme

🐾✨ Neko Defense Unified API Gateway ✨🐾

Version: 1.0.0 Six-Personality Collaborative API Gateway


πŸ“– Overview

The Neko Defense Unified API Gateway is a professional NestJS microservice that provides a single entry point for all Neko Defense ecosystem services. Built with RULE 5 compliance (modules for orchestration only, services for external interactions), this gateway integrates four published microservices into a cohesive, unified API.


🎯 Integrated Microservices

1. πŸ”¬ Forensic Intelligence (Port 3002)

  • Package: neko-forensic-intelligence
  • Purpose: Six-personality collaborative forensic analysis
  • Features: ISO compliance, chain of custody, multi-hash verification

2. βš–οΈ Worker Defense RAG (Port 3004)

  • Package: chilean-worker-defense-rag
  • Purpose: Chilean worker rights protection via RAG
  • Features: Legal precedent search, 9 case types, Spanish localization

3. 🎬 Frame Generator (Port 3000)

  • Package: neko-video-frame-generator
  • Purpose: Educational video frame generation
  • Features: RULE 44 compliant frames, kawaii emojis, 11 graphics types

4. πŸ“š Chilean Law RAG (Port 3001)

  • Package: chilean-law-rag-nestjs
  • Purpose: Chilean legal code queries
  • Features: Vector search, Spanish queries, article citations

πŸš€ Quick Start

Installation

# Install from NPM
npm install neko-defense-unified-gateway

# Or clone repository
git clone https://github.com/JavierCollipal/neko-defense-unified-gateway.git
cd neko-defense-unified-gateway
npm install

Configuration

Create .env file:

# API Gateway
PORT=3100
NODE_ENV=development

# JWT Authentication
JWT_SECRET=your-secret-key
JWT_EXPIRES_IN=24h

# Microservice URLs
FORENSIC_SERVICE_URL=http://localhost:3002
WORKER_DEFENSE_SERVICE_URL=http://localhost:3004
FRAME_GENERATOR_SERVICE_URL=http://localhost:3000
LAW_RAG_SERVICE_URL=http://localhost:3001

# MongoDB (for logging)
MONGODB_URI=mongodb+srv://username:[email protected]/neko-defense-system

# Rate Limiting
RATE_LIMIT_TTL=60
RATE_LIMIT_MAX=100

Start Gateway

# Development
npm run start:dev

# Production
npm run build
npm run start:prod

Gateway runs on http://localhost:3100 Swagger docs at http://localhost:3100/api


πŸ“‘ API Endpoints

Gateway Information

GET /
# Get gateway information and integrated services

Health Monitoring

GET /health
# Check gateway health

GET /health/services
# Check all microservices health status

Forensic Intelligence

POST /forensic/investigate
# Start comprehensive forensic investigation

GET /forensic/investigate/:id
# Get investigation report by ID

Worker Defense RAG

POST /worker-defense/intake
# Submit Chilean worker rights case

GET /worker-defense/cases/:id
# Get case details and analysis

Frame Generator

POST /frames/generate
# Generate single educational video frame

POST /frames/generate-batch
# Generate multiple frames in batch

Chilean Law RAG

GET /legal/query?q=despido%20injustificado
# Query Chilean legal codes

GET /legal/codes
# List available legal codes

🎭 Six-Personality System

Each integrated microservice benefits from six-personality collaborative analysis:

  • 🐾 NEKO-ARC: Technical architecture & API design
  • 🎭 MARIO: Workflow orchestration
  • πŸ—‘οΈ NOEL: Validation & precision testing
  • 🎸 GLAM: Spanish content & worker advocacy
  • 🧠 HANNIBAL: Forensic analysis
  • 🧠 TETORA: Multi-perspective synthesis

πŸ—οΈ Architecture (RULE 5 Compliant)

src/
β”œβ”€β”€ main.ts                    # NestJS entry point
β”œβ”€β”€ app.module.ts              # Root module (orchestration)
β”œβ”€β”€ gateway/
β”‚   β”œβ”€β”€ gateway.module.ts      # Gateway module (orchestration ONLY)
β”‚   β”œβ”€β”€ gateway.controller.ts  # REST API endpoints
β”‚   └── gateway.service.ts     # Service (external interactions)
└── health/
    β”œβ”€β”€ health.module.ts       # Health module (orchestration ONLY)
    β”œβ”€β”€ health.controller.ts   # Health endpoints
    └── health.service.ts      # Service (external interactions)

πŸ”’ Security Features

  • βœ… Rate Limiting: Configurable request throttling
  • βœ… Input Validation: class-validator for all DTOs
  • βœ… CORS: Configurable cross-origin resource sharing
  • βœ… JWT Ready: Authentication infrastructure (optional)
  • βœ… Error Handling: Graceful error propagation from microservices

πŸ“Š Testing

# Unit tests
npm run test

# Test with coverage
npm run test:cov

# E2E tests
npm run test:e2e

🌍 NPM Publishing

This package is published to NPM following RULE 48:

  • Repository: PRIVATE
  • NPM Package: PUBLIC
  • Install: npm install neko-defense-unified-gateway

πŸ“¦ Dependencies

  • @nestjs/common: ^10.0.0
  • @nestjs/core: ^10.0.0
  • @nestjs/swagger: ^7.0.0
  • @nestjs/axios: ^3.0.0
  • @nestjs/throttler: ^5.0.0

🎯 Use Cases

1. Unified API for All Services

Single endpoint for forensic investigations, worker defense cases, frame generation, and legal queries.

2. Health Monitoring

Monitor status of all integrated microservices from one location.

3. Rate Limiting & Security

Centralized rate limiting and security policies for all services.

4. Microservice Orchestration

Coordinate multi-service workflows (e.g., forensic evidence β†’ worker defense case).


πŸ”— Related Packages


πŸ“„ License

MIT


🐾 Created By

Six-Personality Collaborative System

  • 🐾 NEKO-ARC - Technical Architecture
  • 🎭 MARIO - Workflow Orchestration
  • πŸ—‘οΈ NOEL - Testing & Validation
  • 🎸 GLAM - Spanish Content & Worker Rights
  • 🧠 HANNIBAL - Forensic Analysis
  • 🧠 TETORA - Multi-Perspective Synthesis

Generated with Claude Code 🐾✨

Co-Authored-By: Claude [email protected]