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

@geenius/config

v0.16.0

Published

Geenius Config — Shared configurations for TypeScript, Biome, Tailwind CSS, and runtime app config

Downloads

1,570

Readme

@geenius/config

The single source of truth for the Geenius ecosystem. Dev tooling configs (TypeScript, Biome, Tailwind) and runtime app configuration (geenius.config.ts) — unified in one package.

Installation

pnpm add @geenius/config

If you only consume the TypeScript, Biome, or Tailwind presets at build time, installing as a dev dependency is also valid:

pnpm add -D @geenius/config

What's Inside

| Sub-Package | Purpose | |-------------|---------| | @geenius/config/typescript/* | Strict TypeScript configs (base, react, solidjs, library, node) | | @geenius/config/biome | Shared Biome config for linting + formatting | | @geenius/config/tailwind | Tailwind CSS presets, OKLCH design tokens, custom plugins | | @geenius/config (root) | Runtime app config — defineConfig(), getConfig(), Zod validation |

Published Subpaths

@geenius/config is a special family package, so its root export map intentionally ships a mix of runtime helpers, JSON presets, and static CSS assets instead of React or SolidJS UI variants.

| Import | Purpose | |--------|---------| | @geenius/config | Runtime config authoring, loading, validation, and diagnostics | | @geenius/config/biome | Shared Biome configuration JSON | | @geenius/config/tailwind | Tailwind preset for token-aware component styling | | @geenius/config/tailwind/v4 | Tailwind CSS v4 import entrypoint | | @geenius/config/tokens | Light-theme design tokens | | @geenius/config/tokens/dark | Dark-theme design tokens | | @geenius/config/css/bridge | --gui-* to --gn-* token bridge | | @geenius/config/typescript/base | Shared TypeScript baseline | | @geenius/config/typescript/react | React TypeScript preset | | @geenius/config/typescript/solidjs | SolidJS TypeScript preset | | @geenius/config/typescript/library | Library build TypeScript preset | | @geenius/config/typescript/node | Node-focused TypeScript preset |


Subpath Examples

Biome JSON preset

{
  "$schema": "https://biomejs.dev/schemas/2.4.11/schema.json",
  "extends": ["@geenius/config/biome"]
}

Tailwind preset and CSS assets

// tailwind.config.js
module.exports = {
  presets: [require("@geenius/config/tailwind")],
};
@import "tailwindcss";
@import "@geenius/config/tailwind/v4";
@import "@geenius/config/tokens";
@import "@geenius/config/tokens/dark";
@import "@geenius/config/css/bridge";

TypeScript preset subpaths

{
  "extends": "@geenius/config/typescript/base"
}
{
  "extends": "@geenius/config/typescript/react"
}
{
  "extends": "@geenius/config/typescript/solidjs"
}
{
  "extends": "@geenius/config/typescript/library"
}
{
  "extends": "@geenius/config/typescript/node"
}

Quick Start

TypeScript

{
  "extends": "@geenius/config/typescript/react"
}

Available configs: base, react, solidjs, library, node.

Biome

{
  "$schema": "https://biomejs.dev/schemas/2.4.11/schema.json",
  "extends": ["@geenius/config/biome"]
}

Tailwind CSS 4

@import "tailwindcss";
@import "@geenius/config/tailwind/v4";

Also available:

  • @geenius/config/tokens — OKLCH design tokens (light)
  • @geenius/config/tokens/dark — dark mode overrides
  • @geenius/config/css/bridge--gui-* to --gn-* namespace bridge

App Config (geenius.config.ts)

Create a geenius.config.ts in your project root:

import { defineConfig } from '@geenius/config';

export default defineConfig({
  name: 'My App',
  version: '1.0.0',
  tier: 'lancio',

  auth: {
    providers: ['email', 'google'],
    sessionExpiry: 7200,
  },

  payment: {
    provider: 'stripe',
    currency: 'USD',
    products: [
      { id: 'starter', name: 'Starter', price: 29, recurring: 'month' },
      { id: 'pro', name: 'Pro', price: 99, recurring: 'month' },
    ],
  },

  email: {
    provider: 'resend',
    fromAddress: '[email protected]',
    fromName: 'My App',
  },

  database: { provider: 'drizzle-supabase' },

  i18n: {
    defaultLocale: 'en',
    supportedLocales: ['en', 'es'],
    routePrefix: true,
  },

  deployment: { platform: 'cloudflare' },
});

Load and use at runtime:

import { initConfig, getConfig, isFeatureEnabled } from '@geenius/config';

// At app startup
await initConfig();

// Anywhere in your app
const config = getConfig();
config.auth.providers;     // ['email', 'google']
config.payment?.provider;  // 'stripe'
isFeatureEnabled('payment'); // true

Tiers

The config validates differently based on your tier:

| | Pronto | Lancio | Studio | |-|--------|--------|--------| | Purpose | Rapid prototyping | Production-ready | Full-featured + branding | | Auth | Email only (optional) | Required (at least email) | Required + MFA support | | Payment | Not allowed | Required if features.payment | Required if features.payment | | Email | Mock allowed | Real provider required | Real provider required | | Database | Memory allowed | Real provider required | Real provider required | | Brand | Not allowed | Not available | Optional | | Features | Limited | Standard | All |

Pronto (prototyping)

defineConfig({
  tier: 'pronto',
  auth: { providers: ['email'] },
  email: { provider: 'mock', fromAddress: 'dev@localhost' },
  database: { provider: 'memory' },
  // No payment, no brand — validation enforces this
});

Lancio (production)

defineConfig({
  tier: 'lancio',
  auth: { providers: ['email', 'google'] },
  email: { provider: 'resend', fromAddress: '[email protected]' },
  database: { provider: 'drizzle-supabase' },
  payment: { provider: 'stripe', products: [...] },
  // Mock email/memory DB would fail validation
});

Studio (enterprise)

defineConfig({
  tier: 'studio',
  // All Lancio requirements, plus:
  brand: { name: 'My Brand', logo: '/logo.svg', colors: { primary: 'oklch(...)' } },
  auth: { providers: ['email', 'google', 'github', 'passkey'], mfaRequired: true },
});

API Reference

Config Lifecycle

| Function | Description | |----------|-------------| | defineConfig(config) | Type-safe helper for geenius.config.ts files | | initConfig(path?) | Load, validate, and cache config from file | | getConfig() | Get the cached config singleton (throws if not initialized) | | setConfig(config) | Set config programmatically (validates before caching) | | resetConfig() | Clear the cache (for testing) | | validateConfig(config, tier?) | Validate a config object, returns validated config or throws |

Typed Accessors

| Function | Returns | |----------|---------| | getTier() | 'pronto' \| 'lancio' \| 'studio' | | getAuthProviders() | AuthProvider[] | | getPaymentProvider() | PaymentProvider \| null | | getEmailProvider() | EmailProvider | | getDatabaseProvider() | DatabaseProvider | | getAnalyticsProvider() | AnalyticsProvider \| null | | getDeploymentPlatform() | DeploymentPlatform | | isFeatureEnabled(name) | boolean |

Doctor & Introspection

| Function | Description | |----------|-------------| | doctorValidateConfig(config, env?) | Full validation report: errors, warnings, suggestions, missing env vars | | introspectConfig(config) | Extract metadata: providers, features, locales, tier | | getRequiredEnvVars(config) | List of env vars required by configured providers | | checkMissingEnvVars(config, env?) | Which required env vars are missing |

Adapter Integration

| Function | Description | |----------|-------------| | toAdapterConfig(config, env?) | Convert GeeniusConfig to AdapterConfig for @geenius/adapters | | shouldUseMockAdapters(config) | Check if config should use localStorage mocks (Pronto) | | getConfiguredDomains(config) | List which adapter domains are configured |


Advanced Runtime Exports

The root runtime entrypoint also exposes the underlying Zod schemas and typed error contract for package authors and tooling:

import {
  ConfigError,
  authProviderSchema,
  baseConfigSchema,
  createConfigSchema,
  getProviderEnvVars,
  tierSchema,
} from "@geenius/config";

Use getProviderEnvVars() when you need provider-level env metadata, and use baseConfigSchema or createConfigSchema() when composing validation into setup tooling without re-implementing the config contract.


Environment Variables

Required env vars depend on your configured providers:

| Provider | Required Variables | |----------|-------------------| | stripe | STRIPE_API_KEY, STRIPE_WEBHOOK_SECRET | | lemon-squeezy | LEMON_SQUEEZY_API_KEY, LEMON_SQUEEZY_WEBHOOK_SECRET | | polar | POLAR_API_KEY | | resend | RESEND_API_KEY | | sendgrid | SENDGRID_API_KEY | | postmark | POSTMARK_API_KEY | | drizzle-* | DATABASE_URL | | convex | CONVEX_DEPLOYMENT, CONVEX_URL | | posthog | POSTHOG_API_KEY, POSTHOG_HOST | | plausible | PLAUSIBLE_DOMAIN | | google (OAuth) | GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET | | github (OAuth) | GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET |

Use getRequiredEnvVars(config) to programmatically determine what's needed, or call doctorValidateConfig(config, env) for a full runtime validation report.


Design Tokens

The Tailwind sub-package ships 220+ OKLCH-based CSS custom properties under the --gn-* namespace.

/* Light theme tokens (auto-loaded) */
--gn-bg-primary: oklch(0.98 0.005 265);
--gn-text-primary: oklch(0.15 0.02 265);
--gn-accent-primary: oklch(0.65 0.22 265);
/* ... 217 more */

