@apick/core
v0.3.0
Published
Framework kernel for APICK — a pure headless CMS built TypeScript-first with no admin UI
Readme
@apick/core
The framework kernel for APICK — a pure headless CMS built TypeScript-first.
What's Inside
@apick/core provides the complete runtime for building content APIs:
| Module | Description |
|--------|-------------|
| HTTP Server | node:http + find-my-way trie router, server.inject() for testing |
| Configuration | Dotenv, environment-specific overrides, dot-notation access |
| Lifecycle | Apick class with load() / listen() / destroy() phases |
| Content API | Auto-generated REST endpoints from content type schemas |
| Content Types | Schema definition, normalization, system field injection |
| Document Service | High-level CRUD with draft/publish, events, validation |
| Database | Drizzle ORM (SQLite/PostgreSQL/MySQL), schema sync, migrations |
| Query Engine | SQL query builder with operators ($eq, $gt, $contains, etc.) |
| Auth | JWT sign/verify (HS256), password hashing |
| Middleware | Async (ctx, next) pipeline: rate-limit, CORS, security, body parser |
| Event Hub | Pub/sub event system with sequential execution |
| Cache | In-memory LRU cache with TTL and prefix deletion |
| Factories | createCoreController, createCoreService, createCoreRouter |
| Logging | Pino structured JSON logger |
| Plugins | Plugin manager with dependency resolution |
| Webhooks | HMAC-signed webhook delivery |
| Cron | In-process cron scheduler |
| Queue | Background job queue |
Install
npm install @apick/coreQuick Example
import { Apick } from '@apick/core';
const apick = new Apick({ appDir: process.cwd() });
await apick.load();
await apick.listen();
// Server running at http://0.0.0.0:1337Documentation
- Architecture
- Content API Guide
- Content Modeling Guide
- Database Guide
- Auth Guide
- Customization Guide
- Plugins Guide
- Testing Guide
Related Packages
@apick/cli-- CLI tool (apick develop,apick start)@apick/types-- Shared TypeScript type definitions@apick/utils-- Error classes, env helpers, utilities
