|
| 1 | +# Changelog Hub (Astro 5, SSR) |
| 2 | + |
| 3 | +A server-rendered changelog site built with Astro 5 and the Node adapter. No analytics — this app |
| 4 | +is a clean target for the PostHog wizard. |
| 5 | + |
| 6 | +## Features |
| 7 | + |
| 8 | +- Release list rendered on the server, newest first |
| 9 | +- Release detail pages at `/releases/:slug` |
| 10 | +- 👍 reactions on a release, posted from a small inline client script |
| 11 | +- Email subscribe form backed by an API endpoint |
| 12 | + |
| 13 | +## Tech stack |
| 14 | + |
| 15 | +- Astro 5 (`output: 'server'`) |
| 16 | +- `@astrojs/node` standalone adapter |
| 17 | +- TypeScript |
| 18 | +- No UI framework — plain Astro components and inline scripts |
| 19 | + |
| 20 | +## Getting started |
| 21 | + |
| 22 | +```bash |
| 23 | +pnpm install |
| 24 | +pnpm dev |
| 25 | +``` |
| 26 | + |
| 27 | +Open http://localhost:4321. |
| 28 | + |
| 29 | +## Routes |
| 30 | + |
| 31 | +| Route | Description | |
| 32 | +|---|---| |
| 33 | +| `/` | Release list, reactions, subscribe form | |
| 34 | +| `/releases/[slug]` | Release detail with full notes | |
| 35 | +| `/about` | Static about page | |
| 36 | +| `POST /api/subscribe` | Subscribe an email — `{ "email": "you@example.com" }` | |
| 37 | +| `POST /api/releases/[slug]/react` | Add a reaction, returns the updated release | |
| 38 | + |
| 39 | +## Project structure |
| 40 | + |
| 41 | +``` |
| 42 | +src/ |
| 43 | +├── layouts/Layout.astro # Document shell and global styles |
| 44 | +├── lib/releases.ts # In-memory releases and subscribers |
| 45 | +└── pages/ |
| 46 | + ├── index.astro # Release list + client script |
| 47 | + ├── about.astro |
| 48 | + ├── releases/[slug].astro |
| 49 | + └── api/ |
| 50 | + ├── subscribe.ts |
| 51 | + └── releases/[slug]/react.ts |
| 52 | +``` |
| 53 | + |
| 54 | +## Notes |
| 55 | + |
| 56 | +- Releases, reactions, and subscribers live in memory and reset on every server restart |
| 57 | +- Seeded with three releases |
0 commit comments