# @flatbread/core

> Flatbread's engine: runs source and transformer plugins, validates records and refs, and builds the GraphQL schema plus JSON and CSV snapshots.

Latest version **1.2.0** (published 2026-08-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @flatbread/core
pnpm add @flatbread/core
yarn add @flatbread/core
bun add @flatbread/core
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2026-08-24 |
| First published | 2021-11-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=20.19 |
| Dependencies | 6 |
| Unpacked size | 206.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 69 |
| Author | Tony Ketcham |
| Maintainers | tonyketcham |

## Links

- npm: https://www.npmjs.com/package/@flatbread/core
- Repository: https://github.com/FlatbreadLabs/flatbread
- Homepage: https://github.com/FlatbreadLabs/flatbread/tree/main/packages/core#readme
- Issues: https://github.com/FlatbreadLabs/flatbread/issues
- npm.io page: https://npm.io/package/@flatbread/core

## Dependencies (6)

- [plur](https://npm.io/package/plur.md) 5.1.0
- [vfile](https://npm.io/package/vfile.md) 5.3.4
- [graphql](https://npm.io/package/graphql.md) 16.14.2
- [matcher](https://npm.io/package/matcher.md) 5.0.0
- [lodash-es](https://npm.io/package/lodash-es.md) 4.18.1
- [graphql-compose](https://npm.io/package/graphql-compose.md) 9.0.8

## Recent versions

- 1.2.0 (latest) — 2026-08-24
- 1.0.0-alpha.7 (alpha) — 2021-11-26
- 1.1.0 — 2026-08-23
- 1.0.1 — 2026-08-15
- 1.0.0 — 2026-08-12
- 1.0.0-alpha.16 — 2025-08-10
- 1.0.0-alpha.15 — 2022-08-04
- 1.0.0-alpha.14 — 2022-07-01
- 1.0.0-alpha.13 — 2022-07-01
- 1.0.0-alpha.12 — 2022-07-01
- 1.0.0-alpha.11 — 2022-06-30
- 1.0.0-alpha.10 — 2022-06-25
- 1.0.0-alpha.9 — 2022-05-22
- 1.0.0-alpha.8 — 2022-05-22
- 1.0.0-alpha.6 — 2021-11-26
- … 3 more at https://npm.io/package/@flatbread/core/versions

## README

# @flatbread/core 🍶

The internal GraphQL schema generator for Flatbread. This runs the plugins declared in the user's config, pulling in content and transforming it prior to generating the GraphQL schema.

As a general user of Flatbread, you likely want to use the full [Flatbread module](https://www.npmjs.com/package/flatbread)

However, you can utilize this package directly to build your own custom GraphQL server via installing:

```bash
pnpm i @flatbread/core@latest
```

## Snapshot exports

This package also exposes stable snapshot export helpers for the validated
content graph:

- `exportCollectionsAsJson(configResult, options)` returns deterministic JSON
  snapshots for selected collections.
- `exportCollectionsAsCsv(configResult, options)` returns flat CSV views over
  that same validated data.

Prefer importing these helpers from `flatbread` in app code, since the main
package re-exports `@flatbread/core` and is the primary consumer-facing surface.
Import from `@flatbread/core` directly when you intentionally want the lower
level package:

```ts
import { exportCollectionsAsJson, exportCollectionsAsCsv } from 'flatbread';
```

See [`docs/json-export.md`](../../docs/json-export.md) for the full export
contract and examples.

---
_Source: https://npm.io/package/@flatbread/core · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
