|
1 | | -This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). |
| 1 | +# AICommit — Landing Page |
2 | 2 |
|
3 | | -## Getting Started |
| 3 | +Marketing site for **[AICommit](https://aicommit.app)** — a JetBrains IDE plugin that generates |
| 4 | +git commit messages from your staged diff. Live at **https://aicommit.app**. |
4 | 5 |
|
5 | | -First, run the development server: |
| 6 | +Built with **Next.js 15** (Pages Router) + TypeScript + **Tailwind CSS**, with `framer-motion` |
| 7 | +for animation and self-hosted **Zed Sans / Zed Mono** fonts via `next/font/local`. Deployed on |
| 8 | +**Cloudflare Pages**. |
| 9 | + |
| 10 | +## Getting started |
6 | 11 |
|
7 | 12 | ```bash |
8 | | -npm run dev |
9 | | -# or |
10 | | -yarn dev |
11 | | -# or |
12 | | -pnpm dev |
| 13 | +npm install |
| 14 | +npm run dev # http://localhost:3000 |
13 | 15 | ``` |
14 | 16 |
|
15 | | -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. |
16 | | - |
17 | | -You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file. |
| 17 | +Edit the home page from `pages/index.tsx`; the sections live in `components/landing/*`. |
| 18 | +Node ≥ 18 (see `.node-version`). |
18 | 19 |
|
19 | | -[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`. |
| 20 | +### Scripts |
20 | 21 |
|
21 | | -The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. |
| 22 | +| Script | What it does | |
| 23 | +| --- | --- | |
| 24 | +| `npm run dev` | Local dev server | |
| 25 | +| `npm run build` | Production build | |
| 26 | +| `npm run lint` | ESLint (`next/core-web-vitals`) | |
| 27 | +| `npm run test:seo` | Builds, then asserts the SEO output — SSR metadata, JSON-LD, `robots.txt`, `sitemap.xml`, the agent-readable files, and the `next.config.js` headers/redirects | |
22 | 28 |
|
23 | | -This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. |
| 29 | +## Deployment — Cloudflare Pages |
24 | 30 |
|
25 | | -## Learn More |
| 31 | +Deployed to **Cloudflare Pages** via its GitHub integration: every push to `main` triggers a |
| 32 | +build on Cloudflare's side. (The build/deploy check you see on commits and PRs is the Cloudflare |
| 33 | +Pages deployment — there are no GitHub Actions workflows in this repo.) |
26 | 34 |
|
27 | | -To learn more about Next.js, take a look at the following resources: |
| 35 | +The build runs through **[`@cloudflare/next-on-pages`](https://github.com/cloudflare/next-on-pages)**, |
| 36 | +which adapts the Next.js output to the Pages runtime and translates `next.config.js` `redirects()` |
| 37 | +and `headers()` into Cloudflare routing — so the **www → apex 301**, the `X-Robots-Tag: noindex` |
| 38 | +on the agent files, and the long-lived cache headers all originate from `next.config.js`. |
28 | 39 |
|
29 | | -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. |
30 | | -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. |
| 40 | +**Cloudflare Pages project settings:** |
31 | 41 |
|
32 | | -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! |
| 42 | +| Setting | Value | |
| 43 | +| --- | --- | |
| 44 | +| Build command | `npx @cloudflare/next-on-pages` | |
| 45 | +| Build output directory | `.vercel/output/static` | |
| 46 | +| Compatibility flags | `nodejs_compat` | |
33 | 47 |
|
34 | | -## Deploy on Vercel |
| 48 | +Domains: `aicommit.app` (apex) is the Pages custom domain; `www.aicommit.app` 301-redirects to it. |
35 | 49 |
|
36 | | -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. |
| 50 | +## Project layout |
37 | 51 |
|
38 | | -Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. |
| 52 | +| Path | Purpose | |
| 53 | +| --- | --- | |
| 54 | +| `pages/index.tsx` | Home page | |
| 55 | +| `pages/404.tsx` | Branded git-terminal 404 (see `components/notfound/README.md`) | |
| 56 | +| `components/landing/` | Page sections (`Hero`, `Features`, `Reviews`, …) | |
| 57 | +| `components/ui/` | Shared UI bits | |
| 58 | +| `lib/seo.ts` | Titles, description, FAQ, and the JSON-LD structured data | |
| 59 | +| `public/` | `robots.txt`, `sitemap.xml`, OG image, fonts, and agent-readable resources (`llms.txt`, `llms-full.txt`, `index.md`, `.well-known/ai-agent.json`) | |
| 60 | +| `tests/seo-output.test.mjs` | Guards the SEO / structured-data output | |
0 commit comments