+ {project.name} +
+ {favorite ? ( ++ {project.summary ? truncate(project.summary, 140) : "Noch keine Kurzbeschreibung."} +
+diff --git a/src/app/page.tsx b/src/app/page.tsx new file mode 100644 index 0000000..6565f73 --- /dev/null +++ b/src/app/page.tsx @@ -0,0 +1,94 @@ +import { CircleDot, GitBranch, Lightbulb, Rocket, Trophy } from "lucide-react"; +import { ProjectBoard } from "@/components/ProjectBoard"; +import { StatCard } from "@/components/StatCard"; +import { prisma } from "@/lib/db"; +import { connectionSafeSelect, projectListInclude } from "@/lib/projects"; +import { STATUS_META } from "@/lib/status"; +import type { ConnectionSafe, ProjectListItem } from "@/types"; + +export const dynamic = "force-dynamic"; + +export default async function DashboardPage() { + const [projects, connections] = await Promise.all([ + prisma.project.findMany({ + include: projectListInclude, + orderBy: [{ favorite: "desc" }, { updatedAt: "desc" }], + }), + prisma.gitConnection.findMany({ + select: connectionSafeSelect, + orderBy: { name: "asc" }, + }), + ]); + + const active = projects.filter((project) => project.status !== "ARCHIVED"); + const ideas = active.filter((project) => project.status === "IDEA").length; + const inDev = active.filter((project) => project.status === "IN_DEVELOPMENT").length; + const done = active.filter((project) => project.status === "DONE").length; + const linked = active.filter((project) => Boolean(project.repoOwner && project.repoName)).length; + + const averageProgress = + active.length > 0 + ? Math.round(active.reduce((sum, project) => sum + project.progress, 0) / active.length) + : 0; + + return ( +
+ Vibe Coding Kontrollzentrum +
++ Ideen festhalten, Status pflegen, Notizen sammeln – und live sehen, was in den + verknuepften Repositories bei GitHub, GitLab und Gitea passiert. +
++ {hasFilters + ? "Kein Projekt passt zu Suche und Filtern. Filter anpassen oder zuruecksetzen." + : "Leg deine erste Idee an – Beschreibung, Repo und Status kannst du jederzeit nachziehen."} +
++ {project.summary ? truncate(project.summary, 140) : "Noch keine Kurzbeschreibung."} +
++ {label} +
+{value}
+ {hint ?{hint}
: null} +