Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
5b3b808
tool(antigravity): implement complete ARK application with Next.js
Dec 20, 2025
cb2f764
tool(antigravity): implement complete ARK app with PWA, AI, and Premi…
Dec 20, 2025
1957935
tool(antigravity): localize application to German
Dec 20, 2025
75d9ec8
fix(frontend): implement real CSS modules and fix next config
Dec 20, 2025
c3c5d6f
fix: middleware to proxy migration and rating api
Dec 20, 2025
2ae6ae5
feat: implement url-based identity and complete tracking
Dec 20, 2025
615ac29
fix: auth proxy matcher and onboarding styles
Dec 20, 2025
f8daa17
feat: implement user settings overlay and ui polish
Dec 20, 2025
0f08cc2
feat: responsive layout 100dvh vmin
Dec 20, 2025
0a8a9b4
feat: content enrichment concepts and author logic
Dec 20, 2025
67c045a
feat: interactive concepts and overlay
Dec 20, 2025
5f77521
fix(ai): tune temp and prompt for subtlety; fix(ui): repair highlight…
Dec 20, 2025
29f97ca
fix(ui): explicit input contrast; fix(backend): add detailed ai logs
Dec 20, 2025
5f540fd
fix(debug): add verbose logging and force dynamic rendering
Dec 20, 2025
6b7ae6a
fix(logic): invalidate daily view on profile update to ensure freshness
Dec 20, 2025
ea36b1c
fix(ai): remove biased examples from prompt to increase variety
Dec 20, 2025
d8de11a
feat(ai): add Veit Lindau style modes (Questions/Impulses)
Dec 20, 2025
dec6aa8
feat(history): add archive page with favorites filter; fix(ui): landi…
Dec 20, 2025
4f73e60
fix(auth): switch user session cookie on name change for correct data…
Dec 21, 2025
6b076ec
feat(admin): implement user-specific AI configuration backend
Dec 21, 2025
a38f02e
feat(admin): enhance admin ui, prompt preview, history inspector, and…
Dec 22, 2025
8acef7b
fix(admin): install tailwind for admin ui and fix user inspector feat…
Dec 22, 2025
77ec568
fix(interaction): prevent duplicate favorites and visualize liked state
Dec 22, 2025
f7251cc
gitignore update by CP
Dec 22, 2025
c6396c3
fix(interaction): robust user id retrieval in rate api
Dec 22, 2025
badae92
fix(core): ensure middleware is correctly named for next.js
Dec 22, 2025
bf146d3
fix(core): correctly export middleware function
Dec 22, 2025
fba243e
fix(build): resolve tailwind v4 postcss error and revert middleware n…
Dec 22, 2025
6f76609
fix(ui): import admin styles in layout to enable tailwind
Dec 22, 2025
f9f5d8f
fix(ui): add manual admin css reset to resolve preflight issues
Dec 22, 2025
a4116d1
fix(ui): implement robust css reset for admin forms and polishing
Dec 22, 2025
23e5118
style(admin): implement premium dark theme for admin forms
Dec 22, 2025
9dfb267
refactor(ui): upgrade tailwind css import syntax to v4 alpha compliance
Dec 22, 2025
a9736b9
style(admin): refine spacing, tabs and buttons for premium usage
Dec 22, 2025
5bdf9e2
feat(ai): refactor to master prompt architecture with variable substi…
Dec 22, 2025
5961f3a
refactor(admin): reorder ui components and fix prompt variable substi…
Dec 22, 2025
e2ac1a7
refactor(admin): remove preview, enforce limits, prefill template
Dec 22, 2025
9ab7a7f
feat: polish intro animation, user menu transition, and archive navig…
Dec 23, 2025
78c94d8
DeploymentPrep
Dec 23, 2025
7bc7af4
feat: initialize database schema with User, Quote, DailyView, Rating,…
Dec 23, 2025
0c5f884
feat: Optimize mobile animations, stabilize layout, fix Plesk deployment
Dec 23, 2025
8fcf182
Merge main into tool/antigravity and resolve conflicts (keep ours)
Dec 23, 2025
3f48c9b
chore: Add dotenv dependency for db scripts
Dec 23, 2025
195722d
fix: iOS PWA starting url and assets
Dec 24, 2025
3234b7a
fix: stop tracking dev.db
Dec 24, 2025
70f825d
fix: resolve conflicts, untrack dev.db
Dec 24, 2025
7417ce2
feat(admin): Refactor Dashboard for Collapsible Layout and Activity H…
Dec 31, 2025
aa6b766
fix: actually add PWA icons
Dec 31, 2025
08b34b8
fix: add favicon to public
Dec 31, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tools/antigravity/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ next-env.d.ts
# sqlite
*.db
*.db-journal
**/dev.db
27 changes: 0 additions & 27 deletions tools/antigravity/check-db.mjs

