open-index/open-npm huggingface dataset:
npm package: @questpie/elysia
Description: Elysia adapter for QUESTPIE. Mounts CRUD, auth, storage, custom app routes, and realtime routes on an Elysia instance with end-to-end type safety via Eden Treaty.
Latest version: 3.0.0

# @questpie/elysia

Elysia adapter for QUESTPIE. Mounts CRUD, auth, storage, custom app routes, and realtime routes on an Elysia instance with end-to-end type safety via Eden Treaty.

## Installation

```bash
bun add @questpie/elysia questpie elysia
```

## Server Setup

```ts
import { Elysia } from "elysia";
import { questpieElysia } from "@questpie/elysia";
import { app } from "./questpie";

const app = new Elysia()
	.use(questpieElysia(app, { basePath: "/api" }))
	.listen(3000);

export type App = typeof app;
```

## Client Setup

### Eden Treaty Client (Full Type Safety)

```ts
import { createClientFromEden } from "@questpie/elysia/client";
import type { App } from "./server";
import type { AppConfig } from "./questpie";

const client = createClientFromEden<App, AppConfig>({
	server: "localhost:3000",
});

// CRUD — fully typed
const { docs } = await client.collections.posts.find({ limit: 10 });

// App routes — fully typed
const stats = await client.routes.getStats({ period: "week" });

// Custom Elysia routes — fully typed via Eden Treaty
const result = await client.api.custom.route.get();
```

### Generic HTTP Client

```ts
import { createClient } from "questpie/client";
import type { AppConfig } from "./questpie";

const client = createClient<AppConfig>({
	baseURL: "http://localhost:3000",
	basePath: "/api",
});
```

## Routes

The adapter automatically creates:

| Method | Route                                 | Description           |
| ------ | ------------------------------------- | --------------------- |
| GET    | `/api/collections/:name`              | List items            |
| POST   | `/api/collections/:name`              | Create item           |
| GET    | `/api/collections/:name/:id`          | Get item              |
| PATCH  | `/api/collections/:name/:id`          | Update item           |
| DELETE | `/api/collections/:name/:id`          | Delete item           |
| POST   | `/api/collections/:name/:id/restore`  | Restore soft-deleted  |
| GET    | `/api/collections/:name/:id/versions` | List item versions    |
| POST   | `/api/collections/:name/:id/revert`   | Revert item version   |
| GET    | `/api/globals/:name`                  | Get global            |
| PATCH  | `/api/globals/:name`                  | Update global         |
| GET    | `/api/globals/:name/versions`         | List global versions  |
| POST   | `/api/globals/:name/revert`           | Revert global version |
| POST   | `/api/collections/:name/upload`       | Upload file           |
| ALL    | `/api/auth/*`                         | Better Auth routes    |
| ANY    | `/api/:route*`                        | Custom app routes     |
| GET    | `/api/collections/:name/subscribe`    | SSE realtime          |

## Documentation

