---
title: "Type Safety"
description: "How PID^TOO|| keeps content, navigation, and config type-safe"
---

PID^TOO|| is built with strict TypeScript and Zod validation so mistakes surface during development instead of in production.

## Where Type Safety Applies

- **Content collections:** Frontmatter validated with Zod�missing `title` or `description` fails fast.
- **Navigation config:** `SIDEBAR_NAVIGATION` uses typed structures, catching missing `slug` or malformed groups.
- **Components:** UI primitives ship with typed props; misuse surfaces as IDE errors.

## Benefits

- Fewer runtime 404s from typos in slugs
- Consistent SEO metadata because required fields are enforced
- Safer refactors�renames surface in both content and navigation configs

## Example: Safe Navigation Group

```typescript
const guides = {
    id: "guides",
    label: "Guides",
    entries: [{ slug: "guides/overview" }, { slug: "guides/getting-started" }],
    autoGenerated: true,
} satisfies SidebarGroup;
```

## Author Workflow

1. Add or edit a page.
2. Run `pnpm dev`; schema validation catches missing metadata instantly.
3. Navigation changes compile under strict types, reducing regressions.

## Next Steps

- Explore the navigation model in [Hybrid Approach: Best of Both Worlds](/docs/generation-strategies/hybrid-approach/best-of-both)
- See how DX improves authoring in [Developer Experience](/docs/advanced-topics/selling-points/developer-experience)