This file was deleted.

Binary file removed tools/antigravity/prisma/dev.db
Binary file not shown.
Binary file added tools/antigravity/public/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tools/antigravity/public/favicon.ico
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions tools/antigravity/src/app/[username]/loading.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import LoadingScreen from "@/components/ui/LoadingScreen";

export default function Loading() {
return <LoadingScreen />;
}
30 changes: 22 additions & 8 deletions tools/antigravity/src/app/[username]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Onboarding from "@/components/Onboarding";
import UserHeader from "@/components/UserHeader";
import AnimatedPageContainer from "@/components/AnimatedPageContainer";
import BackgroundGlow from "@/components/BackgroundGlow";
import IntroSequence from "@/components/ui/IntroSequence";
import { Metadata } from "next";

type Props = {
Expand All @@ -14,15 +15,26 @@ type Props = {
export async function generateMetadata({ params }: Props): Promise<Metadata> {
const { username } = await params;
return {
title: `DARK | ${decodeURIComponent(username)}`,
title: `dArk | ${decodeURIComponent(username)}`,
}
}

export const dynamic = 'force-dynamic';

import { notFound } from "next/navigation";

// ... imports

export default async function UserPage({ params }: Props) {
const { username } = await params;
const decodedName = decodeURIComponent(username);

// Safety Net: Ignore requests that look like files (e.g. missing images)
// This prevents the "UserPage Loading for: apple-touch-icon.png" issue
if (decodedName.match(/\.(png|jpg|jpeg|gif|ico|svg|json|webmanifest)$/i)) {
return notFound();
}

console.log(`[UserPage] Loading for: ${decodedName}`);

// 1. Try to find user by Name
Expand Down Expand Up @@ -52,16 +64,18 @@ export default async function UserPage({ params }: Props) {

return (
<main className="min-h-screen bg-[#050505] text-white font-sans overflow-hidden flex flex-col items-center justify-center p-6 relative">
<BackgroundGlow />
<IntroSequence>
<BackgroundGlow />

<UserHeader user={user} />
<UserHeader user={user} />

<AnimatedPageContainer>
<CalendarLeaf quote={quote} dateStr={now} userId={user.id} />
</AnimatedPageContainer>
<AnimatedPageContainer>
<CalendarLeaf quote={quote} dateStr={now} userId={user.id} />
</AnimatedPageContainer>

{/* Bottom Subtle Reflection */}
<div className="absolute bottom-0 left-0 w-full h-32 bg-gradient-to-t from-amber-500/5 to-transparent pointer-events-none" />
{/* Bottom Subtle Reflection */}
<div className="absolute bottom-0 left-0 w-full h-32 bg-gradient-to-t from-amber-500/5 to-transparent pointer-events-none" />
</IntroSequence>
</main>
);
}
205 changes: 205 additions & 0 deletions tools/antigravity/src/app/admin/dashboard/AdminDashboardUI.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
"use client";

import { useState } from "react";
import { User, Database, Brain, Globe, BookOpen, Quote, ChevronDown, ChevronRight, Clock } from "lucide-react";
import Link from "next/link";
import { motion, AnimatePresence } from "framer-motion";

type DashboardProps = {
users: any[];
systemContext: {
masterPrompt: string;
styleGuides: Record<string, string>;
archetypes: Record<string, string[]>;
instructions: Record<string, string>;
};
systemVersion: string;
};

export default function AdminDashboardUI({ users, systemContext, systemVersion }: DashboardProps) {
// Sections: 'users', 'context', or null (all closed)
const [openSections, setOpenSections] = useState<string[]>([]);

const toggleSection = (id: string) => {
setOpenSections(prev =>
prev.includes(id) ? prev.filter(x => x !== id) : [...prev, id]
);
};

return (
<main className="min-h-screen p-8 max-w-5xl mx-auto text-white">
<header className="flex justify-between items-center mb-12 border-b border-white/10 pb-6">
<h1 className="text-3xl font-serif font-bold tracking-wide">Admin Dashboard</h1>
<div className="flex gap-4 text-xs font-mono text-gray-500">
<span>Users: {users.length}</span>
<span>System: {systemVersion}</span>
</div>
</header>

<div className="flex flex-col gap-6">

{/* SECTION 1: REGISTRIERTE NUTZER */}
<CollapsibleSection
id="users"
title="Registrierte Nutzer"
icon={<User size={20} className="text-purple-300" />}
isOpen={openSections.includes("users")}
onToggle={() => toggleSection("users")}
>
<div className="flex flex-col gap-2">
{users.map((user) => {
const lastView = user.views[0];
const lastDateObj = lastView ? new Date(lastView.date) : null;
const lastDate = lastDateObj ? lastDateObj.toLocaleDateString("de-DE", { day: '2-digit', month: '2-digit', year: 'numeric' }) : "-";

// Check if today
const now = new Date();
const todayStr = now.toLocaleDateString("de-DE", { day: '2-digit', month: '2-digit', year: 'numeric' });
const isToday = lastDate === todayStr;

return (
<Link key={user.id} href={`/admin/user/${user.id}`}>
<div className="p-4 bg-white/5 border border-white/10 rounded-xl hover:bg-white/10 hover:border-purple-500/30 transition-all flex items-center justify-between group">

<div className="flex items-center gap-4">
{/* Avatar */}
<div className="w-10 h-10 rounded-full bg-gradient-to-br from-gray-800 to-black flex items-center justify-center border border-white/5 shrink-0">
<User size={18} className="text-gray-400 group-hover:text-white" />
</div>

{/* Info */}
<div className="overflow-hidden">
<div className="font-bold text-base text-gray-200 group-hover:text-white flex items-center gap-2">
{user.name}
<span className="text-[11px] font-mono text-gray-600 bg-white/5 px-1.5 py-0.5 rounded border border-white/5 group-hover:border-white/10 transition-colors">
{user.id}
</span>
</div>
</div>
</div>

{/* Last Active Date */}
<div className={`flex items-center gap-2 text-xs font-mono ${!isToday ? 'text-amber-500 font-bold' : 'text-gray-500'}`}>
<Clock size={12} className={!isToday ? 'opacity-100' : 'opacity-50'} />
<span>{lastView ? lastDate : "Neu"}</span>
</div>

</div>
</Link>
);
})}
</div>
</CollapsibleSection>

{/* SECTION 2: MASTER SYSTEM CONTEXT */}
<CollapsibleSection
id="context"
title="Master System Context (Read-Only)"
icon={<Brain size={20} className="text-blue-300" />}
isOpen={openSections.includes("context")}
onToggle={() => toggleSection("context")}
>
<div className="grid grid-cols-1 gap-6">

{/* MASTER PROMPT */}
<div className="bg-black/40 border border-white/10 rounded-2xl overflow-hidden">
<div className="bg-white/5 p-4 border-b border-white/10 font-bold text-sm flex items-center gap-2 text-gray-300">
<Quote size={16} /> DEFAULT_MASTER_PROMPT
</div>
<pre className="p-4 text-[11px] font-mono text-gray-400 whitespace-pre-wrap leading-relaxed">
{systemContext.masterPrompt}
</pre>
</div>

{/* STYLE GUIDES */}
<div className="bg-black/40 border border-white/10 rounded-2xl overflow-hidden">
<div className="bg-white/5 p-4 border-b border-white/10 font-bold text-sm flex items-center gap-2 text-gray-300">
<BookOpen size={16} /> CATEGORY_STYLE_GUIDE ({Object.keys(systemContext.styleGuides).length} Categories)
</div>
<div className="p-4 grid grid-cols-1 md:grid-cols-2 gap-4">
{Object.entries(systemContext.styleGuides).map(([cat, guide]) => (
<div key={cat} className="p-3 bg-white/5 rounded-lg border border-white/5">
<div className="text-xs font-bold text-purple-400 mb-2 uppercase">{cat}</div>
<pre className="text-[11px] font-mono text-gray-400 whitespace-pre-wrap">{guide.trim()}</pre>
</div>
))}
</div>
</div>

{/* ARCHETYPES & MODES */}
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
<div className="bg-black/40 border border-white/10 rounded-2xl overflow-hidden">
<div className="bg-white/5 p-4 border-b border-white/10 font-bold text-sm flex items-center gap-2 text-gray-300">
<Globe size={16} /> ARCHETYPES_FOR_MODE
</div>
<div className="p-4 flex flex-col gap-4">
{Object.entries(systemContext.archetypes).map(([mode, list]) => (
<div key={mode}>
<span className="text-xs font-bold text-blue-400 block mb-1">{mode}</span>
<div className="flex flex-wrap gap-1">
{list.map(a => (
<span key={a} className="text-[11px] px-2 py-0.5 bg-white/5 rounded border border-white/5 text-gray-400">{a}</span>
))}
</div>
</div>
))}
</div>
</div>

<div className="bg-black/40 border border-white/10 rounded-2xl overflow-hidden">
<div className="bg-white/5 p-4 border-b border-white/10 font-bold text-sm flex items-center gap-2 text-gray-300">
<Database size={16} /> MODE_INSTRUCTIONS
</div>
<div className="p-4 flex flex-col gap-4">
{Object.entries(systemContext.instructions).map(([mode, instr]) => (
<div key={mode}>
<span className="text-xs font-bold text-pink-400 block mb-1">{mode}</span>
<pre className="text-[11px] font-mono text-gray-400 whitespace-pre-wrap bg-black/20 p-2 rounded">{instr.trim()}</pre>
</div>
))}
</div>
</div>
</div>

</div>
</CollapsibleSection>
</div>
</main>
);
}

function CollapsibleSection({ id, title, icon, isOpen, onToggle, children }: { id: string, title: string, icon: React.ReactNode, isOpen: boolean, onToggle: () => void, children: React.ReactNode }) {
return (
<section className="bg-white/5 border border-white/10 rounded-2xl overflow-hidden">
<button
onClick={onToggle}
className="w-full flex items-center justify-between p-6 hover:bg-white/5 transition-colors text-left"
>
<div className="flex items-center gap-3">
{icon}
<h2 className="text-lg font-bold text-gray-200">{title}</h2>
</div>
{isOpen ? <ChevronDown size={20} className="text-gray-500" /> : <ChevronRight size={20} className="text-gray-500" />}
</button>

<AnimatePresence>
{isOpen && (
<motion.div
initial={{ height: 0, opacity: 0 }}
animate={{ height: "auto", opacity: 1 }}
exit={{ height: 0, opacity: 0 }}
transition={{ duration: 0.3, ease: "easeInOut" }}
className="overflow-hidden"
>
<div className="p-6 pt-0 border-t border-white/5 relative z-10">
{/* Added padding top to separate from header slightly */}
<div className="mt-6">
{children}
</div>
</div>
</motion.div>
)}
</AnimatePresence>
</section>
);
}
58 changes: 27 additions & 31 deletions tools/antigravity/src/app/admin/dashboard/page.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import { prisma } from "@/lib/prisma";
import Link from "next/link";
import { cookies } from "next/headers";
import { redirect } from "next/navigation";
import { User } from "lucide-react";
import AdminDashboardUI from "./AdminDashboardUI";
import {
CATEGORY_STYLE_GUIDE,
ARCHETYPES_FOR_MODE,
MODE_INSTRUCTIONS,
DEFAULT_MASTER_PROMPT
} from "@/lib/ai-service";

export default async function AdminDashboard() {
const cookieStore = await cookies();
Expand All @@ -11,37 +16,28 @@ export default async function AdminDashboard() {
}

const users = await prisma.user.findMany({
orderBy: { updatedAt: 'desc' }
orderBy: { updatedAt: 'desc' },
include: {
views: {
take: 1,
orderBy: { date: 'desc' },
include: { quote: true }
}
}
});

return (
<main className="min-h-screen p-8 max-w-4xl mx-auto">
<h1 className="text-3xl font-serif mb-8 text-white">Admin Dashboard</h1>
const systemContext = {
masterPrompt: DEFAULT_MASTER_PROMPT,
styleGuides: CATEGORY_STYLE_GUIDE,
archetypes: ARCHETYPES_FOR_MODE,
instructions: MODE_INSTRUCTIONS
};

<div className="grid gap-4">
{users.map(user => (
<Link key={user.id} href={`/admin/user/${user.id}`}>
<div className="p-4 bg-gray-900 border border-gray-800 rounded-lg hover:border-gray-600 transition flex items-center justify-between group">
<div className="flex items-center gap-4">
<div className="w-10 h-10 rounded-full bg-gray-800 flex items-center justify-center">
<User size={20} className="text-gray-400 group-hover:text-white" />
</div>
<div>
<div className="font-bold text-lg text-white">{user.name}</div>
<div className="text-xs text-gray-500 font-mono">{user.id}</div>
</div>
</div>
<div className="text-right">
{user.aiConfig ? (
<span className="text-green-400 text-xs px-2 py-1 bg-green-900/30 rounded">Custom AI</span>
) : (
<span className="text-gray-600 text-xs px-2 py-1 bg-gray-900 rounded">Default</span>
)}
</div>
</div>
</Link>
))}
</div>
</main>
return (
<AdminDashboardUI
users={users}
systemContext={systemContext}
systemVersion="v1.1"
/>
);
}
2 changes: 1 addition & 1 deletion tools/antigravity/src/app/admin/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import "../globals.css";
import "./admin.css"; // Ensure global styles are applied

export const metadata: Metadata = {
title: "ARK Admin",
title: "dArk | Adminbereich",
description: "Administrative Backend",
};

Expand Down
Loading