Appkit Core
Appkit Core
Section titled “Appkit Core”Framework-independent TypeScript building blocks for business applications.
npm · Documentation · GitHub
Elevator Pitch
Section titled “Elevator Pitch”Validate business records with JSON Schema, connect record and file operations to explicit adapters, and review AI-proposed changes before applying them. Core provides the contracts and helpers; your application controls persistence and permissions.
Why & Value
Section titled “Why & Value”Use Core when a backend, script or frontend needs shared validation and record contracts without a React dependency. Feature subpaths let you select storage, schema, graph or AI APIs and make provider-specific SDK requirements explicit.
| Your application needs | Choose |
|---|---|
| Validation, storage, record adapters, dependency planning or regional helpers | Core alone |
| React components, schema forms, record tables or chat UI | Appkit React, which depends on Core |
Core is a library, not a hosted backend. Authentication, authorization, migrations, transactions and final writes belong to your application.
Key Highlights
Section titled “Key Highlights”- Schemas and records: JSON Schema validation, schema conversion and data-access contracts. Data guide
- File storage: hashing, signing, ZIP helpers and explicit object-storage adapters. Storage guide
- Business calculations: dependency graphs and planning, plus Japanese and US regional helpers. Graph · Japan · US
- AI proposal review: structured-input validation, action contracts and proposal review before application-owned execution. AI guide
Quickstart
Section titled “Quickstart”Requirements and installation
Section titled “Requirements and installation”Node.js 24 or later is the supported Node runtime. Core does not require React. The package provides ESM, CommonJS and TypeScript declarations; runtime requirements also depend on the selected feature. For example, JSON Schema validation compiles functions at runtime and requires a host that permits this.
npm install @alneas/appkit-core# Or: bun add @alneas/appkit-coreInstall the package name; use feature subpaths in imports. The validation example below needs no optional provider SDK. Database and AI SDK integrations can require additional peers; see public imports and peer requirements.
Validate a request before saving
Section titled “Validate a request before saving”import { createAjvValidator } from '@alneas/appkit-core/data/schema';
const schema = { type: 'object', properties: { name: { type: 'string', minLength: 2 }, reason: { type: 'string' }, }, required: ['name'], additionalProperties: false,};
const validate = createAjvValidator({ locale: 'en' });const input: unknown = { name: 'A' };const result = validate(schema, input);
console.log(result.valid); // false: the name is too shortconsole.log(result.errors); // field paths and validation messagesconsole.log(validate(schema, { name: 'Ada', reason: 'Equipment request' }).valid);// trueWith these default validator options, input is not coerced, defaults are not inserted and extra keys are not removed. Invalid input returns errors; invalid schemas or validator configuration can throw. A successful result validates the data but does not narrow its TypeScript type or authorize a write. After validation, pass accepted records to your application’s persistence layer. See the data guide for the DataAccessAdapter contract and provider-specific entry points.
Next Steps
Section titled “Next Steps”-
Change history: additions, fixes and upgrade notes by version.
-
Data and schema guide: record contracts and database adapters.
-
Public exports and optional peers: exact import paths and SDK requirements.
-
AI security and approval boundaries: validation, permissions and tool execution.
-
AI error codes and recovery: inspect failures before retrying.
For coding agents
Section titled “For coding agents”Start with the agent instructions, then use the API catalog and full documentation. Installed packages include these files under consumer-ai/ and llms-full.txt; their locations are also listed in the appkit.agent manifest field.