g14o

Introduction

Documentation for the @g14o/* npm packages — cache, rate limiting, env validation, and Paystack integrations.

What g14o provides

Quick install

pnpm add @g14o/cache @upstash/redis
pnpm add @g14o/ratelimit @upstash/redis @upstash/ratelimit
pnpm add @g14o/ratelimit-nextjs @upstash/redis @upstash/ratelimit next
pnpm add @g14o/ratelimit-express @upstash/redis @upstash/ratelimit express
pnpm add @g14o/ratelimit-hono @upstash/redis @upstash/ratelimit hono
pnpm add @g14o/env-core zod
pnpm add @g14o/paystack zod
pnpm add @g14o/paystack @g14o/paystack-better-auth better-auth zod

See Installation for per-package setup, or jump to a package guide from the sidebar.

Quick example

lib/cache.ts
import { createCache } from "@g14o/cache";
import { logger } from "@/lib/logger";
import { env } from "@/lib/env";

export const { withCache, invalidateCache } = createCache({
  redis: {
    url: env.UPSTASH_REDIS_REST_URL,
    token: env.UPSTASH_REDIS_REST_TOKEN,
  },
  logger,
});

Press Cmd+K (or Ctrl+K) to search across all documentation pages.

On this page