Skip to content

Appkit Core

Framework-independent TypeScript building blocks for business applications.

npm · Documentation · GitHub

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.

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.

  • 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

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.

Terminal window
npm install @alneas/appkit-core
# Or: bun add @alneas/appkit-core

Install 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.

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 short
console.log(result.errors); // field paths and validation messages
console.log(validate(schema, { name: 'Ada', reason: 'Equipment request' }).valid);
// true

With 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.

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.

Contributing · Releasing · MIT license