diff --git a/content/api.catalog.json b/content/api.catalog.json index 629ce0a..70755b8 100644 --- a/content/api.catalog.json +++ b/content/api.catalog.json @@ -3,7 +3,11 @@ "title": "Portrait_Retouching", "api_key": "Portrait_Retouching", "api_ip_link": "http://127.0.0.1:6666/apis/mlm/portrait/", - "chips": ["portrait", "face", "beauty"], + "chips": [ + "portrait", + "face", + "beauty" + ], "endpoints": [ { "id": "api-blemish-remover", @@ -35,9 +39,21 @@ } ], "subs": [ - { "d": "Primary acne and blemish removal", "m": "POST", "p": "/blemish_remover/image/" }, - { "d": "Eye defect, iris clarity, and sclera correction", "m": "POST", "p": "/blemish_remover/eye_fix/" }, - { "d": "Full skin texture smoothening and pore tone balancing", "m": "POST", "p": "/blemish_remover/improver/" } + { + "d": "Primary acne and blemish removal", + "m": "POST", + "p": "/blemish_remover/image/" + }, + { + "d": "Eye defect, iris clarity, and sclera correction", + "m": "POST", + "p": "/blemish_remover/eye_fix/" + }, + { + "d": "Full skin texture smoothening and pore tone balancing", + "m": "POST", + "p": "/blemish_remover/improver/" + } ] }, { @@ -101,8 +117,16 @@ } ], "subs": [ - { "d": "Targeted teeth whitening", "m": "POST", "p": "/teeth_whitener/image/" }, - { "d": "Full face smile brightening", "m": "POST", "p": "/teeth_whitener/image_full/" } + { + "d": "Targeted teeth whitening", + "m": "POST", + "p": "/teeth_whitener/image/" + }, + { + "d": "Full face smile brightening", + "m": "POST", + "p": "/teeth_whitener/image_full/" + } ] }, { @@ -142,7 +166,11 @@ "title": "Restoration_And_Enhancement", "api_key": "Restoration_And_Enhancement", "api_ip_link": "http://127.0.0.1:6666/apis/mlm/restoration/", - "chips": ["restore", "enhance", "color"], + "chips": [ + "restore", + "enhance", + "color" + ], "endpoints": [ { "id": "api-new-enhancer", @@ -174,8 +202,16 @@ } ], "subs": [ - { "d": "Standard 2x Clarity Enhancement", "m": "POST", "p": "/new_enhancer/image/" }, - { "d": "Legacy Balanced Enhancement", "m": "POST", "p": "/new_enhancer/image_previous/" } + { + "d": "Standard 2x Clarity Enhancement", + "m": "POST", + "p": "/new_enhancer/image/" + }, + { + "d": "Legacy Balanced Enhancement", + "m": "POST", + "p": "/new_enhancer/image_previous/" + } ] }, { @@ -246,7 +282,11 @@ "title": "Background_And_Cutout", "api_key": "Background_And_Cutout", "api_ip_link": "http://127.0.0.1:6666/apis/mlm/cutout/", - "chips": ["background", "cutout", "lama"], + "chips": [ + "background", + "cutout", + "lama" + ], "endpoints": [ { "id": "api-bg-remover-p3m", @@ -316,7 +356,11 @@ "title": "Creative_And_Artistic", "api_key": "Creative_And_Artistic", "api_ip_link": "http://127.0.0.1:6666/apis/mlm/creative/", - "chips": ["cartoon", "polaroid", "art"], + "chips": [ + "cartoon", + "polaroid", + "art" + ], "endpoints": [ { "id": "api-cartoon-avatar", @@ -381,5 +425,36 @@ "subs": [] } ] + }, + { + "title": "portrait-retouch", + "api_key": "portrait-retouch", + "api_ip_link": "http://127.0.0.1:8888", + "chips": [ + "custom", + "neural" + ], + "endpoints": [ + { + "id": "api-glow-portrait-ai", + "title": "AI Studio Glow & Skin Illuminator", + "summary": "Generates natural golden hour studio radiance and epidermal luminescence.", + "full_url": "http://127.0.0.1:8888/apis/glow/process/", + "path": "/apis/glow/process/", + "port": "8888", + "method": "POST", + "resp": "image/jpeg", + "params": [ + { + "n": "image", + "ty": "file (binary)", + "rq": true, + "lc": "multipart/form-data", + "ds": "Input source photograph for transformation." + } + ], + "headers": {} + } + ] } ] diff --git a/content/pages/home.json b/content/pages/home.json index 3cd9179..7144681 100644 --- a/content/pages/home.json +++ b/content/pages/home.json @@ -22,7 +22,41 @@ "hi": "बिना साइन-अप के स्टूडियो-ग्रेड फोटो टूल्स मुफ़्त में आज़माएं। हमारे मोबाइल ऐप्स में 4K एक्सपोर्ट प्राप्त करें।" }, "tryIt": { - "toolRef": "face.blemish.remove" + "toolRef": "face.blemish.remove", + "ctaText": "Clean blemishes in 1-click", + "samplePresets": [ + { + "label": "Sample Photo", + "url": "/management/pages/home/media/sample_portrait_1.jpg" + }, + { + "label": "Natural Studio Model", + "url": "/management/pages/home/media/sample_portrait_2.jpg" + }, + { + "label": "Vintage Archival Shot", + "url": "/management/pages/home/media/sample_portrait_3.jpg" + } + ] + }, + "trustBadges": [ + { + "text": "No account needed" + }, + { + "text": "Photos aren't stored" + }, + { + "text": "Try with a sample" + } + ], + "primaryCta": { + "label": "Explore the tools", + "href": "/tools" + }, + "secondaryCta": { + "label": "Our apps", + "href": "/apps" } } }, @@ -41,8 +75,8 @@ "category": "VIDEO ENHANCEMENT", "badge": "4K 60FPS VIDEO", "description": "Continuous temporal facial neural retouching across dynamic video frames with zero flicker.", - "videoUrl": "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerBlazes.mp4", - "poster": "https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=800&auto=format&fit=crop&q=80", + "videoUrl": "/management/pages/home/media/sample_reel.mp4", + "poster": "/management/pages/home/media/reel_video_poster.jpg", "link": "/tools/blemish-remover", "tag": "Temporal Retouching" }, @@ -53,7 +87,7 @@ "category": "HAIR CUTOUT", "badge": "ULTRA HD PHOTO", "description": "Microscopic hair fiber separation preserving semi-transparent boundary details for editorial covers.", - "image": "https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=800&auto=format&fit=crop&q=80", + "image": "/management/pages/home/media/reel_hair_alpha.jpg", "link": "/tools/background-remover", "tag": "0.02px Edge Trim" }, @@ -64,23 +98,36 @@ "category": "SUPER-RESOLUTION", "badge": "SIDE-BY-SIDE", "description": "Deep neural priors reconstruct iris sharpness and realistic skin pores from compressed source photos.", - "beforeUrl": "https://images.unsplash.com/photo-1544005313-94ddf0286df2?w=800&auto=format&fit=crop&q=80", - "afterUrl": "https://images.unsplash.com/photo-1494790108377-be9c29b29330?w=800&auto=format&fit=crop&q=80", + "beforeUrl": "/management/pages/home/media/reel_restore_before.jpg", + "afterUrl": "/management/pages/home/media/reel_restore_after.jpg", "link": "/tools/photo-enhancer", "tag": "Iris Sharpness" } ] - } + }, + "enabled": true }, { "id": "stats-section", "type": "stats", "props": { "items": [ - { "value": "140M+", "label": "Photos Enhanced" }, - { "value": "4.9 ★", "label": "App Store & Play Rating" }, - { "value": "4K", "label": "Ultra HD Lossless Export" }, - { "value": "4 Apps", "label": "Dedicated Mobile Suites" } + { + "value": "140M+", + "label": "Photos Enhanced" + }, + { + "value": "4.9 ★", + "label": "App Store & Play Rating" + }, + { + "value": "4K", + "label": "Ultra HD Lossless Export" + }, + { + "value": "4 Apps", + "label": "Dedicated Mobile Suites" + } ] } }, @@ -94,7 +141,7 @@ "items": [ { "id": "alpha-matting", - "index": "01 / 03", + "index": "01 / 05", "tabLabel": "01 ALPHA", "category": "FINE MATTING & CUTOUT", "model": "P3M-Net Dual-Stream Alpha", @@ -103,16 +150,20 @@ "tagline": "Sub-pixel hair strands, transparent veils, and motion blur cutout.", "description": "Proprietary dual-stream deep neural network isolates fine flyaway hair, complex textures, and semi-transparent boundaries in studio portraits with pixel-level precision.", "variant": "comparison", - "beforeUrl": "https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=800&auto=format&fit=crop&q=80", - "afterUrl": "https://images.unsplash.com/photo-1500648767791-00dcc994a43e?w=800&auto=format&fit=crop&q=80", + "beforeUrl": "/management/pages/home/media/showcase_01_alpha_before.jpg", + "afterUrl": "/management/pages/home/media/showcase_01_alpha_after.jpg", "toolSlug": "background-remover", "appSlug": "bg-cleaner-app", "appName": "Magic Cutout", - "specs": ["0.02px edge preservation", "Alpha PNG lossless stream", "Studio hair detail"] + "specs": [ + "0.02px edge preservation", + "Alpha PNG lossless stream", + "Studio hair detail" + ] }, { "id": "editorial-portrait-banner", - "index": "02 / 03", + "index": "02 / 05", "tabLabel": "02 BANNER", "category": "STUDIO PRO BANNER", "model": "RetouchGAN v2.1 Prime", @@ -121,16 +172,22 @@ "tagline": "Next-generation sub-pore epidermal synthesis.", "description": "Transform commercial model photography with authentic skin pore preservation. Retain real freckles, iris glints, and fine texture with zero plastic artificial blur.", "variant": "banner", - "bannerImage": "https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=1200&auto=format&fit=crop&q=80", + "bannerImage": "/management/pages/home/media/showcase_02_portrait_before.jpg", "bannerBadge": "PRO EDITION • LOSSLESS FP16", "toolSlug": "blemish-remover", "appSlug": "portrait-app", "appName": "Portrait Studio AI", - "specs": ["Sub-pore texture matrix", "Authentic epidermal micro-details", "Lossless 4K color gamut"] + "specs": [ + "Sub-pore texture matrix", + "Authentic epidermal micro-details", + "Lossless 4K color gamut" + ], + "beforeUrl": "/management/pages/home/media/showcase_02_portrait_before.jpg", + "afterUrl": "/management/pages/home/media/showcase_02_portrait_after.jpg" }, { "id": "super-resolution", - "index": "03 / 03", + "index": "03 / 05", "tabLabel": "03 4K", "category": "4K SUPER-RESOLUTION", "model": "GFPGAN + RealESRGAN Ultra", @@ -139,14 +196,63 @@ "tagline": "Transform low-resolution snapshots into crystal-clear 4K portraits.", "description": "Deep neural priors restore authentic iris sharpness, eyelash detail, and facial contours on blurry, out-of-focus, or highly compressed photos, yielding gallery-ready clarity with zero guesswork.", "variant": "comparison", - "beforeUrl": "https://images.unsplash.com/photo-1544005313-94ddf0286df2?w=800&auto=format&fit=crop&q=80", - "afterUrl": "https://images.unsplash.com/photo-1494790108377-be9c29b29330?w=800&auto=format&fit=crop&q=80", + "beforeUrl": "/management/pages/home/media/showcase_03_superres_before.jpg", + "afterUrl": "/management/pages/home/media/showcase_03_superres_after.jpg", "toolSlug": "photo-enhancer", "appSlug": "photo-enhancer-pro", "appName": "Enhance Ultra AI", - "specs": ["Iris & eyelash synthesis", "400% lossless super-resolution", "Studio-grade crispness"] + "specs": [ + "Iris & eyelash synthesis", + "400% lossless super-resolution", + "Studio-grade crispness" + ] + }, + { + "id": "archival-restoration", + "index": "04 / 05", + "tabLabel": "04 RESTORE", + "category": "ARCHIVAL RESTORATION & REPAIR", + "model": "ScratchDeNet Pro + Deep Inpaint", + "latency": "< 490ms Stream", + "title": "Vintage Photo Restoration & Tear Repair", + "tagline": "Reconstruct cracked, creased, and faded archival prints in 4K.", + "description": "Generative neural inpainting detects scratches, stains, and physical emulsion degradation, reconstructing authentic skin texture and historical tonal depth without artificial blur.", + "variant": "comparison", + "beforeUrl": "/management/pages/home/media/showcase_04_restore_before.jpg", + "afterUrl": "/management/pages/home/media/showcase_04_restore_after.jpg", + "toolSlug": "old-photo-restorer", + "appSlug": "photo-enhancer-pro", + "appName": "Photo Restore Pro", + "specs": [ + "Scratch & crease inpainting", + "Historical tone recovery", + "Studio 4K lossless export" + ] + }, + { + "id": "anime-cartoon-synthesis", + "index": "05 / 05", + "tabLabel": "05 ANIME", + "category": "GENERATIVE ANIME & ART", + "model": "AnimeGAN v3 Core + VectorFlow", + "latency": "< 350ms Stream", + "title": "Anime & Artistic Avatar Synthesizer", + "tagline": "Turn studio portraits into cinema-grade anime and vector line artwork.", + "description": "State-of-the-art dual-branch generative adversarial network extracts facial landmarks and renders clean Japanese anime cell shading, vibrant line art, and cinematic lighting.", + "variant": "comparison", + "beforeUrl": "/management/pages/home/media/showcase_05_cartoon_before.jpg", + "afterUrl": "/management/pages/home/media/showcase_05_cartoon_after.jpg", + "toolSlug": "cartoon-avatar", + "appSlug": "art-studio-app", + "appName": "Art Studio AI", + "specs": [ + "Vector ink contour synthesis", + "Manga cel-shading palette", + "Lossless 4K illustration export" + ] } - ] + ], + "animationMode": "vertical" } }, { @@ -235,11 +341,17 @@ "hi": "ऑनलाइन 8+ एआई फोटो टूल्स आज़माएं या 50 बोनस क्रेडिट के साथ ऐप डाउनलोड करें।" }, "primaryCta": { - "label": { "en": "Explore All Free Tools", "hi": "सभी टूल्स देखें" }, + "label": { + "en": "Explore All Free Tools", + "hi": "सभी टूल्स देखें" + }, "href": "/tools" }, "secondaryCta": { - "label": { "en": "Get Mobile Apps", "hi": "मोबाइल ऐप प्राप्त करें" }, + "label": { + "en": "Get Mobile Apps", + "hi": "मोबाइल ऐप प्राप्त करें" + }, "href": "/apps" } } diff --git a/docs/superpowers/plans/2026-11-04-webb-editor-admin-suite.md b/docs/superpowers/plans/2026-11-04-webb-editor-admin-suite.md new file mode 100644 index 0000000..ea9b044 --- /dev/null +++ b/docs/superpowers/plans/2026-11-04-webb-editor-admin-suite.md @@ -0,0 +1,190 @@ +# WEBB Editor — Dedicated Admin Control Suite Implementation Plan + +> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. + +**Goal:** Build a completely independent, modern visual Admin Control Suite in `/home/creserver/Desktop/WEBB_EDITOR` running on port 3001, allowing visual live editing of the main website (`/home/creserver/Desktop/WEBB` on port 3000) — including text, media uploads, section toggles, horizontal scroll animation controls, and full tool creation (frontend UI + backend multipart API configuration) directly backed by JSON and the `management/` folder. + +**Architecture:** A standalone Next.js 14 web application in `/home/creserver/Desktop/WEBB_EDITOR` with Tailwind CSS, Lucide icons, and server-side API endpoints that read and write directly to `../WEBB/management/` and `../WEBB/content/`. The main website on port 3000 has zero links, buttons, or access to the editor, ensuring complete isolation. Changes saved in the editor immediately persist to JSON on disk and reflect instantly on the main site. + +**Tech Stack:** Next.js 14 (App Router), React 18, TypeScript, Tailwind CSS, Lucide React, Node.js `fs/promises` file manipulation, Native Form-Data upload handling. + +**Spec:** User request dated 2026-11-04 specifying a dedicated admin control suite in a new folder, independent on another port, with no access from the main site, supporting text editing, photo upload/removal, feature toggles, horizontal scroll animation removal/toggling, full tool creation with frontend and backend multipart/form-data configuration, and instant dynamic JSON persistence. + +## Global Constraints + +- **Location:** The editor project MUST live at `/home/creserver/Desktop/WEBB_EDITOR`. +- **Port:** The editor MUST run on port 3001 (or separate from main site port 3000). +- **Isolation:** The main site (`WEBB`) MUST NOT contain any admin buttons, admin links, or administrative leakage. +- **Data Source of Truth:** Edits must write directly to `management/pages/.../page.config.json`, `management/pages/.../media/`, `content/collections/tools/*.json`, `content/api.catalog.json`, and `content/site.config.json`. +- **Python Venv Rule:** If python scripts are run, always use `/home/creserver/extras/local_venv/bin/python`. + +## Review Focus + +1. **Path Resolution:** Relative paths to `../WEBB` must reliably resolve regardless of process working directory. +2. **File Permissions & Upload Safety:** Uploaded images must be written atomically to `../WEBB/management/.../media/` and sanitized to prevent directory traversal. +3. **JSON Schema Integrity:** Written JSON files must preserve valid JSON formatting with proper whitespace and typed schema fields. +4. **Instant Dynamic Reflection:** Main site `WEBB` on port 3000 must load updated JSON content immediately without requiring a full manual rebuild. +5. **Form-Data Backend Config:** Tool creation must support full backend specifications: API endpoint URL, HTTP method, multipart/form-data field names (e.g. `image`), parameters, and header options. + +--- + +### Task 1: Initialize Standalone WEBB_EDITOR Project & Scaffolding + +**Files:** +- Create: `/home/creserver/Desktop/WEBB_EDITOR/package.json` +- Create: `/home/creserver/Desktop/WEBB_EDITOR/tsconfig.json` +- Create: `/home/creserver/Desktop/WEBB_EDITOR/tailwind.config.js` +- Create: `/home/creserver/Desktop/WEBB_EDITOR/postcss.config.js` +- Create: `/home/creserver/Desktop/WEBB_EDITOR/next.config.js` +- Create: `/home/creserver/Desktop/WEBB_EDITOR/src/app/globals.css` +- Create: `/home/creserver/Desktop/WEBB_EDITOR/src/app/layout.tsx` + +- [ ] Step 1.1: Create directory `/home/creserver/Desktop/WEBB_EDITOR` with Next.js 14, Tailwind CSS, Lucide React dependencies. +- [ ] Step 1.2: Configure `next.config.js` with port 3001 defaults and image domains. +- [ ] Step 1.3: Configure `tailwind.config.js` with admin studio color palette (slate/indigo/amber luxury dark/light theme). +- [ ] Step 1.4: Install dependencies using `npm install` inside `/home/creserver/Desktop/WEBB_EDITOR`. +- [ ] Step 1.5: Verify project builds with `npm run build`. + +--- + +### Task 2: Core File System Bridge & Backend Service Library + +**Files:** +- Create: `/home/creserver/Desktop/WEBB_EDITOR/src/lib/bridge.ts` +- Create: `/home/creserver/Desktop/WEBB_EDITOR/src/lib/types.ts` +- Test: `/home/creserver/Desktop/WEBB_EDITOR/src/lib/bridge.test.ts` + +- [ ] Step 2.1: Define TypeScript schemas for `HomePageConfig`, `ToolItem`, `ApiEndpoint`, `ShowcaseItem`, and `SectionToggle`. +- [ ] Step 2.2: Implement `getWebbPath(subpath: string)` with absolute resolution targeting `/home/creserver/Desktop/WEBB`. +- [ ] Step 2.3: Implement safe JSON reader and writer functions with backup snapshot creation. +- [ ] Step 2.4: Implement media file scanner that lists all images in `../WEBB/management/pages/home/media/` and `../WEBB/management/pages/tools/*/media/`. +- [ ] Step 2.5: Write unit tests verifying read/write integrity against test JSON structures. + +--- + +### Task 3: API Endpoints for Pages, Sections, Media, and Tools + +**Files:** +- Create: `/home/creserver/Desktop/WEBB_EDITOR/src/app/api/pages/home/route.ts` +- Create: `/home/creserver/Desktop/WEBB_EDITOR/src/app/api/tools/route.ts` +- Create: `/home/creserver/Desktop/WEBB_EDITOR/src/app/api/tools/[slug]/route.ts` +- Create: `/home/creserver/Desktop/WEBB_EDITOR/src/app/api/media/upload/route.ts` +- Create: `/home/creserver/Desktop/WEBB_EDITOR/src/app/api/media/delete/route.ts` +- Create: `/home/creserver/Desktop/WEBB_EDITOR/src/app/api/sections/toggle/route.ts` + +- [ ] Step 3.1: Build `GET` and `POST` for `/api/pages/home` to fetch and update `management/pages/home/page.config.json`. +- [ ] Step 3.2: Build `/api/sections/toggle` to toggle section visibility or change layout settings (e.g. toggle horizontal scroll animation vs vertical stack). +- [ ] Step 3.3: Build `POST` for `/api/media/upload` accepting `multipart/form-data` and writing files directly into `../WEBB/management/pages/.../media/`. +- [ ] Step 3.4: Build `POST` for `/api/media/delete` to safely remove unused images. +- [ ] Step 3.5: Build `GET`, `POST`, `PUT`, `DELETE` for `/api/tools` to manage `content/collections/tools/*.json` and `content/api.catalog.json`. + +--- + +### Task 4: Admin Studio Navigation, Layout & Dashboard Overview + +**Files:** +- Create: `/home/creserver/Desktop/WEBB_EDITOR/src/components/layout/AdminSidebar.tsx` +- Create: `/home/creserver/Desktop/WEBB_EDITOR/src/components/layout/AdminHeader.tsx` +- Create: `/home/creserver/Desktop/WEBB_EDITOR/src/app/page.tsx` (Dashboard Overview) + +- [ ] Step 4.1: Build `AdminSidebar` with navigation links: Overview, Homepage Editor, Showcase Models, Tool Studio (Frontend + Backend), Media Asset Manager, and Settings. +- [ ] Step 4.2: Build `AdminHeader` showing live server status badge (Main Site: `http://localhost:3000` status indicator, Editor: port 3001, quick Save & Sync button). +- [ ] Step 4.3: Build Dashboard Overview page displaying active tools counter, active categories, total images managed, and quick actions. + +--- + +### Task 5: Visual Homepage & Sections Manager (With Animation Toggles) + +**Files:** +- Create: `/home/creserver/Desktop/WEBB_EDITOR/src/app/pages/home/page.tsx` +- Create: `/home/creserver/Desktop/WEBB_EDITOR/src/components/editor/SectionCard.tsx` +- Create: `/home/creserver/Desktop/WEBB_EDITOR/src/components/editor/HeroEditorModal.tsx` +- Create: `/home/creserver/Desktop/WEBB_EDITOR/src/components/editor/AnimationControlsModal.tsx` + +- [ ] Step 5.1: Build Section Manager list displaying all 10 homepage sections with drag/reorder and toggle switches (`enabled` / `disabled`). +- [ ] Step 5.2: Implement **Horizontal Scrolling Animation Toggle**: + - Option A: Pinned Sticky Cinematic Runway (horizontal scroll translation). + - Option B: Clean Fluid Vertical Stack (horizontal animation completely disabled). + - Option C: Completely Remove Flagship Showcase Section. +- [ ] Step 5.3: Build in-place text editor for Hero title, subtitle, badges, and trust indicators. +- [ ] Step 5.4: Implement instant save handler that writes to `../WEBB/management/pages/home/page.config.json`. + +--- + +### Task 6: Interactive Model Showcase Manager + +**Files:** +- Create: `/home/creserver/Desktop/WEBB_EDITOR/src/app/showcase/page.tsx` +- Create: `/home/creserver/Desktop/WEBB_EDITOR/src/components/showcase/ShowcaseCardEditor.tsx` + +- [ ] Step 6.1: Build visual card list for all flagship showcase models. +- [ ] Step 6.2: Add card creation and deletion controls. +- [ ] Step 6.3: Implement variant selector (`comparison` slider vs `banner`). +- [ ] Step 6.4: Add direct image uploader for Before / After / Banner images with instant thumbnail preview. +- [ ] Step 6.5: Add inputs for model name, latency chip, category, specs checklist, and tool link. + +--- + +### Task 7: Full Tool Studio Creator (Frontend UI + Backend Multipart API) + +**Files:** +- Create: `/home/creserver/Desktop/WEBB_EDITOR/src/app/tools/page.tsx` +- Create: `/home/creserver/Desktop/WEBB_EDITOR/src/app/tools/new/page.tsx` +- Create: `/home/creserver/Desktop/WEBB_EDITOR/src/app/tools/[slug]/page.tsx` +- Create: `/home/creserver/Desktop/WEBB_EDITOR/src/components/tools/ToolFrontendForm.tsx` +- Create: `/home/creserver/Desktop/WEBB_EDITOR/src/components/tools/ToolBackendApiForm.tsx` + +- [ ] Step 7.1: Build Tool listing page showing all tools with search, category filtering, and status badges. +- [ ] Step 7.2: Build `ToolFrontendForm` for frontend presentation: + - Tool Name, Slug, Summary, Category, Associated App (`homeApp`), Badges, Limits (MB), and Sample Presets. + - Before/After demonstration image uploader that saves directly into `../WEBB/management/pages/tools/[slug]/media/`. +- [ ] Step 7.3: Build `ToolBackendApiForm` for backend execution: + - API Endpoint URL (e.g. `http://127.0.0.1:8000/api/v1/process`), HTTP Method (`POST` / `GET`). + - Multipart/form-data configuration: Upload file field name (e.g. `image` or `file`), optional fields, parameter bindings. + - Custom headers (e.g. Bearer token, API keys), timeout settings. +- [ ] Step 7.4: Build atomic save routine that writes: + - Tool JSON -> `/home/creserver/Desktop/WEBB/content/collections/tools/[slug].json` + - API Endpoint -> `/home/creserver/Desktop/WEBB/content/api.catalog.json` & `/content/api.overlay.json` +- [ ] Step 7.5: Build tool deletion routine that removes tool definitions safely. + +--- + +### Task 8: Media Asset Manager (Visual Upload & Delete Gallery) + +**Files:** +- Create: `/home/creserver/Desktop/WEBB_EDITOR/src/app/media/page.tsx` +- Create: `/home/creserver/Desktop/WEBB_EDITOR/src/components/media/MediaUploadZone.tsx` +- Create: `/home/creserver/Desktop/WEBB_EDITOR/src/components/media/MediaCard.tsx` + +- [ ] Step 8.1: Build visual gallery showing all media files in `../WEBB/management/`. +- [ ] Step 8.2: Implement drag-and-drop file uploader supporting JPG, PNG, WEBP, and MP4. +- [ ] Step 8.3: Add copy image path button (`/management/...`) for easy insertion into configs. +- [ ] Step 8.4: Add delete asset modal with confirmation. + +--- + +### Task 9: Enable Dynamic Revalidation in Main Site (WEBB) + +**Files:** +- Modify: `/home/creserver/Desktop/WEBB/src/app/page.tsx` +- Modify: `/home/creserver/Desktop/WEBB/src/app/tools/[slug]/page.tsx` + +- [ ] Step 9.1: Add `export const dynamic = 'force-dynamic'` and `export const revalidate = 0` to `src/app/page.tsx` in `WEBB`. +- [ ] Step 9.2: Add `export const dynamic = 'force-dynamic'` and `export const revalidate = 0` to `src/app/tools/[slug]/page.tsx` in `WEBB`. +- [ ] Step 9.3: Verify that modifying `management/pages/home/page.config.json` immediately updates the live page on `http://localhost:3000` without rebuilding. + +--- + +### Task 10: End-to-End Verification, Server Startup & Health Audit + +**Files:** +- Verify: Port 3000 (`WEBB`) running without any admin links. +- Verify: Port 3001 (`WEBB_EDITOR`) running cleanly as standalone admin suite. +- Test script: `/home/creserver/Desktop/WEBB_EDITOR/tests/e2e-sync.test.ts` + +- [ ] Step 10.1: Run `npm run build` inside `/home/creserver/Desktop/WEBB_EDITOR` with zero errors. +- [ ] Step 10.2: Start `WEBB_EDITOR` on port 3001 (`npm run start -- -p 3001` or daemon). +- [ ] Step 10.3: Execute test: Edit homepage badge via `WEBB_EDITOR` API / UI -> Verify updated text on `http://localhost:3000`. +- [ ] Step 10.4: Execute test: Add new tool with frontend and backend multipart config -> Verify new tool appears in `/tools` and `/tools/[slug]`. +- [ ] Step 10.5: Execute test: Upload image via Media Asset Manager -> Verify image exists in `management/` and renders on `http://localhost:3000`. +- [ ] Step 10.6: Puppeteer in-browser verification of admin suite UI and live sync confirmation. diff --git a/management/pages/home/media/showcase_04_restore_after.jpg b/management/pages/home/media/showcase_04_restore_after.jpg new file mode 100644 index 0000000..598c2b4 Binary files /dev/null and b/management/pages/home/media/showcase_04_restore_after.jpg differ diff --git a/management/pages/home/media/showcase_04_restore_before.jpg b/management/pages/home/media/showcase_04_restore_before.jpg new file mode 100644 index 0000000..0fe693a Binary files /dev/null and b/management/pages/home/media/showcase_04_restore_before.jpg differ diff --git a/management/pages/home/media/showcase_05_cartoon_after.jpg b/management/pages/home/media/showcase_05_cartoon_after.jpg new file mode 100644 index 0000000..1cc7b69 Binary files /dev/null and b/management/pages/home/media/showcase_05_cartoon_after.jpg differ diff --git a/management/pages/home/media/showcase_05_cartoon_before.jpg b/management/pages/home/media/showcase_05_cartoon_before.jpg new file mode 100644 index 0000000..63c0342 Binary files /dev/null and b/management/pages/home/media/showcase_05_cartoon_before.jpg differ diff --git a/management/pages/home/page.config.json b/management/pages/home/page.config.json index 91994d8..7144681 100644 --- a/management/pages/home/page.config.json +++ b/management/pages/home/page.config.json @@ -15,14 +15,48 @@ "props": { "title": { "en": "Transform Photos with Next-Gen Neural AI", - "hi": "\u0928\u0947\u0915\u094d\u0938\u094d\u091f-\u091c\u0947\u0928 \u0928\u094d\u092f\u0942\u0930\u0932 \u090f\u0906\u0908 \u0915\u0947 \u0938\u093e\u0925 \u092b\u094b\u091f\u094b \u092c\u0926\u0932\u0947\u0902" + "hi": "नेक्स्ट-जेन न्यूरल एआई के साथ फोटो बदलें" }, "subtitle": { "en": "Advanced neural vision tools with zero sign-up and zero data retention. Process high-resolution portraits, precision cutouts, and restorations directly in your browser.", - "hi": "\u092c\u093f\u0928\u093e \u0938\u093e\u0907\u0928-\u0905\u092a \u0915\u0947 \u0938\u094d\u091f\u0942\u0921\u093f\u092f\u094b-\u0917\u094d\u0930\u0947\u0921 \u092b\u094b\u091f\u094b \u091f\u0942\u0932\u094d\u0938 \u092e\u0941\u092b\u093c\u094d\u0924 \u092e\u0947\u0902 \u0906\u091c\u093c\u092e\u093e\u090f\u0902\u0964 \u0939\u092e\u093e\u0930\u0947 \u092e\u094b\u092c\u093e\u0907\u0932 \u0910\u092a\u094d\u0938 \u092e\u0947\u0902 4K \u090f\u0915\u094d\u0938\u092a\u094b\u0930\u094d\u091f \u092a\u094d\u0930\u093e\u092a\u094d\u0924 \u0915\u0930\u0947\u0902\u0964" + "hi": "बिना साइन-अप के स्टूडियो-ग्रेड फोटो टूल्स मुफ़्त में आज़माएं। हमारे मोबाइल ऐप्स में 4K एक्सपोर्ट प्राप्त करें।" }, "tryIt": { - "toolRef": "face.blemish.remove" + "toolRef": "face.blemish.remove", + "ctaText": "Clean blemishes in 1-click", + "samplePresets": [ + { + "label": "Sample Photo", + "url": "/management/pages/home/media/sample_portrait_1.jpg" + }, + { + "label": "Natural Studio Model", + "url": "/management/pages/home/media/sample_portrait_2.jpg" + }, + { + "label": "Vintage Archival Shot", + "url": "/management/pages/home/media/sample_portrait_3.jpg" + } + ] + }, + "trustBadges": [ + { + "text": "No account needed" + }, + { + "text": "Photos aren't stored" + }, + { + "text": "Try with a sample" + } + ], + "primaryCta": { + "label": "Explore the tools", + "href": "/tools" + }, + "secondaryCta": { + "label": "Our apps", + "href": "/apps" } } }, @@ -70,7 +104,8 @@ "tag": "Iris Sharpness" } ] - } + }, + "enabled": true }, { "id": "stats-section", @@ -82,7 +117,7 @@ "label": "Photos Enhanced" }, { - "value": "4.9 \u2605", + "value": "4.9 ★", "label": "App Store & Play Rating" }, { @@ -106,7 +141,7 @@ "items": [ { "id": "alpha-matting", - "index": "01 / 03", + "index": "01 / 05", "tabLabel": "01 ALPHA", "category": "FINE MATTING & CUTOUT", "model": "P3M-Net Dual-Stream Alpha", @@ -128,7 +163,7 @@ }, { "id": "editorial-portrait-banner", - "index": "02 / 03", + "index": "02 / 05", "tabLabel": "02 BANNER", "category": "STUDIO PRO BANNER", "model": "RetouchGAN v2.1 Prime", @@ -138,7 +173,7 @@ "description": "Transform commercial model photography with authentic skin pore preservation. Retain real freckles, iris glints, and fine texture with zero plastic artificial blur.", "variant": "banner", "bannerImage": "/management/pages/home/media/showcase_02_portrait_before.jpg", - "bannerBadge": "PRO EDITION \u2022 LOSSLESS FP16", + "bannerBadge": "PRO EDITION • LOSSLESS FP16", "toolSlug": "blemish-remover", "appSlug": "portrait-app", "appName": "Portrait Studio AI", @@ -152,7 +187,7 @@ }, { "id": "super-resolution", - "index": "03 / 03", + "index": "03 / 05", "tabLabel": "03 4K", "category": "4K SUPER-RESOLUTION", "model": "GFPGAN + RealESRGAN Ultra", @@ -171,8 +206,53 @@ "400% lossless super-resolution", "Studio-grade crispness" ] + }, + { + "id": "archival-restoration", + "index": "04 / 05", + "tabLabel": "04 RESTORE", + "category": "ARCHIVAL RESTORATION & REPAIR", + "model": "ScratchDeNet Pro + Deep Inpaint", + "latency": "< 490ms Stream", + "title": "Vintage Photo Restoration & Tear Repair", + "tagline": "Reconstruct cracked, creased, and faded archival prints in 4K.", + "description": "Generative neural inpainting detects scratches, stains, and physical emulsion degradation, reconstructing authentic skin texture and historical tonal depth without artificial blur.", + "variant": "comparison", + "beforeUrl": "/management/pages/home/media/showcase_04_restore_before.jpg", + "afterUrl": "/management/pages/home/media/showcase_04_restore_after.jpg", + "toolSlug": "old-photo-restorer", + "appSlug": "photo-enhancer-pro", + "appName": "Photo Restore Pro", + "specs": [ + "Scratch & crease inpainting", + "Historical tone recovery", + "Studio 4K lossless export" + ] + }, + { + "id": "anime-cartoon-synthesis", + "index": "05 / 05", + "tabLabel": "05 ANIME", + "category": "GENERATIVE ANIME & ART", + "model": "AnimeGAN v3 Core + VectorFlow", + "latency": "< 350ms Stream", + "title": "Anime & Artistic Avatar Synthesizer", + "tagline": "Turn studio portraits into cinema-grade anime and vector line artwork.", + "description": "State-of-the-art dual-branch generative adversarial network extracts facial landmarks and renders clean Japanese anime cell shading, vibrant line art, and cinematic lighting.", + "variant": "comparison", + "beforeUrl": "/management/pages/home/media/showcase_05_cartoon_before.jpg", + "afterUrl": "/management/pages/home/media/showcase_05_cartoon_after.jpg", + "toolSlug": "cartoon-avatar", + "appSlug": "art-studio-app", + "appName": "Art Studio AI", + "specs": [ + "Vector ink contour synthesis", + "Manga cel-shading palette", + "Lossless 4K illustration export" + ] } - ] + ], + "animationMode": "vertical" } }, { @@ -181,7 +261,7 @@ "props": { "title": { "en": "The Creative Studio Suite", - "hi": "\u0915\u094d\u0930\u093f\u090f\u091f\u093f\u0935 \u0938\u094d\u091f\u0942\u0921\u093f\u092f\u094b \u0938\u0942\u091f" + "hi": "क्रिएटिव स्टूडियो सूट" } } }, @@ -196,11 +276,11 @@ "props": { "title": { "en": "Specialized Mobile Apps for Every Creative Task", - "hi": "\u0939\u0930 \u0930\u091a\u0928\u093e\u0924\u094d\u092e\u0915 \u0915\u093e\u0930\u094d\u092f \u0915\u0947 \u0932\u093f\u090f \u0938\u092e\u0930\u094d\u092a\u093f\u0924 \u092e\u094b\u092c\u093e\u0907\u0932 \u0910\u092a\u094d\u0938" + "hi": "हर रचनात्मक कार्य के लिए समर्पित मोबाइल ऐप्स" }, "subtitle": { "en": "Ready for high volume batch editing and lossless 4K export? Download our dedicated mobile apps for iOS and Android.", - "hi": "\u092c\u0948\u091a \u0938\u0902\u092a\u093e\u0926\u0928 \u0914\u0930 4K \u0928\u093f\u0930\u094d\u092f\u093e\u0924 \u0915\u0947 \u0932\u093f\u090f \u0924\u0948\u092f\u093e\u0930 \u0939\u0948\u0902? \u0939\u092e\u093e\u0930\u0947 \u0938\u092e\u0930\u094d\u092a\u093f\u0924 \u092e\u094b\u092c\u093e\u0907\u0932 \u0910\u092a \u0921\u093e\u0909\u0928\u0932\u094b\u0921 \u0915\u0930\u0947\u0902\u0964" + "hi": "बैच संपादन और 4K निर्यात के लिए तैयार हैं? हमारे समर्पित मोबाइल ऐप डाउनलोड करें।" }, "source": "all", "showRating": true @@ -212,11 +292,11 @@ "props": { "title": { "en": "Not Sure Which Tool You Need?", - "hi": "\u0928\u093f\u0936\u094d\u091a\u092f \u0928\u0939\u0940\u0902 \u0915\u093f \u0915\u094c\u0928 \u0938\u093e \u091f\u0942\u0932 \u091a\u093e\u0939\u093f\u090f?" + "hi": "निश्चय नहीं कि कौन सा टूल चाहिए?" }, "subtitle": { "en": "Select your creative goal to get an instant tailored recommendation.", - "hi": "\u0924\u094d\u0935\u0930\u093f\u0924 \u0905\u0928\u0941\u0936\u0902\u0938\u093e \u092a\u094d\u0930\u093e\u092a\u094d\u0924 \u0915\u0930\u0928\u0947 \u0915\u0947 \u0932\u093f\u090f \u0905\u092a\u0928\u093e \u0932\u0915\u094d\u0937\u094d\u092f \u091a\u0941\u0928\u0947\u0902\u0964" + "hi": "त्वरित अनुशंसा प्राप्त करने के लिए अपना लक्ष्य चुनें।" } } }, @@ -226,7 +306,7 @@ "props": { "title": { "en": "Frequently Asked Questions", - "hi": "\u0905\u0915\u094d\u0938\u0930 \u092a\u0942\u091b\u0947 \u091c\u093e\u0928\u0947 \u0935\u093e\u0932\u0947 \u092a\u094d\u0930\u0936\u094d\u0928" + "hi": "अक्सर पूछे जाने वाले प्रश्न" }, "items": [ { @@ -254,27 +334,27 @@ "props": { "title": { "en": "Ready to Transform Your Visuals?", - "hi": "\u0915\u094d\u092f\u093e \u0906\u092a \u0905\u092a\u0928\u0940 \u0924\u0938\u094d\u0935\u0940\u0930\u094b\u0902 \u0915\u094b \u092c\u0926\u0932\u0928\u0947 \u0915\u0947 \u0932\u093f\u090f \u0924\u0948\u092f\u093e\u0930 \u0939\u0948\u0902?" + "hi": "क्या आप अपनी तस्वीरों को बदलने के लिए तैयार हैं?" }, "subtitle": { "en": "Launch any of our 8+ AI photo tools online or download the apps for Android & iOS with 50 bonus credits.", - "hi": "\u0911\u0928\u0932\u093e\u0907\u0928 8+ \u090f\u0906\u0908 \u092b\u094b\u091f\u094b \u091f\u0942\u0932\u094d\u0938 \u0906\u091c\u093c\u092e\u093e\u090f\u0902 \u092f\u093e 50 \u092c\u094b\u0928\u0938 \u0915\u094d\u0930\u0947\u0921\u093f\u091f \u0915\u0947 \u0938\u093e\u0925 \u0910\u092a \u0921\u093e\u0909\u0928\u0932\u094b\u0921 \u0915\u0930\u0947\u0902\u0964" + "hi": "ऑनलाइन 8+ एआई फोटो टूल्स आज़माएं या 50 बोनस क्रेडिट के साथ ऐप डाउनलोड करें।" }, "primaryCta": { "label": { "en": "Explore All Free Tools", - "hi": "\u0938\u092d\u0940 \u091f\u0942\u0932\u094d\u0938 \u0926\u0947\u0916\u0947\u0902" + "hi": "सभी टूल्स देखें" }, "href": "/tools" }, "secondaryCta": { "label": { "en": "Get Mobile Apps", - "hi": "\u092e\u094b\u092c\u093e\u0907\u0932 \u0910\u092a \u092a\u094d\u0930\u093e\u092a\u094d\u0924 \u0915\u0930\u0947\u0902" + "hi": "मोबाइल ऐप प्राप्त करें" }, "href": "/apps" } } } ] -} \ No newline at end of file +} diff --git a/public/brand/icon.svg b/public/brand/icon.svg index 073d68a..05543a7 100644 --- a/public/brand/icon.svg +++ b/public/brand/icon.svg @@ -1,56 +1,65 @@ - - - + + + - - - + + + - + + + + + - + - - - - - + - - + + + + + + + + - - + + - - - + + + + + - - + + - - + + + + + - - - - - - + + + + - - - - - + + + + + + + + + + + \ No newline at end of file diff --git a/src/app/page.tsx b/src/app/page.tsx index 10aafe1..58a98c8 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -3,7 +3,8 @@ import { getEndpointById } from '@/lib/catalog/loader'; import { SectionRenderer } from '@/components/sections/SectionRenderer'; import { notFound } from 'next/navigation'; -export const revalidate = 600; // ISR 10 minutes fallback per PRD §4.2 +export const dynamic = 'force-dynamic'; +export const revalidate = 0; export default function HomePage() { const page = getPageConfig('home'); diff --git a/src/app/tools/[slug]/page.tsx b/src/app/tools/[slug]/page.tsx index 25368e0..5a91af6 100644 --- a/src/app/tools/[slug]/page.tsx +++ b/src/app/tools/[slug]/page.tsx @@ -9,6 +9,9 @@ interface ToolPageProps { params: { slug: string }; } +export const dynamic = 'force-dynamic'; +export const revalidate = 0; + export async function generateStaticParams() { const tools = getAllTools(); return tools.map((t) => ({ slug: t.slug })); @@ -21,22 +24,23 @@ export async function generateMetadata({ params }: ToolPageProps): Promise void; + openToolModal: () => void; + openShowcaseModal: () => void; + updateSectionProps: (sectionId: string, newProps: Record) => void; + availableTools: any[]; +} + +export const EditorContext = createContext({ + isEditor: false, + openInspector: () => {}, + openToolModal: () => {}, + openShowcaseModal: () => {}, + updateSectionProps: () => {}, + availableTools: [], +}); + +export const useEditor = () => useContext(EditorContext); diff --git a/src/components/sections/CinematicHorizontalScrollSection.tsx b/src/components/sections/CinematicHorizontalScrollSection.tsx index e1f5cb0..3a939c4 100644 --- a/src/components/sections/CinematicHorizontalScrollSection.tsx +++ b/src/components/sections/CinematicHorizontalScrollSection.tsx @@ -3,7 +3,7 @@ import React, { useRef, useState, useEffect, useCallback } from 'react'; import Link from 'next/link'; import { ArrowRight, Check, Smartphone, ChevronLeft, ChevronRight } from 'lucide-react'; -import { DeferredComparison } from '@/components/ui/DeferredComparison'; +import { CardBeforeAfterSlider } from '@/components/ui/CardBeforeAfterSlider'; export interface ShowcaseItem { id: string; @@ -31,6 +31,7 @@ interface CinematicHorizontalProps { badge?: string; subtitle?: string; items?: ShowcaseItem[]; + animationMode?: 'horizontal' | 'vertical'; } export function CinematicHorizontalScrollSection({ @@ -38,6 +39,7 @@ export function CinematicHorizontalScrollSection({ badge = 'FLAGSHIP TRANSFORMATION MODELS', subtitle = 'Browse the flagship tools with native cinematic pan controls.', items = [], + animationMode = 'horizontal', }: CinematicHorizontalProps) { const containerRef = useRef(null); const trackRef = useRef(null); @@ -180,6 +182,28 @@ export function CinematicHorizontalScrollSection({ if (!items.length) return null; + // Clean fluid vertical stack when horizontal scroll animation is disabled + if (animationMode === 'vertical') { + return ( +
+
+
+

