# Examples

> **Related:** [Project access](https://docs.atmyapp.com/account.md) · [Hand the website over to your client](https://docs.atmyapp.com/ai-assistant.md) · [Changelog](https://docs.atmyapp.com/changelog.md) · [Deploy your website](https://docs.atmyapp.com/deployment.md) · [Choose your integration](https://docs.atmyapp.com/integrations.md) · [Connect a JavaScript website](https://docs.atmyapp.com/quick-start.md) · [Troubleshooting](https://docs.atmyapp.com/troubleshooting.md)
> **Also:** [HTML version](https://docs.atmyapp.com/examples) · [Docs index](https://docs.atmyapp.com/llms.txt)

---
Use these examples as starting points for real projects.

Start with the complete [JavaScript integration](/quick-start/) or [Astro setup](/guides/astro/). These schemas illustrate alternative content models; migrate them and create real content before reading it.

## Minimal site settings

```ts
import { defineDocument, defineSchema, s } from "@atmyapp/structure";

export default defineSchema({
  definitions: {
    settings: defineDocument({
      fields: {
        siteTitle: s.string({ default: "My Website" }),
        supportEmail: s.string({ format: "email" }),
      },
    }),
  },
});
```

## Blog collection

```ts
import {
  defineCollection,
  defineDocument,
  defineSchema,
  s,
} from "@atmyapp/structure";

export default defineSchema({
  definitions: {
    authors: defineCollection({
      fields: {
        name: s.string(),
        avatar: s.image({ optional: true }),
      },
    }),
    posts: defineCollection({
      fields: {
        title: s.string({ min: 3 }),
        slug: s.slug({ source: "title" }),
        excerpt: s.string({ format: "long", default: "" }),
        cover: s.image({ optional: true }),
        publishedAt: s.date({ optional: true }),
      },
    }),
    home: defineDocument({
      fields: {
        headline: s.string(),
        intro: s.string({ format: "long" }),
      },
    }),
  },
});
```

## CLI workflow

```bash
atmyapp use --token cli_... --url https://edge.atmyapp.com/projects/your-project-id
atmyapp init --template blog
atmyapp migrate --dry-run --verbose
atmyapp migrate
```