Types, validation, and schemas — generated everywhere.
The Single Source of Truth for Your Data
Your types, validation, DB schemas, and UI metadata live in one .as file. Change once, update everywhere.
string.email isn't just a type — it's a built-in validator. number.int.positive carries constraints automatically.
Attach labels, examples, sensitivity flags, DB indexes — all accessible at runtime for forms, docs, and APIs.
TypeScript types, runtime validators, JSON Schema, database schemas with indexes — all generated from one .as file.
Build forms, tables, and documentation directly from your type metadata. All annotations are preserved at runtime.
Add domain-specific metadata that flows through your entire stack. Build plugins for any language or framework.
Once in Drizzle. Once in Zod. Once in your UI config. Atscript replaces all of them.
import { pgTable, serial, varchar, integer, uniqueIndex } from 'drizzle-orm/pg-core'
export const users = pgTable('users', {
id: serial('id').primaryKey(),
email: varchar('email', { length: 255 }).notNull(),
name: varchar('name', { length: 100 }).notNull(),
age: integer('age').notNull(),
role: varchar('role', { enum: ['admin', 'user'] }),
}, (t) => [uniqueIndex().on(t.email)])import { createInsertSchema } from 'drizzle-zod'
import { users } from '../db/schema'
export const insertUserSchema = createInsertSchema(users, {
email: (s) => s.email.email(),
name: (s) => s.name.min(2).max(100),
age: (s) => s.age.positive(),
})const fieldConfig = {
email: { label: 'Email Address', placeholder: 'alice@company.com' },
name: { label: 'Full Name', placeholder: 'Alice Smith' },
age: { label: 'Age', type: 'number' },
role: { label: 'Role', component: 'select' },
}@db.table 'Users'
export interface User {
@meta.id
id: number
@meta.label "Email Address"
@meta.placeholder "alice@company.com"
@db.unique
email: string.email
@meta.label "Full Name"
@meta.placeholder "Alice Smith"
@expect.minLength 2
@expect.maxLength 100
name: string
@meta.label "Age"
age: number.int.positive
@meta.label "Role"
@ui.component "select"
role?: 'admin' | 'user'
}@db.* and @ui.* annotations are illustrative — Atscript's plugin system lets ORM and UI framework authors define their own.