# Setup

import { Callout } from "fumadocs-ui/components/callout";
import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
import { Step, Steps } from "fumadocs-ui/components/steps";
import { Badge } from "@pycolors/ui";
import {
  Palette,
  Rocket,
  Terminal,
} 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";

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

  <Badge>
    Setup
  </Badge>
</div>

## Run NA-AI Landing locally

After purchase, you receive a ZIP package containing the full source code and documentation.

The template is designed to work:

* as a standalone project
* outside the private PyColors monorepo
* after ZIP download
* on Vercel
* in production environments

<DocsUpgradeCTA title="Go from ZIP download to running app quickly." description="NA-AI Landing is designed to be runnable, inspectable, and customizable without requiring access to the private PyColors monorepo." productSlug="na-ai-landing" buyLabel="Get NA-AI Landing — €49" secondaryHref="/docs/templates/na-ai-landing/customization" secondaryLabel="Customization guide" />

<Callout title="Core idea">
  The template should be runnable, inspectable, and customizable without requiring access to the private PyColors monorepo.
</Callout>

### Requirements

| Tool            | Recommended |
| --------------- | ----------- |
| Node.js         | 20+         |
| Package manager | pnpm        |
| Framework       | Next.js 16+ |
| Deployment      | Vercel      |

## Quick start

<Steps>
  <Step>
    ### Unzip the package

    ```bash title="terminal"
    unzip na-ai-landing.zip
    cd na-ai-landing
    ```
  </Step>

  <Step>
    ### Install dependencies

    ```bash title="terminal"
    pnpm install
    ```
  </Step>

  <Step>
    ### Run the development server

    ```bash title="terminal"
    pnpm dev
    ```

    Open:

    ```txt title="browser"
    http://localhost:3000
    ```
  </Step>

  <Step>
    ### Build for production

    ```bash title="terminal"
    pnpm build
    ```
  </Step>

  <Step>
    ### Start the production server

    ```bash title="terminal"
    pnpm start
    ```
  </Step>
</Steps>

### Included setup foundations

<DocsFeatureGrid
  columns={2}
  tone="platform"
  items={[
  {
    title: 'Standalone structure',
    icon: Terminal,
    description:
      'The template runs independently after ZIP extraction without requiring the private PyColors monorepo.',
  },
  {
    title: 'Production-ready frontend stack',
    icon: Rocket,
    description:
      'Next.js 16+, TypeScript, Tailwind CSS v4, PyColors UI, and PyColors Tokens configured together.',
  },
  {
    title: 'Frontend-only setup',
    icon: Palette,
    description:
      'No authentication, Stripe, database, or backend configuration is required to run the base template.',
  },
  {
    title: 'Deployment-ready baseline',
    icon: Rocket,
    description:
      'Optimized for Vercel deployment and production-oriented frontend workflows.',
  },
]}
/>

## Scripts

| Command        | Purpose                          |
| -------------- | -------------------------------- |
| `pnpm install` | Install project dependencies     |
| `pnpm dev`     | Run the local development server |
| `pnpm build`   | Build for production             |
| `pnpm start`   | Start the production server      |

## Environment variables

NA-AI Landing is frontend-only by design.

It does not require environment variables for:

* authentication
* database
* Stripe
* email
* CMS

You can add your own variables later if you connect:

* APIs
* forms
* analytics
* backend services

<Callout type="info" title="Frontend-only">
  No backend configuration is required to run the base template.
</Callout>

### Verify PyColors packages

NA-AI Landing uses the public PyColors packages:

```txt title="packages"
@pycolors/ui
@pycolors/tokens
```

The global stylesheet imports the shared token package:

```css title="globals.css"
@import "@pycolors/tokens/tokens.css";
@import "tailwindcss";
```

Tailwind CSS v4 also scans the installed UI package:

```css title="globals.css"
@source "../../node_modules/@pycolors/ui";
```

## Setup checklist

<PreferAvoid
  preferTitle="Confirm working setup"
  avoidTitle="Avoid early changes"
  prefer={[
  'dependencies install successfully',
  'local server starts',
  'homepage renders correctly',
  'dark and light mode work properly',
  'production build passes',
]}
  avoid={[
  'deleting data files before reading them',
  'changing token imports too early',
  'rewriting layouts before updating copy',
  'adding backend logic inside section components',
  'removing SEO assets before replacing them',
]}
/>

### Recommended workflow

A high-leverage setup path usually looks like this:

1. install dependencies
2. run the template locally
3. validate production build
4. update branding and copy
5. customize data files
6. connect APIs only if needed
7. deploy publicly

This reduces unnecessary complexity early in the project lifecycle.

<Callout title="Architecture rule">
  Landing page sections should stay presentational.
  Put API wiring, form handling, and service integration in dedicated modules.
</Callout>

## Common issues

<Accordions type="single">
  <Accordion title="Styles look incomplete">
    Check that the global stylesheet imports PyColors Tokens and that Tailwind scans `@pycolors/ui`.
  </Accordion>

  <Accordion title="The project builds locally but not on Vercel">
    Confirm your package manager and Node.js version match the expected runtime. Ensure the project is deployed from the root folder containing the Next.js app.
  </Accordion>

  <Accordion title="I want to connect a backend">
    The base template is frontend-only. Keep backend logic outside the presentational section components.
  </Accordion>

  <Accordion title="Can I use another package manager?">
    Yes, but the default setup and documentation are optimized around pnpm workflows.
  </Accordion>
</Accordions>

## Next steps

<DocsLinks
  variant="grid"
  items={[
  {
    title: 'Customization',
    href: '/docs/templates/na-ai-landing/customization',
    description:
      'Update content, branding, sections, SEO metadata, and product assets.',
    icon: Palette,
  },
  {
    title: 'Deployment',
    href: '/docs/templates/na-ai-landing/deployment',
    description:
      'Deploy the template to Vercel and connect a production domain.',
    icon: Rocket,
  },
]}
/>