This is the complete API-driven workflow for AI styling ANTSAND Databoard websites. Each step is a single API call. The entire loop β from reading the board to deploying a live site β takes under 30 seconds.
Databoard is ANTSAND's visual control plane for generated websites. It stores the site structure an AI or human edits: HMVC modules/controllers/actions, routes, ACL roles, page sections, menus, data mappings, field-level CSS classes, and site-specific Sass. Deployment reads this board and compiles it into a real Phalcon HMVC application.
For styling work, Databoard is where classes are attached to concrete fields like
section.container,
data.container,
data.sub_container,
data.h3,
data.p, and
data.cta.
Sass v2 provides reusable classes; Databoard decides where those classes are applied for each generated site.
Verify your API key works, then list all Databoards you own.
curl -s http://localhost/api/v1/me \ -H "Authorization: Bearer YOUR_API_KEY" | jq
curl -s http://localhost/api/v1/databoards \ -H "Authorization: Bearer YOUR_API_KEY" | jq '.[].name'
β Save the _id.$oid of the board you want to style. This is your BOARD_ID for all following steps.
Fetch the full Databoard configuration β sections, HMVC, field CSS classes, menu, Sass, and metadata.
curl -s http://localhost/api/v1/databoards/BOARD_ID \ -H "Authorization: Bearer YOUR_API_KEY" | jq
datalist[*].css.section.container β Section root class (theme goes here)datalist[*].css.data.container β Grid/layout container classdatalist[*].css.data.sub_container β Card/item wrapper classdatalist[*].css.data.h3, .p, .cta β Content field classesdatalist[*].css.data.img_container β Image wrapper classsass β Site-level Sass/common_stylesApply your styling changes. The patch endpoint merges your delta into the existing board β you don't need to send the full object.
curl -s -X POST http://localhost/api/v1/databoards/BOARD_ID/patch \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"patch_delta": {
"datalist.0.css.section.container": "antsand-section theme-dark-corporate",
"datalist.0.css.data.container": "antsand-grid md:grid-cols-3 gap-6",
"datalist.0.css.data.sub_container": "transition-all",
"datalist.0.css.data.img_container": "aspect-video",
"datalist.0.css.data.h3": "text-fluid-lg line-clamp-2",
"datalist.0.css.data.p": "text-fluid-base line-clamp-3 opacity-75",
"datalist.0.css.data.cta": "antsand-btn antsand-btn-primary touch-target"
}
}' | jq
antsand-section, antsand-grid, antsand-btn), then add Tier 2 utility classes (md:grid-cols-3, gap-6, line-clamp-2). Never pure utilities alone.
The Sass scanner reads every css_class field from the board. Classes already in antsand-v2.css are served from CDN. Board-specific utility classes get compiled into a site-local _utilities.scss.
curl -s -X POST http://localhost/api/v1/databoards/BOARD_ID/utilities/compile \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{}' | jq
β Response includes: classes_found, utility_classes, rules_emitted, unsupported_classes. Check unsupported_classes β those are class names the scanner couldn't generate rules for.
Deploy the board to its generated website. The compiler resolves templates (parameter_files.json, common_init_modern, service_3_modern), renders the Header/Body/Footer hierarchy, and publishes.
curl -s -X POST http://localhost/api/v1/databoards/BOARD_ID/deploy \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{}' | jq
Verify the deployed site is live and rendering correctly. The smoke test checks HTTP status codes, expected content, and absence of fatal errors.
# Quick check β site returns 200
curl -s -o /dev/null -w "%{http_code}" http://YOUR_SITE_URL/
# Full smoke test suite (from repo)
make test-site-smoke SITE=http://YOUR_SITE_URL
Repeat steps 3β5 for each section you want to style. Each iteration is: patch classes β compile utilities β deploy. The loop is idempotent β redeploying with the same classes produces the same site.
# Patch section 2 with a different theme
curl -s -X POST http://localhost/api/v1/databoards/BOARD_ID/patch \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"patch_delta": {
"datalist.2.css.section.container": "antsand-section theme-warm-editorial"
}
}' | jq .ok
# Recompile utilities (picks up new classes)
curl -s -X POST http://localhost/api/v1/databoards/BOARD_ID/utilities/compile \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" -d '{}' | jq .rules_emitted
# Redeploy
curl -s -X POST http://localhost/api/v1/databoards/BOARD_ID/deploy \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" -d '{}' | jq .ok
ANTSAND styling is layered. As an AI, know which layer to change for any given task.
| Layer | What it is | When to change |
|---|---|---|
| ποΈ Sass v2 | styles_antsand/sass_v2/ β shared framework CSS. 400+ utilities, 12 components, 4 themes. |
Only for reusable tokens/components that ship to all sites. Requires make master. |
| π Template defaults | parameter_files.json β seeds CSS fields and default classes for new sections. |
When you want new sections to start with different default classes. |
| ποΈ Volt templates | service_3_modern.volt, common_init_modern.volt β render the HBF hierarchy. |
Almost never. These are the contract β the fixed class hierarchy comes from here. |
| π― Field CSS | datalist[*].css.* β per-field class names set via API patch. |
Most AI work happens here. Theme on section, layout on container, utilities on fields. |
| π¨ Site Sass | Databoard sass/common_styles β per-site branding CSS. |
For one-off brand overrides, page-level CSS, or section-specific selectors. |
| β‘ Board utilities | /utilities/compile output β board-local utility Sass. |
Auto-generated. Just call the compile endpoint after patching classes. |
These classes are pre-compiled in antsand-v2.css. Use them in field CSS β no compilation needed.
theme-dark-corporate
theme-warm-editorial
theme-minimal-clean
theme-bold-gradient
antsand-grid
md:grid-cols-2 / 3 / 4
lg:grid-cols-3 / 4
gap-4 / gap-6 / gap-8
flex / flex-col / flex-wrap
text-fluid-sm / base / lg / xl / 2xl
line-clamp-2 / 3
text-center / left / right
font-bold / semibold
transition-all / fast / slow
hover:-translate-y-1
hover:scale-105
opacity-75 / opacity-50
shadow-md / shadow-lg
aspect-video / aspect-square
aspect-photo
object-cover / contain
rounded-lg / rounded-full
sr-only / skip-to-content
touch-target / touch-target-lg
focus-ring / focus-ring-primary
motion-safe:transition-all
Full reference: Databoard Utilities Loop | Homepage: Copyable AI prompts
When you patch datalist[N].css.data.h3, these classes end up on the actual rendered HTML element. Here's what maps to what.
Databoard field Rendered element Fixed class section.container β <section> .section section.h2 β <h2> .data-h2 section.p β <p> .data-p data.container β <div> .data-container data.sub_container β <div> (per item) .data-sub-container data.img_container β <div> wrapping <img> .data-img-container data.h3 β <h3> .data-h3 data.p β <p> .data-p data.span β <span> .data-span data.cta β <a> .data-cta Your CSS classes are APPENDED to the fixed class. e.g.: data.h3 = "text-fluid-lg line-clamp-2" renders: <h3 class="data-h3 text-fluid-lg line-clamp-2">
{
"section.container": "antsand-section theme-minimal-clean",
"data.container": "antsand-grid md:grid-cols-3 gap-6",
"data.sub_container": "transition-all",
"data.h3": "text-fluid-lg",
"data.p": "line-clamp-3 opacity-75",
"data.cta": "antsand-btn antsand-btn-primary"
}
{
"section.container": "antsand-section theme-warm-editorial",
"data.container": "antsand-grid md:grid-cols-2 gap-8",
"data.sub_container": "transition-all",
"data.img_container": "aspect-photo",
"data.h3": "text-fluid-lg line-clamp-2",
"data.p": "line-clamp-3",
"data.cta": "antsand-btn"
}
{
"section.container": "antsand-section theme-dark-corporate",
"data.container": "antsand-grid md:grid-cols-3 gap-6",
"data.sub_container": "transition-all",
"data.h3": "text-fluid-xl",
"data.span": "text-fluid-3xl font-bold",
"data.p": "opacity-75",
"data.cta": "antsand-btn antsand-btn-primary touch-target-lg"
}
{
"section.container": "antsand-section theme-bold-gradient",
"section.h2": "text-fluid-4xl font-bold",
"section.p": "text-fluid-lg opacity-75",
"data.container": "antsand-grid md:grid-cols-2 gap-8",
"data.cta": "antsand-btn antsand-btn-primary touch-target-lg"
}
Inside the Databoard UI, the file agentPromptCss.module.js auto-generates a structured prompt for the current section. It includes:
You don't need to parse the JS file. When working inside Databoard, click "Copy AI Prompt" β it generates the prompt for the active section. Paste it into any AI chat to get correctly-scoped CSS.
Did you call /utilities/compile before /deploy? The scanner must run to generate board-local utility CSS. Also check unsupported_classes in the compile response β those won't render.
The theme class goes on section.container, not on individual fields. Check that you patched datalist.N.css.section.container and not datalist.N.css.data.h3.
Verify your API key with GET /api/v1/me. API keys use Authorization: Bearer header, not cookies. Keys are scoped to the user who created them.
Patch the board's sass.common_styles field with custom SCSS. This gets compiled into the site's CSS bundle during deploy. Use standard CSS selectors targeting the fixed hierarchy classes (.data-h3, .data-sub-container, etc.).