Skip to content
Docs
    Menu

    Site code reference

    How a Starjay site is built

    What a Starjay site is under the hood: a standard Astro and Tailwind CSS project that publishes as static pages by default.

    Every Starjay site is an ordinary Astro project styled with Tailwind CSS v4. Pages and components are .astro files. There's no proprietary page format: what you see in the Code panel is the code that builds your site.

    This section is for developers and AI agents who read or write a site's code, either through Starjay's own AI or through your own AI. If you only use the visual editor, you don't need it.

    What the platform adds

    Starjay keeps the project close to vanilla Astro and Tailwind, and adds a few managed pieces around it:

    Piece What it does Where it lives
    Design tokens Your colors and fonts, compiled into Tailwind utilities such as bg-{name}-{shade} and font-{slot} brand/tokens.ts (managed)
    Base layout Wraps every page: the <head> with SEO tags, your header and footer, and four snippet files src/layouts/Base.astro (generated)
    Content files The visible wording of pages and components, stored as JSON next to the code content/pages/, content/components/
    Text marks Named styles for part of a sentence (a highlighted word, a gradient phrase) src/marks.json
    Platform components Forms, CMS Markdown and marked text, imported from @starjay/design-system Not in your site's files
    Image library Every image is a managed asset with a site-relative address Managed through the image tools
    CMS collections Structured content (posts, products) read with Astro's live-collection functions Kept in the CMS, not in files

    Static by default

    Pages build to static HTML when you publish. A page that reads CMS content is different: it renders on request, and the live site caches it until the content changes. See Reading CMS content in code.

    Published sites carry no editor code

    The editor adds markers to your pages so you can click and edit them on the canvas. Those markers exist only in the editor's preview. The published site is just your pages, your styles and your scripts.

    Code and the visual editor are the same thing

    Canvas edits write to the same files the AI and your own tools write to. A change made one way shows up the other way. That's why the rules in this section matter: code that follows them stays editable on the canvas, and code that breaks them can stop the editor from finding things.