Dark mode via [data-theme="dark"], .dark, or prefers-color-scheme: dark.

The GUI bridge (@geenius/config/css/bridge) maps --gui-* tokens used by @geenius/ui components to --gn-* tokens, so boilerplates control the theme while components stay decoupled.


TypeScript Configs

All configs inherit from base.json with strict settings:

strict: true
noUnusedLocals: true
noUnusedParameters: true
noUncheckedIndexedAccess: true
exactOptionalPropertyTypes: true
noFallthroughCasesInSwitch: true
forceConsistentCasingInFileNames: true

| Config | Adds | |--------|------| | react | jsx: react-jsx | | solidjs | jsxImportSource: solid-js, jsx: preserve | | library | declaration: true, composite: true, outDir: ./dist | | node | module: Node16, moduleResolution: Node16 |


Biome Config

Shared config enforces:

  • Recommended lint rules
  • noExplicitAny: error
  • 2-space indent
  • Automatic import organization
  • Ignores dist/, node_modules/, _generated/

Storybook

Storybook is intentionally not applicable for @geenius/config. This package is a non-UI special family that publishes runtime helpers, JSON presets, and static CSS assets rather than React or SolidJS components.


Contributing

See CONTRIBUTING.md.

License

FSL-1.1-Apache-2.0. Commercial usage is governed by the repository LICENSE.