Docs / Core

Core

@hopak/core — the framework itself. Install card only; full docs are under Core / Database / Serving.

@hopak/core is the framework. This page is a thin install card — every exported symbol is documented under the dedicated feature page.

Install

Added automatically by hopak new. To add to an existing Bun project:

bun add @hopak/core

Where each export is documented

TopicExportsPage
Models + field buildersmodel, text, number, boolean, date, timestamp, email, url, phone, password, secret, token, json, enumOf, file, image, money, belongsTo, hasOne, hasManyModels
RoutingdefineRoute, hopakRoutes, Middleware
CRUD helperscrud.list, crud.read, crud.create, crud.update, crud.patch, crud.removeCRUD
DatabaseDatabase, ModelClient, WhereClause, FilterOp, FindManyOptionsDatabase
MigrationsMigrationContext, MigrationMigrations
ValidationbuildModelSchema, validate, serializeForResponseValidation
ErrorsHopakError, ValidationError, Unauthorized, Forbidden, NotFound, Conflict, RateLimited, InternalError, ConfigErrorErrors
ConfigdefineConfigConfiguration
MiddlewarerequestId, requestLog, corsMiddleware, CORS

License

MIT.