Add private health tracker (owner-only)

- health schema: vaccinations, body_measurements, workouts, nutrition_daily,
  sleep (generated hours), medications, hair_progress, appointments
- migration with updated_at triggers; grants to personal_app only
- /trackers/health overview with add/edit/delete, owner-gated (404 otherwise),
  noindex + private no-store, hidden from listings for non-owners
- owner-only JSON/CSV import endpoint and scripts/health-import.ts
This commit is contained in:
2026-10-24 00:14:07 +00:00
parent 88837af624
commit 8275f1fb22
24 changed files with 13622 additions and 14 deletions

View File

@@ -7,7 +7,7 @@
import { getSeo } from '#lib/seo.js';
import CopyButton from '#lib/components/CopyButton.svelte';
import ProjectIcon from '#lib/components/ProjectIcon.svelte';
import { projects, trackers } from '#lib/projects.js';
import { projects, visibleTrackers } from '#lib/projects.js';
import { Button, buttonVariants } from '#lib/components/ui/button/index.js';
import * as Sheet from '#lib/components/ui/sheet/index.js';
import ArrowRight from 'lucide-svelte/icons/arrow-right';
@@ -42,13 +42,11 @@
{ label: 'blog', href: '/blog' },
{ label: 'lists', href: '/lists' }
] as const;
const menus: Record<
string,
{ label: string; items: readonly (typeof projects | typeof trackers)[number][] }
> = {
type MenuItem = { name: string; subtitle: string; href: string; external: boolean };
const menus: Record<string, { label: string; items: readonly MenuItem[] }> = $derived({
'/projects': { label: 'projects', items: projects },
'/trackers': { label: 'trackers', items: trackers }
};
'/trackers': { label: 'trackers', items: visibleTrackers(data.isOwner) }
});
const socialLinks = [
{ icon: SiMail, label: 'email', href: 'mailto:stan@stanrunge.dev' },
{ icon: SiGithub, label: 'github', href: 'https://github.com/stanrunge' },