feat: add changelog and versioning, surface it in admin

Bumps version to 0.2.0 (root + apps/web package.json) and adds
CHANGELOG.md as the canonical human-readable history, mirrored by
apps/web/lib/changelog.ts as the in-app data source (single
ChangelogList component renders both).

- /changelog: user-facing page, linked from the account dropdown.
- /admin/changelog: same list, plus a "Version" card on the admin
  overview dashboard linking to it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Arnaud
2026-07-12 12:06:07 +02:00
parent 2682eba2be
commit 83d18f5ad4
12 changed files with 169 additions and 5 deletions
+19 -1
View File
@@ -1,9 +1,11 @@
import type { Metadata } from "next";
import Link from "next/link";
import { db } from "@epicure/db";
import { users, recipes, userUsage, recipePhotos } from "@epicure/db";
import { count, eq, sql } from "@epicure/db";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { Users, BookOpen, Sparkles, Image } from "lucide-react";
import { Users, BookOpen, Sparkles, Image, History } from "lucide-react";
import { APP_VERSION, CHANGELOG } from "@/lib/changelog";
export const metadata: Metadata = {};
@@ -46,6 +48,22 @@ export default async function AdminPage() {
</Card>
))}
</div>
<Card>
<CardHeader className="flex flex-row items-center justify-between pb-2">
<CardTitle className="text-sm font-medium text-muted-foreground">Version</CardTitle>
<History className="h-4 w-4 text-muted-foreground" />
</CardHeader>
<CardContent>
<div className="text-2xl font-bold">v{APP_VERSION}</div>
<p className="text-xs text-muted-foreground mt-1">
Released {CHANGELOG[0]?.date} ·{" "}
<Link href="/admin/changelog" className="underline hover:text-foreground">
View changelog
</Link>
</p>
</CardContent>
</Card>
</div>
);
}