Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Deploy site to GitHub Pages

on:
push:
branches: [master, main]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./site
steps:
- uses: actions/checkout@v7
- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: 22
cache: 'npm'
cache-dependency-path: site/package-lock.json
- name: Install dependencies
run: npm ci
- name: Typecheck
run: npm run typecheck
- name: Build (static export)
run: npm run build
env:
GITHUB_ACTIONS: 'true'
- name: Setup Pages
uses: actions/configure-pages@v6
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./site/out

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,9 @@ data/
*~
tests/**/*.js.map
tests/**/*.d.ts.map

# site/ (Next.js landing page)
site/.next/
site/out/
site/node_modules/
site/.turbo/
8 changes: 0 additions & 8 deletions _config.yml

This file was deleted.

6 changes: 0 additions & 6 deletions assets/favicon.svg

This file was deleted.

7 changes: 0 additions & 7 deletions assets/logo.svg

This file was deleted.

19 changes: 0 additions & 19 deletions index.md

This file was deleted.

3 changes: 3 additions & 0 deletions site/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["next/core-web-vitals", "next/typescript"]
}
61 changes: 61 additions & 0 deletions site/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# FleetPilot landing page

The premium product marketing site for [FleetPilot](https://github.com/sachncs/fleetpilot). Built with Next.js (App Router) + Tailwind CSS v4 + Framer Motion, statically exported for GitHub Pages.

## Stack

| Concern | Choice |
| --- | --- |
| Framework | Next.js 15 (App Router, static export) |
| Styling | Tailwind CSS v4 (custom design tokens in `app/globals.css`) |
| Motion | Framer Motion (subtle entrance + reduced-motion fallbacks) |
| Icons | `lucide-react` |
| Type system | TypeScript 5.7 |

## Local development

```bash
npm install
npm run dev # http://localhost:3001 (Turbopack)
npm run typecheck # tsc --noEmit
npm run build # static export → ./out
```

The dev server runs at `http://localhost:3001` so it never collides with the `frontend/` console app on `:3000`.

## Deployment

Pushing to `master` triggers `.github/workflows/pages.yml`, which:

1. Installs deps inside `site/`
2. Runs `npm run typecheck` and `npm run build`
3. Uploads `./site/out/` as a GitHub Pages artifact
4. Publishes to `https://sachncs.github.io/fleetpilot/`

The build uses `output: 'export'` with a basePath derived from `GITHUB_REPOSITORY` so the output works correctly under the project-page subpath on GitHub Pages.

## Layout

```
site/
├── app/
│ ├── layout.tsx # html shell, metadata, theme provider, nav, footer
│ ├── page.tsx # home composition
│ ├── not-found.tsx # 404 page
│ └── globals.css # Tailwind v4 tokens, utilities, animations
├── components/ # hero, features, how-it-works, algorithms, benchmarks, code-preview, cta, site-nav, site-footer, theme-provider
├── lib/utils.ts # cn(), formatters
├── public/ # favicon.svg, logo.svg, manifest.json, og.png, robots.txt
├── next.config.mjs
├── postcss.config.mjs
├── tsconfig.json
└── package.json
```

## Conventions

- One component per file; `components/<name>.tsx`
- `'use client'` only where state, refs, or browser APIs are required
- All design tokens live in `app/globals.css` — no ad-hoc colors in components
- Animations respect `prefers-reduced-motion`
- Layout is responsive at `sm`, `md`, `lg` breakpoints with no horizontal scroll on mobile
Loading
Loading