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

@boltapp/bolt-api

v0.0.15

Published

API layer for Bolt applications. Defines operation interfaces and creates callable APIs or REST handlers.

Downloads

1,415

Readme

@boltapp/bolt-api

API layer for Bolt applications. Defines operation interfaces and creates callable APIs or REST handlers.

Installation

pnpm add @boltapp/bolt-api

Quick Start

Next.js (Auto-generated)

Run bolt sync to generate API routes:

// .bolt/api/bolt-handler.ts
import { createNextBoltHandlers } from "@boltapp/bolt-api";
import { bolt } from "../bolt";

export const { GET, POST, PUT, PATCH, DELETE } = createNextBoltHandlers(bolt);

Custom Handler

import { createBoltApiHandler } from "@boltapp/bolt-api";
import { bolt } from "./bolt";

const app = createBoltApiHandler(bolt, "/api/bolt");

Direct API Usage

import { createAppPublicApi } from "@boltapp/bolt-api/app-public";
import { createDataTableApi } from "@boltapp/bolt-api/data-table";
import { createDataStoreApi } from "@boltapp/bolt-api/data-store";

const publicApi = createAppPublicApi(bolt);
const tableApi = createDataTableApi(bolt);
const storeApi = createDataStoreApi(bolt);

// App operations
const app = await publicApi.app.get();
const tables = await publicApi.project.tables.list();

// Table operations
const table = await tableApi.get("table_123");
await tableApi.sendBatch({ viewId, operations: [...] });

// Data store operations
const store = await storeApi.get("my_store");
await storeApi.setItem("my_store", "key", { value: 123 });

API Bundles

app-public

For Who: External developers building Bolt-powered applications. This is the primary API surface for apps that use Bolt for data storage. Safe for client-side use.

Authentication:

  • Client apps: None (local SQLite)
  • Cloud apps: X-Bolt-App-Id, X-Bolt-Org-Id, X-Bolt-Project-Secret headers

Operations: App info, data stores, files, project info, project tables list/create, project data access.


data-table

For Who: Bolt DevTools and admin interfaces needing full table management. Used for batch updates, cell editing, and table operations.

Authentication:

  • Client apps: None (local SQLite)
  • Cloud apps: X-Bolt-App-Id, X-Bolt-Org-Id, X-Bolt-Project-Secret headers

Operations: Get table, delete table, send batch, get/set cells.


data-store

For Who: Bolt DevTools and developers managing key-value stores for app config, feature flags, and non-tabular data.

Authentication:

  • Client apps: None (local SQLite)
  • Cloud apps: X-Bolt-App-Id, X-Bolt-Org-Id, X-Bolt-Project-Secret headers

Operations: Get store, delete store, get/set/update/delete items.


app-admin

For Who: Internal dashboard and admin applications. Used by the Bolt dashboard for full app management including app settings, table views, and all CRUD operations.

Authentication:

  • Internal use only (not exposed via REST endpoints)
  • Uses session-based authentication (via requireOrgContext)
  • No project secret required — secrets are for external/public API access
  • Create instances with createCloudAdminInstance instead of createCloudBoltInstance

Operations: Full app CRUD, table views management, all data operations.

Usage (Dashboard):

import { getAppAdminApi } from "@/lib/bolt-admin";

export async function listAppTables(appId: string) {
  const { api } = await getAppAdminApi(appId);
  return api.tables.list();
}

Exports

// Handlers
import { createBoltApiHandler, createNextBoltHandlers } from "@boltapp/bolt-api";

// App Public
import { createAppPublicApi, createAppPublicRestHandler } from "@boltapp/bolt-api/app-public";

// App Admin (for dashboard/admin apps)
import { createAppAdminApi } from "@boltapp/bolt-api/app-admin";

// Data Table
import { createDataTableApi, createDataTableRestHandler } from "@boltapp/bolt-api/data-table";

// Data Store
import { createDataStoreApi, createDataStoreRestHandler } from "@boltapp/bolt-api/data-store";

REST Endpoints

When using createBoltApiHandler with base path /api/bolt:

App Public

  • GET /api/bolt/app - Get app
  • GET /api/bolt/app/info - Get app info
  • PATCH /api/bolt/app - Update app
  • GET /api/bolt/app/data-stores - List data stores
  • POST /api/bolt/app/data-stores - Create data store
  • GET /api/bolt/project/info - Get project info
  • GET /api/bolt/project/tables - List tables
  • POST /api/bolt/project/tables - Create table
  • GET /api/bolt/project/data/tables/:tableId - Get simplified table rows
  • GET /api/bolt/project/data/items/:itemId - Get item value by itemId

Data Table

  • GET /api/bolt/project/tables/id/:tableId - Get table
  • GET /api/bolt/project/tables/view/:viewId - Get table by view
  • DELETE /api/bolt/project/tables/id/:tableId - Delete table
  • POST /api/bolt/project/tables/id/:tableId/batch - Send batch operations
  • GET /api/bolt/project/tables/id/:tableId/cells/:rowId/:columnId - Get cell
  • PUT /api/bolt/project/tables/id/:tableId/cells/:rowId/:columnId - Set cell
  • GET /api/bolt/project/tables/views/:viewId - Get view
  • GET /api/bolt/project/tables/id/:tableId/views - List views
  • POST /api/bolt/project/tables/id/:tableId/views - Create view
  • PATCH /api/bolt/project/tables/views/:viewId - Update view
  • DELETE /api/bolt/project/tables/views/:viewId - Delete view
  • PUT /api/bolt/project/tables/id/:tableId/views/reorder - Reorder views

Data Store

  • GET /api/bolt/app/data-stores/name/:storeName - Get store
  • DELETE /api/bolt/app/data-stores/id/:storeId - Delete store
  • GET /api/bolt/app/data-stores/name/:storeName/items/:key - Get item
  • PUT /api/bolt/app/data-stores/name/:storeName/items/:key - Set item
  • PATCH /api/bolt/app/data-stores/name/:storeName/items/:key - Update item
  • DELETE /api/bolt/app/data-stores/name/:storeName/items/:key - Delete item

License

Licensed under a custom Boltapp public-use license. Free use is allowed in unmodified form. Redistribution and modification are not allowed. See LICENSE.md.