Full documentation: [https://questpie.com/docs](https://questpie.com/docs)

## License

MIT
npm package: @questpie/hono
Description: Hono adapter for QUESTPIE. Mounts CRUD, auth, storage, custom app routes, and realtime routes on a Hono instance with a unified client combining QUESTPIE operations and Hono RPC.
Latest version: 3.0.0

# @questpie/hono

Hono adapter for QUESTPIE. Mounts CRUD, auth, storage, custom app routes, and realtime routes on a Hono instance with a unified client combining QUESTPIE operations and Hono RPC.

## Installation

```bash
bun add @questpie/hono questpie hono
```

## Server Setup

```ts
import { Hono } from "hono";
import { questpieHono } from "@questpie/hono";
import { app } from "./questpie";

const app = new Hono().route("/", questpieHono(app, { basePath: "/api" }));

export default { port: 3000, fetch: app.fetch };
export type AppType = typeof app;
```

## Client Setup

### Hono RPC Client (Unified)

```ts
import { createClientFromHono } from "@questpie/hono/client";
import type { AppType } from "./server";
import type { App } from "./questpie";

const client = createClientFromHono<AppType, App>({
	baseURL: "http://localhost:3000",
});

// CRUD — fully typed
const { docs } = await client.collections.posts.find({ limit: 10 });

// App routes — fully typed
const stats = await client.routes.getStats({ period: "week" });

// Custom Hono routes — via Hono RPC
const result = await client.api.custom.route.$get();
```

### Generic HTTP Client

```ts
import { createClient } from "questpie/client";
import type { App } from "./questpie";

const client = createClient<App>({
	baseURL: "http://localhost:3000",
	basePath: "/api",
});
```

## Routes

The adapter automatically creates:

| Method | Route                                 | Description           |
| ------ | ------------------------------------- | --------------------- |
| GET    | `/api/collections/:name`              | List items            |
| POST   | `/api/collections/:name`              | Create item           |
| GET    | `/api/collections/:name/:id`          | Get item              |
| PATCH  | `/api/collections/:name/:id`          | Update item           |
| DELETE | `/api/collections/:name/:id`          | Delete item           |
| POST   | `/api/collections/:name/:id/restore`  | Restore soft-deleted  |
| GET    | `/api/collections/:name/:id/versions` | List item versions    |
| POST   | `/api/collections/:name/:id/revert`   | Revert item version   |
| GET    | `/api/globals/:name`                  | Get global            |
| PATCH  | `/api/globals/:name`                  | Update global         |
| GET    | `/api/globals/:name/versions`         | List global versions  |
| POST   | `/api/globals/:name/revert`           | Revert global version |
| POST   | `/api/collections/:name/upload`       | Upload file           |
| ALL    | `/api/auth/*`                         | Better Auth routes    |
| ANY    | `/api/:route*`                        | Custom app routes     |
| GET    | `/api/collections/:name/subscribe`    | SSE realtime          |

## Documentation

Full documentation: [https://questpie.com/docs](https://questpie.com/docs)

## License

MIT
npm package: @questpie/openapi
Description: Auto-generate an OpenAPI 3.1 spec from a QUESTPIE app instance and serve interactive API docs via Scalar UI.
Latest version: 3.0.0

# @questpie/openapi

Auto-generate an OpenAPI 3.1 spec from a QUESTPIE app instance and serve interactive API docs via Scalar UI.

## Installation

```bash
bun add @questpie/openapi
```

## Usage

Register `openApiModule()` in your `modules.ts` file to add `/openapi.json` and `/docs` routes:

```ts
// src/questpie/server/modules.ts
import { adminModule } from "@questpie/admin/server";
import { openApiModule } from "@questpie/openapi";

export default [
	adminModule,
	openApiModule({
		info: { title: "My API", version: "1.0.0" },
		scalar: { theme: "purple" },
	}),
] as const;
```

Your route handler stays clean — no wrapper needed:

```ts
// routes/api/$.ts
import { createFetchHandler } from "questpie";
import { app } from "#questpie";

const handler = createFetchHandler(app, { basePath: "/api" });
```

Once registered, the following endpoints are available:

```
GET /api/openapi.json → OpenAPI spec
GET /api/docs         → Scalar UI
```

## What Gets Documented

| Category        | Endpoints                                                                                                 |
| --------------- | --------------------------------------------------------------------------------------------------------- |
| **Collections** | List, create, findOne, update, delete, count, deleteMany, restore, versions, revert, upload, schema, meta |
| **Globals**     | Get, update, versions, revert, schema                                                                     |
| **Routes**      | All standalone routes, with input/output from Zod schemas                                                 |
| **Auth**        | Better Auth endpoints (sign-in, sign-up, session, sign-out)                                               |
| **Search**      | Full-text search and reindex                                                                              |

Routes with an explicit `outputSchema` get full request/response documentation. Routes without it fall back to `{ type: "object" }`.

## Standalone Spec Generation

Generate the spec without mounting routes:

```ts
import { generateOpenApiSpec } from "@questpie/openapi";

const spec = generateOpenApiSpec(app, {
	basePath: "/api",
	info: { title: "My API", version: "1.0.0" },
});
```

## Documentation

Full documentation: [https://questpie.com/docs/client/openapi](https://questpie.com/docs/client/openapi)

## License

MIT