From de5d8324a7526228e65729eb18f11a4f77814e63 Mon Sep 17 00:00:00 2001 From: George Price <38691495+GeorgeBPrice@users.noreply.github.com> Date: Sat, 20 Dec 2025 11:50:07 +1000 Subject: [PATCH 1/2] Massive UI Overhual, Templates, skeletons, log table, mobile menu --- README.md | 27 +- app/api-keys/page.tsx | 76 +- app/auth/signin/page.tsx | 6 +- app/components/footer.tsx | 10 +- app/dashboard/events/events-list.tsx | 262 ++- app/dashboard/events/page.tsx | 18 +- app/generator/page.tsx | 605 +++++-- app/globals.css | 172 +- app/layout.tsx | 18 +- app/page.tsx | 15 +- app/saved/page.tsx | 57 +- app/schema/new/page.tsx | 38 +- app/settings/page.tsx | 489 +++--- app/templates/page.tsx | 137 ++ components/generator/config-panel.tsx | 4 +- components/generator/generation-progress.tsx | 88 + components/layout/auth-buttons.tsx | 2 +- components/layout/navbar.tsx | 208 ++- components/templates/template-card.tsx | 96 + components/templates/template-picker.tsx | 136 ++ components/ui/button.tsx | 12 +- components/ui/card.tsx | 20 +- components/ui/results-skeleton.tsx | 21 + components/ui/schema-card-skeleton.tsx | 26 + components/ui/skeleton.tsx | 22 + components/ui/toast.tsx | 9 +- lib/templates.ts | 1661 ++++++++++++++++++ package-lock.json | 912 ++++++---- package.json | 9 +- types/template.ts | 32 + 30 files changed, 4150 insertions(+), 1038 deletions(-) create mode 100644 app/templates/page.tsx create mode 100644 components/generator/generation-progress.tsx create mode 100644 components/templates/template-card.tsx create mode 100644 components/templates/template-picker.tsx create mode 100644 components/ui/results-skeleton.tsx create mode 100644 components/ui/schema-card-skeleton.tsx create mode 100644 components/ui/skeleton.tsx create mode 100644 lib/templates.ts create mode 100644 types/template.ts diff --git a/README.md b/README.md index 50fd2a2..85680d3 100644 --- a/README.md +++ b/README.md @@ -2,16 +2,15 @@ A powerful tool for generating realistic mock data using AI LLMs. -## New in v1.1.0: External API +## New in v1.2.0: Template & UI overhaul -**Programmatic Access with API Keys** +**Enhanced UX, templates, and event analytics** -- **External API Endpoint**: `POST /api/v1/generate` for programmatic data generation -- **Secure API Key Management**: Create, manage, and revoke API keys with 90-day expiry -- **Bearer Token Authentication**: Use API keys in Authorization header -- **Clean Data Response**: Get clean JSON/SQL/CSV/etc, without explanatory text -- **Rate Limiting**: 5 free generations per day (paid tiers coming soon). -- **Multiple Formats**: JSON, SQL, CSV, XML, HTML, TXT support +- Dedicated **Templates page** with searchable categories, SQL/NoSQL toggles, and generator injection +- Modal template browser using gradient CTAs, skeleton loaders, and dual-schema cards that prefill the generator +- Refreshed **Generator UI**: skeleton loaders, progress/cancel controls, CTA gradient utilities, and repositioned save/reset controls +- **Events dashboard table** with filters plus portrait jsPDF export for auditing +- Unified dark theme and CSS overhual, nav/footer polish, and consistent CTA styles ### Simplest Quick Start with External API @@ -103,9 +102,9 @@ VERCEL_OIDC_TOKEN=token_to_connect_to_redis_service - Real-time record generation request tracking using Redis Streams/Upstash - Rate limitting of free API record generation requests using Redis - Export data in JSON, SQL, or CSV formats -- **NEW**: External API with secure API key authentication -- **NEW**: Programmatic data generation for integrations -- **NEW**: API key management with usage tracking +- **NEW**: Templates catalogue & modal picker with SQL/NoSQL toggle and generator injection +- **NEW**: Generator progress/cancel controls plus CTA gradient system +- **NEW**: Events dashboard table with filters and portrait jsPDF export ## Tech Stack @@ -214,6 +213,12 @@ npm run test:critical ## Releases +### v1.2.0 - UI, templates, and analytics +- **Templates catalogue**: Dedicated templates page + modal picker with SQL/NoSQL toggle, dual-schema data, and generator injection +- **Generator polish**: Skeletons, CTA gradient system, progress/cancellation controls, and repositioned save/reset actions +- **Events dashboard**: Filterable table prepared for audits and portrait jsPDF export +- **Global theming**: Unified dark CSS theme, navbar/footer polish, and CTA color tokens + ### v1.1.0 - External API & API Key Management - **External API**: New `/api/v1/generate` endpoint for programmatic access - **API Key Management**: Create, manage, and revoke API keys with 90-day expiry diff --git a/app/api-keys/page.tsx b/app/api-keys/page.tsx index f759464..5b10f4d 100644 --- a/app/api-keys/page.tsx +++ b/app/api-keys/page.tsx @@ -48,6 +48,7 @@ import { CheckCircle, Clock, } from "lucide-react"; +import Skeleton from "@/components/ui/skeleton"; interface ApiKey { id: string; @@ -217,18 +218,7 @@ export default function ApiKeysPage() { return { status: "active", color: "default", text: `${days} days left` }; }; - if (status === "loading" || loading) { - return ( -
-
-
-
-

Loading API keys...

-
-
-
- ); - } + const showSkeletonContent = status === "loading" || loading; if (status === "unauthenticated") { return ( @@ -243,18 +233,18 @@ export default function ApiKeysPage() { } return ( -
- {/* Header */} -
-
+
+
+
+

Security

API Keys

-

- Manage your API keys for external access to AI Mocker +

+ Control third-party access with scoped API keys, monitor their usage, and rotate them easily.

- - @@ -269,7 +259,9 @@ export default function ApiKeysPage() {
- + e.key === "Enter" && createApiKey()} />
-
+
-
-
+ {/* New API Key Display */} {showNewKey && newApiKey && ( @@ -347,8 +336,33 @@ export default function ApiKeysPage() {
)} - {/* Main Content */} - + {showSkeletonContent ? ( +
+
+ + +
+
+ {Array.from({ length: 4 }).map((_, index) => ( +
+ + + +
+ + +
+
+ ))} +
+
+ ) : ( + <> + {/* Main Content */} + API Keys Documentation @@ -729,7 +743,9 @@ result = generate_mock_data( - +
+ + )}
); } diff --git a/app/auth/signin/page.tsx b/app/auth/signin/page.tsx index 7afe898..114a6f7 100644 --- a/app/auth/signin/page.tsx +++ b/app/auth/signin/page.tsx @@ -54,7 +54,7 @@ export default function SignInPage() { if (status === "loading") { return ( -
+
Loading... @@ -96,13 +96,13 @@ export default function SignInPage() { } return ( -
+
Sign In Choose a provider to sign in - + {loadingProviders ? (
Loading sign-in options...
) : providers ? ( diff --git a/app/components/footer.tsx b/app/components/footer.tsx index 84a5c87..11798d9 100644 --- a/app/components/footer.tsx +++ b/app/components/footer.tsx @@ -2,10 +2,10 @@ import Link from "next/link"; export function Footer() { return ( -