{badge}

+

+ {title} +

+

{subtitle}

+
+
+
+ {items.map((item) => ( + + ))} +
+
+ ); + } + // Fluid vertical scroll distance: 100vh base + 85vh per additional card const containerHeightVh = 100 + (items.length - 1) * 85; @@ -261,28 +285,34 @@ export function CinematicHorizontalScrollSection({ ); } -function ShowcaseCard({ item }: { item: ShowcaseItem }) { +function ShowcaseCard({ item, isVertical }: { item: ShowcaseItem; isVertical?: boolean }) { const comparison = item.variant !== 'banner' && item.beforeUrl && item.afterUrl; return ( -
+
-
+
{comparison ? ( - ) : ( -
+
{/* eslint-disable-next-line @next/next/no-img-element */} {item.title} diff --git a/src/components/sections/HeroSection.tsx b/src/components/sections/HeroSection.tsx index 9787b59..57ca98c 100644 --- a/src/components/sections/HeroSection.tsx +++ b/src/components/sections/HeroSection.tsx @@ -31,8 +31,13 @@ interface HeroSectionProps { variant?: string; badge?: any; tryIt?: { - toolRef: string; + toolRef?: string; + ctaText?: string; + samplePresets?: Array<{ label: string; url: string; resultUrl?: string }>; }; + trustBadges?: Array<{ text: string; icon?: string }>; + primaryCta?: { label?: any; href?: string }; + secondaryCta?: { label?: any; href?: string }; tool?: ToolItem | null; homeApp?: AppItem | null; variants?: VariantSpec[]; @@ -44,17 +49,31 @@ export function HeroSection({ subtitle, variant = 'centered', badge, + tryIt, + trustBadges, + primaryCta, + secondaryCta, tool, homeApp, variants = [], locale = 'en', }: HeroSectionProps) { - const [mobileTab, setMobileTab] = useState<'upload' | 'compare'>('upload'); const [grainActive, setGrainActive] = useState(true); const resolvedTitle = resolveLocalised(title, locale); const resolvedSubtitle = resolveLocalised(subtitle, locale); const resolvedBadge = resolveLocalised(badge, locale); + const primaryCtaLabel = resolveLocalised(primaryCta?.label, locale, 'Explore the tools'); + const primaryCtaHref = primaryCta?.href || '/tools'; + const secondaryCtaLabel = resolveLocalised(secondaryCta?.label, locale, 'Our apps'); + const secondaryCtaHref = secondaryCta?.href || '/apps'; + + const activeTrustBadges = trustBadges && trustBadges.length > 0 ? trustBadges : [ + { text: 'No account needed' }, + { text: "Photos aren't stored" }, + { text: 'Try with a sample' }, + ]; + if (variant === 'tryit' && tool) { return (
@@ -78,25 +97,34 @@ export function HeroSection({ />
- - Explore the tools + + {primaryCtaLabel} - - Our apps + + {secondaryCtaLabel}
- No account needed - Photos aren’t stored - Try with a sample + {activeTrustBadges.map((badgeItem, bIdx) => ( + + {badgeItem.text} + + ))}
- +
@@ -163,52 +191,21 @@ export function HeroSection({
- {/* Intelligent Mobile Tab Switcher (Visible ONLY on Mobile < 1024px) */} -
-
- - -
-
- - {/* Intelligent Side-by-Side Tool Studio */} + {/* Unified Tool Studio on Same Page (Upload Studio + Live Transformation Preview) */}
- {/* Column 1: Spacious, Prominent Upload Studio (lg:col-span-7 - Made Bigger!) */} -
+ {/* Column 1: Spacious, Prominent Upload Studio (lg:col-span-7) */} +
setMobileTab('compare')} />
{/* Column 2: Sleeker, Focused Neural Transformation Preview (lg:col-span-5) */} -
+
- - {/* Mobile Jump to Upload (Only on small screens) */} -
- -
diff --git a/src/components/sections/TryItWidget.tsx b/src/components/sections/TryItWidget.tsx index a51d150..2ea7211 100644 --- a/src/components/sections/TryItWidget.tsx +++ b/src/components/sections/TryItWidget.tsx @@ -25,7 +25,8 @@ interface TryItWidgetProps { variants?: VariantSpec[]; locale?: string; className?: string; - onSwitchToCompare?: () => void; + samplePresets?: Array<{ label: string; url: string; resultUrl?: string }>; + ctaText?: string; } export function TryItWidget({ @@ -34,7 +35,8 @@ export function TryItWidget({ variants = [], locale = 'en', className = '', - onSwitchToCompare, + samplePresets, + ctaText, }: TryItWidgetProps) { const [selectedFile, setSelectedFile] = useState(null); const [previewUrl, setPreviewUrl] = useState(null); @@ -48,20 +50,22 @@ export function TryItWidget({ const [isDragOver, setIsDragOver] = useState(false); const fileInputRef = useRef(null); - const samplePresets = [ - { - label: 'Sample Photo', - url: (tool as any).media?.before || '/management/pages/home/media/sample_portrait_1.jpg', - }, - { - label: 'Natural Studio Model', - url: '/management/pages/home/media/sample_portrait_2.jpg', - }, - { - label: 'Vintage Archival Shot', - url: '/management/pages/home/media/sample_portrait_3.jpg', - }, - ]; + const activePresets = samplePresets && samplePresets.length > 0 + ? samplePresets + : [ + { + label: 'Sample Photo', + url: (tool as any).media?.before || '/management/pages/home/media/sample_portrait_1.jpg', + }, + { + label: 'Natural Studio Model', + url: '/management/pages/home/media/sample_portrait_2.jpg', + }, + { + label: 'Vintage Archival Shot', + url: '/management/pages/home/media/sample_portrait_3.jpg', + }, + ]; const handleFileChange = (file: File) => { const maxMB = tool.tryIt?.limits?.maxMB || 12; @@ -250,7 +254,7 @@ export function TryItWidget({ Or test instantly with a sample photo:

- {samplePresets.map((preset, idx) => ( + {activePresets.map((preset, idx) => (
- - {/* Mobile Link to Preview Comparison */} - {onSwitchToCompare && ( -
- -
- )}
)} @@ -341,7 +331,7 @@ export function TryItWidget({ className="w-full py-4 px-6 rounded-2xl font-bold text-xs sm:text-sm text-white bg-gradient-to-r from-blue-600 to-indigo-600 hover:from-blue-700 hover:to-indigo-700 shadow-md shadow-blue-500/25 transition-all flex items-center justify-center gap-2 active:scale-98" > - Run {resolveLocalised(tool.name, locale)} + {ctaText || `Run ${resolveLocalised(tool.name, locale)}`}
diff --git a/src/components/ui/BrandLogo.tsx b/src/components/ui/BrandLogo.tsx index b9f34de..f5a696c 100644 --- a/src/components/ui/BrandLogo.tsx +++ b/src/components/ui/BrandLogo.tsx @@ -15,73 +15,195 @@ export function BrandLogo({ asLink = true, }: BrandLogoProps) { const iconDimensions = { - sm: { w: 32, h: 32, textScale: 'text-base', subText: 'text-[7px]' }, - md: { w: 40, h: 40, textScale: 'text-xl', subText: 'text-[9px]' }, - lg: { w: 52, h: 52, textScale: 'text-2xl', subText: 'text-[11px]' }, + sm: { w: 34, h: 34, textScale: 'text-base', subText: 'text-[7px]' }, + md: { w: 42, h: 42, textScale: 'text-xl', subText: 'text-[9px]' }, + lg: { w: 54, h: 54, textScale: 'text-2xl', subText: 'text-[11px]' }, }[size]; const content = (
- {/* Precision Geometric Aperture Emblem */} + {/* Animated Bright Quantum Prism Emblem */}
- {/* Subtle Ambient Hover Glow */} -
+ {/* Dynamic Multi-Color Neon Ambient Glow */} +
- - - - - - - - - - - - - - - - - - - - + {/* Glossy Bezel Container */} +
+ + + {/* Vibrant Prismatic Gradients */} + + + + - {/* Precision outer neural ring */} - + + + + - {/* Aperture Tri-blade Geometry */} - - - + + + + - {/* Neural Ray Intersections */} - + + + + - {/* Glowing Optical Core */} - - + {/* Core Star Bloom Flare */} + + + + + + - {/* Apex Nodes */} - - - - + {/* Diagonal Light Shimmer Sweep */} + + + + + + + {/* Deep Space Radial Base */} + + + + + + + + + + {/* Cosmic Background Disc */} + + + {/* Outer Orbiting Energy Ring (Clockwise) */} + + + {/* Orbiting Photon Nodes */} + + + + + + {/* Inner Counter-Orbiting Quantum Track */} + + + + + + + {/* Faceted Quantum Crystal Prism (8-Point Isometric Star) */} + + {/* North Facet: Electric Cyan */} + + + {/* East Facet: Electric Purple / Magenta */} + + + {/* South Facet: Solar Amber / Gold */} + + + {/* West Facet: Vibrant Emerald / Teal */} + + + {/* Diagonal Crystalline Diamond Corner Facets */} + + + + + + {/* Geometric Fine Crystal Ridge Wireframe */} + + + + + + {/* Radiant Supernova Core Bloom */} + + + + {/* Central 4-Point Micro Diamond Glint */} + + + + + {/* Sweeping Specular Caustic Glint */} + + +
{/* Typographic Wordmark */} {showWordmark && (
- + CRE diff --git a/src/components/ui/CardBeforeAfterSlider.tsx b/src/components/ui/CardBeforeAfterSlider.tsx index 25aa80f..25fccce 100644 --- a/src/components/ui/CardBeforeAfterSlider.tsx +++ b/src/components/ui/CardBeforeAfterSlider.tsx @@ -157,7 +157,7 @@ export function CardBeforeAfterSlider({ AI enhanced result @@ -171,7 +171,7 @@ export function CardBeforeAfterSlider({ Original input diff --git a/src/lib/config/bindings.ts b/src/lib/config/bindings.ts index 8755f15..43e7b5a 100644 --- a/src/lib/config/bindings.ts +++ b/src/lib/config/bindings.ts @@ -67,6 +67,9 @@ export function isSectionVisible( section: SectionConfig, currentContext: { device?: 'mobile' | 'desktop'; locale?: string; flags?: Record } ): boolean { + if ((section as any).disabled === true || (section as any).enabled === false) { + return false; + } if (!section.visibleWhen) return true; const { device, locale, flag } = section.visibleWhen; diff --git a/src/lib/config/loader.ts b/src/lib/config/loader.ts index 1100443..4e3e058 100644 --- a/src/lib/config/loader.ts +++ b/src/lib/config/loader.ts @@ -50,6 +50,7 @@ export function getPageConfig(slug: string): PageConfig | null { } export function getAllTools(): ToolItem[] { + toolsCache.clear(); // 1. Prioritize management/pages/tools/[slug]/tool.config.json const mgmtToolsDir = path.join(MANAGEMENT_DIR, 'pages', 'tools'); if (fs.existsSync(mgmtToolsDir)) { @@ -103,6 +104,7 @@ export function getToolById(id: string): ToolItem | null { } export function getAllApps(): AppItem[] { + appsCache.clear(); // 1. Prioritize management/apps/[slug]/app.config.json const mgmtAppsDir = path.join(MANAGEMENT_DIR, 'apps'); if (fs.existsSync(mgmtAppsDir)) { diff --git a/src/types/index.ts b/src/types/index.ts index 5c09981..fc89726 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -83,6 +83,8 @@ export interface SectionConfig { id: string; type: string; variant?: string; + disabled?: boolean; + enabled?: boolean; props: Record; visibleWhen?: { device?: 'mobile' | 'desktop';