Skip to content
wuzgood98Public

About

Monorepo for "@g14o/*" npm packages. The primary publishable package is cache, rate limiting, environment variable validators, and paystack payments for Next.js applications.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

g14o

CI

Monorepo for @g14o/* npm packages.

What it provides

Install

pnpm add @g14o/cache @upstash/redis
pnpm add @g14o/logger
pnpm add @g14o/ratelimit @upstash/redis @upstash/ratelimit
pnpm add @g14o/ratelimit-nextjs @upstash/redis @upstash/ratelimit next
pnpm add @g14o/paystack zod
pnpm add @g14o/paystack @g14o/paystack-better-auth better-auth zod

See each package guide in the documentation or package README for setup, import paths, and examples.

Quick example

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

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

Monorepo layout

Path Purpose
packages/cache Standalone cache package
packages/logger Zero-dependency isomorphic structured logger
packages/ratelimit/core, packages/ratelimit/nextjs Rate limiting (agnostic + Next.js)
packages/env-core Environment variable validation
packages/paystack Paystack API client
packages/paystack-better-auth Paystack billing plugin for Better Auth
apps/cache-demo Manual verification of build vs runtime cache behavior
apps/env-demo Zod / Valibot / ArkType showcase for @g14o/env-core
apps/paystack-demo Paystack demo app
apps/docs Documentation site (docs.g14o.dev)

Development

Prerequisites: Node >=22.18, pnpm (see packageManager in package.json). CI uses Node 24.

pnpm install
pnpm dev              # turbo dev (all apps)
pnpm build            # turbo build
pnpm test             # turbo test
pnpm typecheck
pnpm check            # lint + format check (alias: pnpm lint)
pnpm fix              # auto-fix (alias: pnpm format)
pnpm test:dist        # smoke published tarballs
pnpm demo:cache       # cache-demo dev server
pnpm demo:cache:build # cache-demo production build
pnpm demo:env         # env-demo dev server (port 3001)
pnpm demo:env:build   # env-demo production build
pnpm docs            # docs dev server (port 3003)
pnpm docs:build      # docs production build

See apps/cache-demo/README.md for verifying cache behavior during next build and at runtime.

See apps/env-demo/README.md for the environment validation showcase.

Code quality

Linting and formatting run at the repo root via Ultracite (Biome). Pre-commit hooks run ultracite fix on staged files via Husky and lint-staged.

Diagnose setup issues with pnpm dlx ultracite doctor.

Contributing

Contributions are welcome. See CONTRIBUTING.md for setup, workflow, and pull request guidelines.

License

MIT

About

Monorepo for "@g14o/*" npm packages. The primary publishable package is cache, rate limiting, environment variable validators, and paystack payments for Next.js applications.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages