# Project Structure

import { Callout } from "fumadocs-ui/components/callout";
import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
import { File, Folder, Files } from "fumadocs-ui/components/files";
import { Step, Steps } from "fumadocs-ui/components/steps";
import { Tabs, Tab } from "fumadocs-ui/components/tabs";
import { Badge } from "@pycolors/ui";
import {
  Database,
  Boxes,
  FolderTree,
  Layers3,
  LayoutTemplate,
  Palette,
  Rocket,
  Sparkles,
} from "lucide-react";

import { PreferAvoid } from "@/components/docs/prefer-avoid";
import { DocsFeatureGrid } from "@/components/docs/docs-feature-grid";
import { DocsLinks } from "@/components/docs/docs-links";
import { DocsUpgradeCTA } from "@/components/docs/docs-upgrade-cta";
import { DocsConceptTabs } from "@/components/docs/docs-concept-tabs";

<div className="flex flex-wrap items-center gap-2">
  <Badge variant="outline">
    NA-AI Landing
  </Badge>

  <Badge>
    Structure
  </Badge>
</div>

## Understand the architecture before rewriting the UI

NA-AI Landing is organized around a simple separation:

> Data controls content. Sections render product blocks. Layout components frame the page. PyColors UI provides primitives.

This keeps customization clean, predictable, and easier to maintain as the landing page evolves.

Most product content can be updated from:

```txt
src/@data
```

before touching the visual implementation.

<DocsUpgradeCTA title="The structure is optimized for fast iteration." description="NA-AI Landing separates content, sections, layout, and UI primitives so you can customize positioning and branding without rebuilding the foundation." productSlug="na-ai-landing" buyLabel="Get NA-AI Landing — €49" secondaryHref="/docs/templates/na-ai-landing/customization" secondaryLabel="Customization guide" />

<Callout title="Key idea">
  The template is designed so product content can evolve without constantly
  rewriting the visual foundation.
</Callout>

### Architecture overview

<DocsFeatureGrid
  columns={2}
  tone="platform"
  items={[
  {
    title: "Data-driven structure",
    icon: FolderTree,
    description:
      "Content, pricing, navigation, FAQ, testimonials, and CTA copy live in centralized data files.",
  },
  {
    title: "Composable sections",
    icon: LayoutTemplate,
    description:
      "Landing page blocks are isolated into reusable presentational sections.",
  },
  {
    title: "Shared UI primitives",
    icon: Boxes,
    description:
      "The visual layer is powered by PyColors UI and semantic design tokens.",
  },
  {
    title: "Fast customization workflow",
    icon: Sparkles,
    description:
      "The architecture prioritizes quick branding, positioning, and product iteration.",
  },
]}
/>

## Structure

<Files>
  <Folder name="src" defaultOpen>
    <Folder name="@data" defaultOpen>
      <File name="contact.ts" />

      <File name="cta.ts" />

      <File name="customers.ts" />

      <File name="faq.ts" />

      <File name="features.ts" />

      <File name="footer.ts" />

      <File name="hero.ts" />

      <File name="index.ts" />

      <File name="integrations.ts" />

      <File name="navbar.ts" />

      <File name="not-found.ts" />

      <File name="pricing-table.ts" />

      <File name="pricing.ts" />
    </Folder>

    <Folder name="app" defaultOpen>
      <File name="globals.css" />

      <File name="layout.tsx" />

      <File name="page.tsx" />

      <File name="not-found.tsx" />

      <File name="robots.ts" />

      <File name="sitemap.ts" />
    </Folder>

    <Folder name="components" defaultOpen>
      <Folder name="layout">
        <File name="footer.tsx" />

        <File name="na-ai-logo.tsx" />

        <File name="navbar.tsx" />

        <File name="section-header.tsx" />

        <File name="theme-provider.tsx" />

        <File name="toogle-theme.tsx" />
      </Folder>

      <Folder name="sections">
        <Folder name="features" />

        <Folder name="hero" />

        <File name="contact.tsx" />

        <File name="cta.tsx" />

        <File name="customers.tsx" />

        <File name="faq.tsx" />

        <File name="integrations.tsx" />

        <File name="pricing-table.tsx" />

        <File name="pricing.tsx" />
      </Folder>

      <Folder name="ui">
        <File name="browser-window.tsx" />
      </Folder>
    </Folder>

    <Folder name="config">
      <File name="fonts.ts" />

      <File name="site.ts" />

      <File name="template.ts" />
    </Folder>
  </Folder>

  <Folder name="public" defaultOpen>
    <Folder name="icons" />

    <Folder name="na-ai" />

    <Folder name="seo" />

    <File name="manifest.webmanifest" />
  </Folder>
</Files>

### Architecture flow

```txt title="architecture-flow.txt"
src/@data
  ↓
components/sections
  ↓
components/layout
  ↓
@pycolors/ui + @pycolors/tokens
```

