- Rename directory keep-notes -> memento-note with all code references - Prisma: SQLite -> PostgreSQL (both app and MCP server schemas) - Sync MCP schema with main app (add missing fields, relations, indexes) - Delete 17 SQLite migrations (clean slate for PostgreSQL) - Remove SQLite dependencies (@libsql/client, better-sqlite3, etc.) - Fix MCP server: hardcoded Windows DB paths -> DATABASE_URL env var - Fix MCP server: .dockerignore excluded index-sse.js (SSE mode broken) - MCP Dockerfile: node:20 -> node:22 - Docker Compose: add postgres service, remove SQLite volume - Generate favicon.ico, icon-192.png, icon-512.png, apple-icon.png - Update layout.tsx icons and manifest.json for PNG icons - Update all .env files for PostgreSQL - Rewrite README.md with updated sections - Remove mcp-server/node_modules and prisma/client-generated from git tracking Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
60 lines
1.8 KiB
TypeScript
60 lines
1.8 KiB
TypeScript
import { getUsers } from '@/app/actions/admin'
|
|
import { AdminMetrics } from '@/components/admin-metrics'
|
|
import { Users, Activity, Database, Zap } from 'lucide-react'
|
|
|
|
export default async function AdminPage() {
|
|
const users = await getUsers()
|
|
|
|
// Mock metrics data - in a real app, these would come from analytics
|
|
const metrics = [
|
|
{
|
|
title: 'Total Users',
|
|
value: users.length,
|
|
trend: { value: 12, isPositive: true },
|
|
icon: <Users className="h-5 w-5 text-primary dark:text-primary-foreground" />,
|
|
},
|
|
{
|
|
title: 'Active Sessions',
|
|
value: '24',
|
|
trend: { value: 8, isPositive: true },
|
|
icon: <Activity className="h-5 w-5 text-green-600 dark:text-green-400" />,
|
|
},
|
|
{
|
|
title: 'Total Notes',
|
|
value: '1,234',
|
|
trend: { value: 24, isPositive: true },
|
|
icon: <Database className="h-5 w-5 text-purple-600 dark:text-purple-400" />,
|
|
},
|
|
{
|
|
title: 'AI Requests',
|
|
value: '856',
|
|
trend: { value: 5, isPositive: false },
|
|
icon: <Zap className="h-5 w-5 text-yellow-600 dark:text-yellow-400" />,
|
|
},
|
|
]
|
|
|
|
return (
|
|
<div className="space-y-6">
|
|
<div>
|
|
<h1 className="text-3xl font-bold text-gray-900 dark:text-white">
|
|
Dashboard
|
|
</h1>
|
|
<p className="text-gray-600 dark:text-gray-400 mt-1">
|
|
Overview of your application metrics
|
|
</p>
|
|
</div>
|
|
|
|
<AdminMetrics metrics={metrics} />
|
|
|
|
<div className="bg-white dark:bg-zinc-900 rounded-lg shadow overflow-hidden border border-gray-200 dark:border-gray-800 p-6">
|
|
<h2 className="text-lg font-semibold text-gray-900 dark:text-white mb-4">
|
|
Recent Activity
|
|
</h2>
|
|
<p className="text-gray-600 dark:text-gray-400">
|
|
Recent activity will be displayed here.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|