Content Types
Chukfi adapts to your business domain, not the other way around. Define any content type — blog posts, job openings, events, staff profiles — and Chukfi generates everything: database schema, REST API, and TypeScript types.
Adding a Content Type
Section titled “Adding a Content Type”- Open the Content Types panel in the admin sidebar
- Click + New and give it a name (e.g., “Job Openings”)
- Add fields — each field has a name and a type (Text, Rich Text, Date, Number, Boolean, Media)
- Save — Chukfi generates the schema, migrations, and TypeScript types
For example, defining a “Job Openings” type with fields title, salary, location, and deadline automatically creates:
// Auto-generated by `chukfi codegen`export interface JobOpenings { title: string; salary: string; location: string; deadline: string;}Field Types
Section titled “Field Types”| Type | Description | Use For |
|---|---|---|
| Text | Single-line string | Titles, names, short labels |
| Rich Text | Formatted HTML content | Blog posts, page bodies, descriptions |
| Date | ISO 8601 date | Event dates, deadlines, publish schedules |
| Number | Integer or float | Counts, prices, ratings |
| Boolean | true/false toggle | Feature flags, visibility toggles |
| Media | File reference (S3-backed) | Hero images, PDFs, downloads |
CLI: Codegen
Section titled “CLI: Codegen”After defining content types, regenerate TypeScript types for your frontend:
npx chukfi codegen --out src/typesThis writes a chukfi-types.ts file with interfaces for every content type and a union type for type-safe queries. Import it directly into your Astro components for full IDE autocompletion.