diff --git a/app/page.tsx b/app/page.tsx index 3f36f7c..99118b6 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -1,65 +1,43 @@ -import Image from "next/image"; +import Link from 'next/link' +import { redirect } from 'next/navigation' +import { getCurrentUser } from '@/lib/session' + +export const dynamic = 'force-dynamic' + +const SECTIONS = [ + { href: '/docker', title: 'Docker', desc: 'Containers en status' }, + { href: '/git', title: 'Git', desc: 'Repo checkouts en diffs' }, + { href: '/systemd', title: 'systemd', desc: 'Services en journals' }, + { href: '/caddy', title: 'Caddy', desc: 'Config en certs' }, + { href: '/flows', title: 'Flows', desc: 'Multi-step deployments' }, + { href: '/audit', title: 'Audit', desc: 'Command-log en runs' }, + { href: '/settings', title: 'Settings', desc: 'Backups en config' }, +] + +export default async function Home() { + const user = await getCurrentUser() + if (!user) redirect('/login') -export default function Home() { return ( -
-
- Next.js logo -
-

- To get started, edit the page.tsx file. -

-

- Looking for a starting point or more instructions? Head over to{" "} - - Templates - {" "} - or the{" "} - - Learning - {" "} - center. -

+
+
+
+

Ops Dashboard

+

Welkom {user.email}

-
- - Vercel logomark - Deploy Now - - - Documentation - +
+ {SECTIONS.map((s) => ( + +

{s.title}

+

{s.desc}

+ + ))}
-
+
- ); + ) }