<DocsConceptTabs
  items={[
  {
    value: 'Data',
    title: 'Data layer',
    icon: Database,
    description: (
      <>
        <p>
          The data layer owns structured content, pricing values, navigation labels, FAQ items, testimonials, and section configuration.
        </p>

        <div className="mt-4 flex flex-wrap gap-2">
          <Badge variant="outline">Content ownership</Badge>
          <Badge variant="outline">Pricing configuration</Badge>
          <Badge variant="outline">Navigation structure</Badge>
          <Badge variant="outline">FAQ and testimonials</Badge>
        </div>
      </>
    ),
  },
  {
    value: 'Sections',
    title: 'Section layer',
    icon: LayoutTemplate,
    description: (
      <>
        <p>
          The section layer renders the product blocks that compose the landing page experience and conversion flow.
        </p>

        <div className="mt-4 flex flex-wrap gap-2">
          <Badge variant="outline">Hero sections</Badge>
          <Badge variant="outline">Pricing sections</Badge>
          <Badge variant="outline">Feature blocks</Badge>
          <Badge variant="outline">Conversion surfaces</Badge>
        </div>
      </>
    ),
  },
  {
    value: 'Layout',
    title: 'Layout layer',
    icon: Layers3,
    description: (
      <>
        <p>
          The layout layer controls navbar, footer, section framing, theme provider, and shared page composition.
        </p>

        <div className="mt-4 flex flex-wrap gap-2">
          <Badge variant="outline">Navbar</Badge>
          <Badge variant="outline">Footer</Badge>
          <Badge variant="outline">Theme provider</Badge>
          <Badge variant="outline">Global layout</Badge>
        </div>
      </>
    ),
  },
  {
    value: 'UI',
    title: 'UI primitives',
    icon: Sparkles,
    description: (
      <>
        <p>
          UI primitives come from <code>@pycolors/ui</code> while visual consistency comes from <code>@pycolors/tokens</code>.
        </p>

        <div className="mt-4 flex flex-wrap gap-2">
          <Badge variant="outline">Semantic tokens</Badge>
          <Badge variant="outline">Shared primitives</Badge>
          <Badge variant="outline">Consistent spacing</Badge>
          <Badge variant="outline">Light and dark mode</Badge>
        </div>
      </>
    ),
  },

]}
/>

## Data directory

| File               | Responsibility                                 |
| ------------------ | ---------------------------------------------- |
| `hero.ts`          | Hero copy, CTA, badges, and visual content     |
| `features.ts`      | AI analytics feature cards and section content |
| `integrations.ts`  | Integration categories and integration cards   |
| `pricing.ts`       | Pricing plans and billing toggle content       |
| `pricing-table.ts` | Pricing comparison rows                        |
| `customers.ts`     | Testimonials and customer proof                |
| `faq.ts`           | FAQ content                                    |
| `contact.ts`       | Contact form copy and goal options             |
| `cta.ts`           | Final conversion section                       |
| `navbar.ts`        | Navigation links                               |
| `footer.ts`        | Footer links and footer copy                   |

<Callout title="Customization rule">
  Change data first. Edit section components only when the current structure no
  longer supports the product story.
</Callout>

## Add a new section

<Steps>
  <Step>
    ### Create the data file

    ```bash title="terminal"
    touch src/@data/use-cases.ts
    ```
  </Step>

  <Step>
    ### Create the section component

    ```bash title="terminal"
    touch src/components/sections/use-cases.tsx
    ```
  </Step>

  <Step>
    ### Compose the section inside the page

    ```tsx title="src/app/page.tsx"
    import { UseCasesSection } from "@/components/sections/use-cases";

    export default function Page() {
      return <UseCasesSection />;
    }
    ```
  </Step>
</Steps>

## Recommended architecture rules

<PreferAvoid
  prefer={[
  "data-driven content",
  "small section components",
  "shared PyColors primitives",
  "semantic tokens",
  "isolated template-specific UI",
]}
  avoid={[
  "hardcoding all copy in components",
  "putting backend logic in sections",
  "duplicating layout wrappers",
  "removing token imports",
  "forking shared UI primitives unnecessarily",
]}
/>

### Why this structure scales

As landing pages grow, problems usually come from unclear boundaries:

* copy mixed with layout logic
* duplicated sections
* inconsistent spacing
* scattered pricing values
* disconnected SEO assets
* uncontrolled visual overrides

This structure reduces those problems by keeping responsibilities separate from the beginning.

<Callout title="Scaling principle">
  A good landing page architecture should make iteration cheaper over time, not
  more fragile.
</Callout>

## Common questions

<Accordions type="single">
  <Accordion title="Why keep content in src/@data?">
    It keeps section components focused on presentation and makes the landing page easier to customize quickly.
  </Accordion>

  <Accordion title="Can I move data elsewhere?">
    Yes. Keep the same separation: content should stay independent from
    presentational components.
  </Accordion>

  <Accordion title="Can I connect a CMS?">
    Yes. Replace the local data source gradually while keeping section components
    stable.
  </Accordion>

  <Accordion title="Can I remove PyColors UI?">
    You can, but it is usually not recommended unless you want to rebuild the UI foundation yourself.
  </Accordion>
</Accordions>

## Next steps

<DocsLinks
  variant="grid"
  items={[
  {
    title: "Customization",
    href: "/docs/templates/na-ai-landing/customization",
    description: "Update copy, sections, branding, SEO metadata, and assets.",
    icon: Palette,
  },
  {
    title: "Deployment",
    href: "/docs/templates/na-ai-landing/deployment",
    description: "Deploy the landing page to production after customization.",
    icon: Rocket,
  },
]}
/>