Skip to Content
SubmissionValidating Your Template

Validating Your Template

Before submitting your template, run the validation script to ensure it meets all platform requirements. Templates that fail validation will be automatically rejected.

Running validation

npm run validate -- --template your-template-name

The validator checks your template against a comprehensive set of rules and outputs a pass/fail report.

What the validator checks

Manifest validation

CheckDescription
Schema validitytemplate.manifest.json matches the required JSON schema
Required fieldsid, name, version, description, author, category, pricing, i18n are present
ID matchid field matches the template directory name
Version formatValid semantic version (e.g. 1.0.0)
Category valueOne of: bold, elegant, minimalist, vibrant, wellness
Pricing typeOne of: free, free_with_attribution, standard, exclusive
RTL supportedi18n.rtlSupported is true
Tested localesArray includes at least "en"

File structure validation

CheckDescription
Required filestemplate.manifest.json, template.css, index.ts, thumbnail image
Header componentHeader/Header.tsx exists
Footer componentFooter/Footer.tsx exists
Loading componentLoading/Loading.tsx exists
Required pagespages/home/, pages/about/, pages/login/ directories exist
CSS modulesEach component has a co-located .module.css file

Export validation

CheckDescription
Barrel fileindex.ts exports all required components
Header exportNamed export Header found
Footer exportNamed export Footer found
Loading exportDefault export found, re-exported as Loading
Page exportsAll page components have default exports

Image slot validation

CheckDescription
DeclaredA warning when imageSlots is missing: signup cannot preview your photo spots
Slot idsEach id is one of home-hero, home-about-teaser, about-hero, about-image-section, listed once
Required fieldspage, section and field are non-empty strings
Ratioratio is width:height, e.g. 16:10
Personapersona, when set, is a boolean

CSS validation

CheckDescription
Custom propertiestemplate.css defines --color-accent and --color-secondary
Theme modesBoth [data-theme="light"] and [data-theme="dark"] sections exist
Font variables--font-heading and --font-body are defined

Asset validation

CheckDescription
Thumbnail existsThe file set in preview.thumbnail (e.g. preview/thumbnail.png) is present
Thumbnail sizeDimensions are 1200 × 900 pixels
File sizeTotal template package is under 10 MB

Understanding validation output

A successful run looks like:

✓ template.manifest.json — schema valid ✓ template.manifest.json — id matches directory name ✓ template.manifest.json — rtlSupported is true ✓ Required files — all present ✓ Header — named export found ✓ Footer — named export found ✓ Loading — default export found ✓ HomeContent — default export found ✓ AboutContent — default export found ✓ LoginContent — default export found ✓ template.css — required custom properties defined ✓ template.css — light and dark theme modes defined ✓ Thumbnail — 1200x900, 320KB Validation passed! 13/13 checks passed.

A failed run shows errors with explanations:

✓ template.manifest.json — schema valid ✗ template.manifest.json — rtlSupported is false (must be true) ✓ Required files — all present ✗ Header — default export found, but named export required ✓ Footer — named export found ✗ template.css — missing [data-theme="light"] section Validation failed. 3 errors found.

Common issues and fixes

”Named export required for Header/Footer"

// ❌ You have this (default export) export default function Header() { ... } // ✅ Change to named export export function Header() { ... }

"Missing rtlSupported or set to false"

{ "i18n": { "rtlSupported": true, "testedLocales": ["en", "ar"] } }

"Missing theme mode definitions”

Add both light and dark sections to template.css:

[data-theme="light"] { --bg-primary: #ffffff; /* ... */ } [data-theme="dark"] { --bg-primary: #0f172a; /* ... */ }

“Thumbnail dimensions incorrect”

Resize your thumbnail to exactly 1200 × 900 pixels. Use any image editor or the command line:

# Using ImageMagick convert thumbnail.png -resize 1200x900! preview/thumbnail.png

Always run validation locally before uploading. The upload process runs the same validation server-side, but catching errors locally saves time.

Last updated on