open-index/open-npm huggingface dataset:
npm package: @8lys/api
Description: Centralized TRPC scaffolding (server/client) and Next adapter for 8LYS Stack
Latest version: 0.1.0

# @8lys/api

Centralized tRPC scaffolding for the 8LYS Stack.

## Exports

- Server: `createApi`, `makeNextRouteHandler`
- Client: `createTRPCReact`, `transformer` (SuperJSON)
- Next adapter: `makeNextRouteHandler` via `@8lys/api/next-adapter`

## Quick Start

```ts
// server (Next.js route handler)
import { makeNextRouteHandler } from "@8lys/api/next-adapter";
import { appRouter } from "./root";
import { createContext } from "./context";

export const runtime = "edge";
export const GET = makeNextRouteHandler({ appRouter, createContext });
export const POST = GET;
```

```ts
// client
import { createTRPCReact } from "@8lys/api/client";
import { transformer } from "@8lys/api/client";

export const api = createTRPCReact<AppRouter>();
// use transformer when configuring server/client consistency if needed
```