> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wrixton.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Deploying War.re: Vercel and Next.js Static Export

> War.re and ryan.war.re are deployed as two independent static Next.js apps on Vercel, each built with yarn build and served as pure HTML.

War.re is deployed as two fully independent Vercel projects — one for the main site at `war.re` and one for the resume subdomain at `ryan.war.re`. Both apps use Next.js static export, which means `yarn build` compiles each app down to a self-contained `out/` directory of plain HTML, CSS, and JavaScript. Vercel picks up that directory and serves it directly with no Node.js runtime, no server-side rendering, and no API routes at runtime.

## Architecture

Each app in the monorepo is its own isolated unit with its own `package.json`, `yarn.lock`, and build pipeline. Neither app shares dependencies with the other, and neither depends on the other being deployed. Vercel treats them as separate projects connected to the same GitHub repository, each triggered by changes to its own subdirectory.

| App       | Directory          | Domain        | Production URL          |
| --------- | ------------------ | ------------- | ----------------------- |
| Main site | `main/`            | `war.re`      | `https://war.re/n`      |
| Resume    | `subdomains/ryan/` | `ryan.war.re` | `https://ryan.war.re/n` |

The root path `/` on both domains performs a static meta-refresh to `/n`. There are no server rewrites — the redirect is baked into the exported HTML at build time using a `<meta http-equiv="refresh">` tag in `pages/index.tsx`.

## Build and Deploy Process

<Steps>
  <Step title="Run yarn build">
    Inside either app's directory, run `yarn build`. Next.js compiles the app with `output: 'export'` and writes the fully static output to the `out/` directory. No server is needed after this point.

    ```bash theme={null}
    # For the main site
    cd main && yarn build

    # For the resume subdomain
    cd subdomains/ryan && yarn build
    ```
  </Step>

  <Step title="Vercel picks up the out/ directory">
    Vercel is configured to treat `out/` as the publish directory for each project. When a push lands on the `main` branch, Vercel runs the build command and serves whatever ends up in `out/` as static assets on its CDN.
  </Step>

  <Step title="Deploy goes live">
    Once the build succeeds, Vercel promotes the deployment to production automatically. The CDN edge nodes propagate the new assets globally. Because the output is entirely static, there is no warm-up period or cold-start latency.
  </Step>
</Steps>

<Note>
  Static export means no Next.js API routes, no server-side rendering (`getServerSideProps`), and no middleware runs at request time. All data must be available at build time or fetched client-side after the page loads.
</Note>

## Continuous Integration

Every push to `main` triggers the CI workflow, which runs tests, linting, type-checking, and a production build for any app that was changed. CI must pass before a deployment is considered healthy.

## Domain Setup

Both Vercel projects point to the same GitHub repository. Vercel differentiates them by the **Root Directory** setting configured in each project's Vercel dashboard:

* The **main site** project has its root directory set to `main/`
* The **resume** project has its root directory set to `subdomains/ryan/`

DNS for `war.re` and `ryan.war.re` points to Vercel's nameservers. Vercel handles TLS termination and CDN distribution for both domains automatically.
