YouBothAgent▾
You — Business rules and flows you own. Read these yourself.
Both — Know the idea; your agent follows the details.
Agent — Conventions and references your agent follows. Look up as needed.
General▾
Interface▾
Observability▾
Performance▾
Native▾
Development▾

Constant Schema Docs

You do not have to write a data model spec by hand. Constant.Doc reads every model registered in ConstantRegistry and draws field tables and a relation diagram from it.
Words used on this page
refName
A model's name in code, such as user or bizContract. You pick models by it.
variant
One of the five classes a model declares: Input, Object, Light, Full and Insight.
scalar
A value object stored inside another model, declared under lib/__scalar/.
enum
A fixed list of allowed values, declared with enumOf(...).
The parts
Constant.Doc.Zone
An explorer for the screen, with search, a table or diagram view and a tab per variant.
Constant.Doc.Print
Everything expanded on one long page, ready to print or save as a PDF.
Constant.Doc.ModelConstant.Doc.Scalar
One model or scalar as a collapsible panel, picked by refName.
Constant.Doc.Enum
Every registered enum in one table, with its values and the fields that use it.
Put it on a page
A route renders it directly and stays a server page:
apps/myapp/page/(admin)/schema/_index.tsx
Both components take the same lists:
modelsstring[]default all
Database models to show, by refName, in the order you list them.
scalarsstring[]default all
Scalar models to show, by refName.
enumsstring[]default all
Enums to show: the class name, first letter lowercased (BizContractStatus → bizContractStatus).
includestring[]default all
Models and scalars to start from, by refName; the scalars and enums they reach come along.
excludestring[]default []
Names to leave out of every list. What only they reach is left out too.
libsstring[]default all
Libraries to show, by the app or lib that owns each entry. An app's extension belongs to the app.
groupBy"lib"Doc.Zone
One section and one diagram per library, the app first; links to another library show as external.
openAllbooleandefault falseDoc.Zone
Opens every model and scalar panel. Doc.Print is always fully open and ignores it.
  • An empty list means none. models={[]} shows no model; only a prop left out means every registered one.
  • Narrowing one list narrows the rest. With models, include or exclude set, a left-out scalars becomes the scalars the shown models embed and a left-out enums the enums their fields use.
  • A misspelled name is skipped quietly. If a model is missing, check its refName against the summary counts.
  • Order follows your list. A list you leave out is sorted by name.
  • The URL. (admin) is a route group and adds nothing to the path, so the page above serves /schema.
  • The print version. Write schema/print.tsx the same way with <Constant.Doc.Print />, and it serves /schema/print.

Generated Schema

Constant.Doc.Zone is for browsing. Each model is a panel with a field table, and the toolbar switches the whole view to a relation diagram.
What is on screen
PartWhat it does
Summary cardsCounts of database models, scalar models, enums and relations.
SearchFilters models and scalars by refName, and enums by name.
Table · DiagramSwitches between field tables and a graph of how models point at each other.
Input · Object · Full · Light · InsightShows one variant of a model at a time. Full opens first.
DetailOpens one field's full settings as JSON, including ref, example and meta.
Reading a field row
Type
The field type. ! marks a required field, and a model or scalar type is highlighted.
Kind
property, hidden, secret or resolve, with select:false and immutable badges.
Default
The declared default. A function default reads [function].
Constraints
min, max, minlength, maxlength, the text: search role, custom validate, accumulate.
Values
The allowed values when the field is an enum.
  • Labels come from the dictionary. The model description is the one in .of(), and each field shows its label and .desc().
  • Reading the diagram. Each arrow is labelled with the fields that make it. A model outside your list shows as an External node.
  • Click a node. The side panel lists its fields and their types, from the Full variant for a database model.
Live on this site

Constant Schema Docs

Database models, scalar models, enums, and relations from ConstantRegistry.

Database Models
0
Scalar Models
5
Enums
3
Relations
1

Database Models

No database model matches.

Scalar Models

DocPagedocPageakan
One page of the Akan.js documentation, as both a menu entry and a readable document.
FieldTypeKindDefaultConstraintsValuesDescription
href
Path
String!
property
—
—
—
The docs route, and the identifier to pass to readDocPage
title
Title
String
property
—
—
Page title
section
Section
String!
property
docs
—
docsreferencesconventionscheatsheet
Which of the four documentation sections it belongs to
category
Category
String
property
—
—
The menu group the page sits under
priority
Priority
String!
property
P2
—
P0P1P2
Reading order — P0 is the path through the framework
summary
Summary
String
property
—
—
First prose paragraph of the page
AccessTokenaccessTokenutil
Access token for authentication
FieldTypeKindDefaultConstraintsValuesDescription
jwt
JWT
String!
property
—
—
—
JSON Web Token
refreshToken
Refresh Token
String
property
—
—
—
Refresh token for token renewal
expiresAt
Expires At
Date
property
—
—
—
Access token expiration time
AccessLogaccessLogutil
Access log information
FieldTypeKindDefaultConstraintsValuesDescription
period
Period
Int!
property
0
—
—
Time period
countryCode
Country Code
String
property
—
—
—
ISO country code
countryName
Country Name
String
property
—
—
—
Name of the country
city
City
String
property
—
—
—
City name
postal
Postal
Int
property
—
—
—
Postal code
location
Location
Coordinate
property
—
—
—
Geographic location
ipv4
IPv4
String
property
—
—
—
IPv4 address
state
State
String
property
—
—
—
State or province
osName
OS Name
String
property
—
—
—
Operating system name
osVersion
OS Version
String
property
—
—
—
Operating system version
browserName
Browser Name
String
property
—
—
—
Web browser name
browserVersion
Browser Version
String
property
—
—
—
Web browser version
mobileModel
Mobile Model
String
property
—
—
—
Mobile device model
mobileVendor
Mobile Vendor
String
property
—
—
—
Mobile device vendor
deviceType
Device Type
String
property
—
—
—
Type of device
at
At
Date!
property
[function]
—
—
Access time
AccessStataccessStatutil
Access statistics information
FieldTypeKindDefaultConstraintsValuesDescription
request
Request
Int!
property
0
—
—
Number of requests
device
Device
Int!
property
0
—
—
Number of devices
ip
IP
Int!
property
0
—
—
Number of unique IPs
country
Country
Int!
property
0
—
—
Number of countries
Coordinatecoordinateutil
Geographic coordinate information
FieldTypeKindDefaultConstraintsValuesDescription
type
Type
String!
property
Point
—
Point
Coordinate type
coordinates
Coordinates
[Float]!
property
[0,0]
—
—
Longitude and latitude values
altitude
Altitude
Float!
property
0
—
—
Altitude in meters

Enums

EnumTypeValuesUsed By
coordinateType
coordinateType
String
Point
coordinate.type
docPriority
docPriority
String
P0P1P2
docPage.priority
docSection
docSection
String
docsreferencesconventionscheatsheet
docPage.section

Released under the MIT License

Connect your AI to these docs

MCPhttps://akanjs.com/mcp
Copyright © 2026 Akan.js All rights reserved.System managed bybassman