@flashfeed/pack-schema
v0.7.0
Published
The FlashFeed knowledge-pack content schema (Zod) + validator — the single source of truth for what a valid pack is. Shared by the app, the tools, and the open packs repo.
Readme
@flashfeed/pack-schema
The FlashFeed knowledge-pack content schema — the single source of truth for what a
valid pack is. A Zod schema, the derived TypeScript types, and a
validatePack function, with zero platform dependencies (only zod).
Shared by the FlashFeed app, the authoring/admin tools, and the open
flashfeed-knowledge-packs
repo, so every one of them agrees on the same definition of a pack.
npm install @flashfeed/pack-schemaimport { validatePack } from "@flashfeed/pack-schema";
import type { Pack, ContentItem } from "@flashfeed/pack-schema/types";
const pack = validatePack(JSON.parse(fs.readFileSync("pack.json", "utf8")));
// ^? Pack — throws with a readable error if the JSON isn't a valid packExports
| Import | What |
|--------|------|
| @flashfeed/pack-schema | validatePack, the PackSchema, and re-exported types |
| @flashfeed/pack-schema/types | the TypeScript types (Pack, ContentItem, the 12 content shapes, …) |
| @flashfeed/pack-schema/schema | the raw Zod schemas |
| @flashfeed/pack-schema/mcqSpec | the declarative MCQ-game spec the schema references |
Ships TypeScript source — intended for bundler/tsx consumers (Metro, Vite, tsx), which is every current consumer. Content is CC BY 4.0; this schema package is MIT. Maintained by Recurxive LLC.
