Initial commit

This commit is contained in:
2026-02-10 01:25:57 +01:00
commit 7020a6a339
53 changed files with 1503 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
@import "tailwindcss";
:root {
--background: #fafafa;
--foreground: #111111;
}
body {
background: var(--background);
color: var(--foreground);
font-family: "Geist", "Segoe UI", sans-serif;
}

View File

@@ -0,0 +1,20 @@
import type { Metadata } from "next"
import type { ReactNode } from "react"
import "./globals.css"
import { Providers } from "./providers"
export const metadata: Metadata = {
title: "CMS Admin",
description: "Admin dashboard for the CMS monorepo",
}
export default function RootLayout({ children }: { children: ReactNode }) {
return (
<html lang="en">
<body>
<Providers>{children}</Providers>
</body>
</html>
)
}

View File

@@ -0,0 +1,39 @@
import { listPosts } from "@cms/db"
import { Button } from "@cms/ui/button"
export const dynamic = "force-dynamic"
export default async function AdminHomePage() {
const posts = await listPosts()
return (
<main className="mx-auto flex min-h-screen w-full max-w-4xl flex-col gap-8 px-6 py-16">
<header className="space-y-3">
<p className="text-sm uppercase tracking-[0.2em] text-neutral-500">Admin App</p>
<h1 className="text-4xl font-semibold tracking-tight">Content Dashboard</h1>
<p className="text-neutral-600">Manage posts from a dedicated admin surface.</p>
</header>
<section className="rounded-xl border border-neutral-200 p-6">
<div className="mb-4 flex items-center justify-between">
<h2 className="text-xl font-medium">Posts</h2>
<Button>Create post</Button>
</div>
<div className="space-y-3">
{posts.map((post) => (
<article key={post.id} className="rounded-lg border border-neutral-200 p-4">
<div className="flex items-center justify-between gap-3">
<h3 className="text-lg font-medium">{post.title}</h3>
<span className="rounded-full bg-neutral-100 px-3 py-1 text-xs uppercase tracking-wide">
{post.status}
</span>
</div>
<p className="mt-2 text-sm text-neutral-600">{post.slug}</p>
</article>
))}
</div>
</section>
</main>
)
}

View File

@@ -0,0 +1,9 @@
"use client"
import type { ReactNode } from "react"
import { QueryProvider } from "@/providers/query-provider"
export function Providers({ children }: { children: ReactNode }) {
return <QueryProvider>{children}</QueryProvider>
}