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

@rivtor/kernel

v1.0.1

Published

Production-ready authentication, payments, and compliance kernel for B2B SaaS

Downloads

81

Readme

@rivtor/kernel

npm version License: MIT

Production-ready authentication, payments, and compliance kernel for B2B SaaS applications.

Overview

@rivtor/kernel is a proprietary governance kernel that automates the hardest parts of EU software compliance:

  • Authentication - Secure Supabase auth wrapper with pre-built components
  • Payments & VAT - Stripe integration with EU VAT validation (VIES)
  • Legal Compliance - GDPR-compliant legal components and data export
  • GDPR Deletion - Cascading deletion engine with external API cleanup
  • Accessibility - WCAG 2.1 AA compliant components (EAA 2025 ready)
  • Data Residency - Egress blocking for EU data compliance
  • Audit Logging - Enterprise-grade shadow recording

Installation

npm install @rivtor/kernel

Quick Start

Server-Side (API Routes)

import { auth, billing } from '@rivtor/kernel';

// Protect API routes
export async function GET(request: Request) {
  const user = await auth.requireUser(request);
  return Response.json({ user });
}

// Create Stripe checkout with VAT validation
export async function POST(request: Request) {
  const { priceId, vatNumber } = await request.json();
  const user = await auth.requireUser(request);

  const session = await billing.createCheckoutSession({
    priceId,
    userId: user.id,
    vatNumber, // Optional: EU VAT number for reverse charge
    successUrl: '/dashboard?checkout=success',
    cancelUrl: '/pricing?checkout=cancelled',
  });

  return Response.json({ url: session.url });
}

Client-Side (React Components)

import { RivtorAuth, CookieConsent } from '@rivtor/kernel/react';

export default function Layout({ children }: { children: React.ReactNode }) {
  return (
    <html>
      <body>
        <CookieConsent />
        {children}
      </body>
    </html>
  );
}

// Login page
export default function LoginPage() {
  return <RivtorAuth redirectUrl="/dashboard" />;
}

Modules

Module A: Vault (Authentication)

Secure Supabase authentication with pre-built components.

import { auth } from '@rivtor/kernel';

// Client-side
await auth.loginWithGoogle();
await auth.logout();

// Server-side
const user = await auth.requireUser(request);
const token = await auth.verifyToken(request);

Module B: Register (Payments & Billing)

Stripe integration with EU VAT validation.

import { billing } from '@rivtor/kernel';

// Create checkout with VAT validation
const session = await billing.createCheckoutSession({
  priceId: 'price_...',
  userId: user.id,
  vatNumber: 'DE123456789', // Validates against VIES
});

// Validate VAT number
const isValid = await billing.validateVat('DE123456789');

// Get user invoices
const invoices = await billing.getInvoices(userId);

Module C: Shield (Legal Compliance)

GDPR-compliant legal components.

import { PrivacyPolicy, TermsOfService } from '@rivtor/kernel/react';

<PrivacyPolicy
  companyName="Acme Inc"
  email="[email protected]"
  updatedAt="2025-01-01"
/>

<TermsOfService
  companyName="Acme Inc"
  email="[email protected]"
  jurisdiction="Delaware, USA"
/>

Module 1: Erasure Engine (GDPR)

One-click user deletion with cascading cleanup.

import { privacy } from '@rivtor/kernel';

// GDPR Article 17 - Right to be Forgotten
const result = await privacy.obliterate(userId);
// Deletes from: users, projects, websites, logs
// Anonymizes: invoices
// Calls: SendGrid, OpenAI APIs

// Export user data (GDPR request)
const data = await privacy.exportUserData(userId);

Module 2: EAA Enforcer (Accessibility)

WCAG 2.1 AA compliant components.

import { RivtorButton, RivtorInput, RivtorForm } from '@rivtor/kernel/react';

<RivtorButton aria-label="Submit form">Submit</RivtorButton>
// Automatically validates ARIA labels and contrast

<RivtorInput
  label="Email"
  type="email"
  required
  // Automatic label association and error handling
/>

Module 3: Sovereignty Shield (Data Residency)

Block data from leaving the EU region.

import { residency } from '@rivtor/kernel';

// middleware.ts
export { middleware } from '@rivtor/kernel/residency';

// All outgoing requests are validated
// Non-EU destinations are blocked

Module 4: Audit Log (Enterprise)

Shadow recording for all database mutations.

import { RivtorAuditLog } from '@rivtor/kernel/react';

<RivtorAuditLog
  userId={user.id}
  filters={{ action: 'UPDATE', table: 'projects' }}
/>

Environment Variables

# Supabase (Required)
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key

# Stripe (Required)
STRIPE_SECRET_KEY=sk_...
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_...
STRIPE_WEBHOOK_SECRET=whsec_...

# App Configuration
NEXT_PUBLIC_APP_URL=https://yourapp.com
NEXT_PUBLIC_APP_NAME=Your App
[email protected]
[email protected]

# Data Residency (Optional)
RIVTOR_DATA_RESIDENCY_ENABLED=true
RIVTOR_DATA_REGION=eu
RIVTOR_RESIDENCY_STRICT_MODE=true

# Accessibility (Optional)
RIVTOR_ENFORCE_CONTRAST=true
RIVTOR_ENFORCE_ARIA=true
RIVTOR_CONTRAST_RATIO=4.5

Philosophy

The Rivtor Kernel is built on the principle that AI should not write auth, payments, or compliance code.

These domains require:

  • Deep security knowledge
  • Legal compliance expertise
  • Production hardening
  • Continuous updates for regulations

By providing pre-built, tested, and compliant modules, we enable AI to focus on business logic while ensuring the critical infrastructure is secure and compliant.

License

MIT © Rivtor

Support


Built with care by Rivtor