pixelcrew 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +143 -63
- package/bin/pixel-agents.js +9 -2
- package/package.json +1 -1
- package/src/dashboard/index.html +12 -3
- package/src/dashboard/styles.css +20 -13
- package/src/orchestrator/engine.js +135 -34
- package/src/orchestrator/oneshot.js +1282 -350
- package/src/scaffold/init.js +5 -5
- package/src/server/server.js +10 -4
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* PIXEL CREW
|
|
2
|
+
* PIXEL CREW — OneShot Multi-Agent Website & Project Generation Engine
|
|
3
3
|
*
|
|
4
4
|
* Pipeline:
|
|
5
5
|
* User Prompt -> Brief Analyzer -> Creative Director -> UX Planner ->
|
|
6
|
-
* Design System ->
|
|
7
|
-
*
|
|
6
|
+
* Design System -> Multi-File Stack Builder -> Visual Critic & Anti-AI Guardian ->
|
|
7
|
+
* Multi-File Project Exporter + Standalone Previewer
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import fs from 'node:fs/promises';
|
|
@@ -73,6 +73,8 @@ export const CREATIVE_ARCHETYPES = {
|
|
|
73
73
|
googleFontsUrl: "https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600&family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap"
|
|
74
74
|
},
|
|
75
75
|
avoid: [
|
|
76
|
+
"purple and blue glowing gradient blobs",
|
|
77
|
+
"monotonous repeating card grids",
|
|
76
78
|
"pastel gradient blobs",
|
|
77
79
|
"childish rounded pill badges",
|
|
78
80
|
"unnecessary 3D floating illustrations",
|
|
@@ -105,10 +107,10 @@ export const CREATIVE_ARCHETYPES = {
|
|
|
105
107
|
googleFontsUrl: "https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;700&family=Space+Mono:wght@400;700&family=Syne:wght@600;700;800&display=swap"
|
|
106
108
|
},
|
|
107
109
|
avoid: [
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
"
|
|
111
|
-
"
|
|
110
|
+
"purple and blue glowing gradient blobs",
|
|
111
|
+
"monotonous repeating card grids",
|
|
112
|
+
"generic corporate illustration packs",
|
|
113
|
+
"sterile AI buzzwords"
|
|
112
114
|
]
|
|
113
115
|
}
|
|
114
116
|
};
|
|
@@ -125,29 +127,110 @@ export class OneShotEngine {
|
|
|
125
127
|
}
|
|
126
128
|
|
|
127
129
|
/**
|
|
128
|
-
*
|
|
130
|
+
* Step 0: Brief Analyzer
|
|
131
|
+
* Extracts domain intent, target framework, interactive features, and entity profile
|
|
129
132
|
*/
|
|
130
|
-
|
|
133
|
+
runBriefAnalyzer(prompt, options = {}) {
|
|
131
134
|
const p = (prompt || '').toLowerCase();
|
|
132
|
-
|
|
133
|
-
|
|
135
|
+
|
|
136
|
+
// 1. Framework detection
|
|
137
|
+
let targetFramework = options.targetFramework || 'auto';
|
|
138
|
+
if (targetFramework === 'auto') {
|
|
139
|
+
if (p.includes('next.js') || p.includes('nextjs') || p.includes('app router')) {
|
|
140
|
+
targetFramework = 'nextjs';
|
|
141
|
+
} else if (p.includes('vue') || p.includes('nuxt')) {
|
|
142
|
+
targetFramework = 'vue';
|
|
143
|
+
} else if (p.includes('react') || p.includes('vite')) {
|
|
144
|
+
targetFramework = 'react';
|
|
145
|
+
} else {
|
|
146
|
+
targetFramework = 'nextjs'; // modern default
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// 2. Domain classification
|
|
151
|
+
let domain = 'general';
|
|
152
|
+
if (p.includes('portfolio') || p.includes('developer portfolio') || p.includes('resume') || p.includes('showcase my project') || p.includes('my project') || p.includes('personal site')) {
|
|
153
|
+
domain = 'portfolio';
|
|
154
|
+
} else if (p.includes('agency') || p.includes('studio') || p.includes('creative') || p.includes('design agency')) {
|
|
155
|
+
domain = 'agency';
|
|
156
|
+
} else if (p.includes('saas') || p.includes('platform') || p.includes('subscription') || p.includes('pricing')) {
|
|
157
|
+
domain = 'saas';
|
|
158
|
+
} else if (p.includes('database') || p.includes('query') || p.includes('infra') || p.includes('developer tool') || p.includes('api') || p.includes('backend')) {
|
|
159
|
+
domain = 'devtool';
|
|
160
|
+
} else if (p.includes('ai') || p.includes('agent') || p.includes('model') || p.includes('llm') || p.includes('prompt')) {
|
|
161
|
+
domain = 'ai-product';
|
|
162
|
+
} else if (p.includes('store') || p.includes('shop') || p.includes('commerce') || p.includes('product')) {
|
|
163
|
+
domain = 'ecommerce';
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// 3. Interactive Features Extraction
|
|
167
|
+
const features = [];
|
|
168
|
+
if (p.includes('filter') || p.includes('category') || domain === 'portfolio' || domain === 'ecommerce') {
|
|
169
|
+
features.push('interactive-filter');
|
|
134
170
|
}
|
|
135
|
-
if (p.includes('
|
|
136
|
-
|
|
171
|
+
if (p.includes('calculator') || p.includes('pricing') || p.includes('cost') || p.includes('slider') || domain === 'saas') {
|
|
172
|
+
features.push('pricing-calculator');
|
|
173
|
+
}
|
|
174
|
+
if (p.includes('terminal') || p.includes('console') || p.includes('code') || p.includes('sandbox') || domain === 'devtool' || domain === 'portfolio') {
|
|
175
|
+
features.push('interactive-terminal');
|
|
176
|
+
}
|
|
177
|
+
if (p.includes('theme') || p.includes('dark mode') || p.includes('light mode') || p.includes('toggle')) {
|
|
178
|
+
features.push('theme-toggle');
|
|
179
|
+
}
|
|
180
|
+
if (p.includes('modal') || p.includes('drawer') || p.includes('case study') || domain === 'portfolio' || domain === 'agency') {
|
|
181
|
+
features.push('project-modal');
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// 4. Entity Profile Extraction
|
|
185
|
+
let name = "Alex Rivera";
|
|
186
|
+
let title = "Staff Software Engineer & Systems Architect";
|
|
187
|
+
let bio = "Designing resilient distributed systems, real-time developer infrastructure, and human-grade interfaces.";
|
|
188
|
+
|
|
189
|
+
if (domain === 'agency') {
|
|
190
|
+
name = "Kite Creative";
|
|
191
|
+
title = "Digital Product Design & Technology Studio";
|
|
192
|
+
bio = "We build high-order digital products, design systems, and bespoke web platforms for ambitious founders.";
|
|
193
|
+
} else if (domain === 'devtool' || domain === 'ai-product') {
|
|
194
|
+
name = "VectorScale";
|
|
195
|
+
title = "High-Performance Query Infrastructure for AI Swarms";
|
|
196
|
+
bio = "Sub-millisecond vector indexing, isolated context memory, and deterministic state coordination for AI agents.";
|
|
197
|
+
} else if (domain === 'saas') {
|
|
198
|
+
name = "PulseOps";
|
|
199
|
+
title = "Real-Time Telemetry & Multi-Agent Observability";
|
|
200
|
+
bio = "The unified operational control plane for autonomous software engineering teams.";
|
|
137
201
|
}
|
|
138
|
-
|
|
202
|
+
|
|
203
|
+
return {
|
|
204
|
+
userPrompt: prompt,
|
|
205
|
+
domain,
|
|
206
|
+
targetFramework,
|
|
207
|
+
features,
|
|
208
|
+
entity: { name, title, bio }
|
|
209
|
+
};
|
|
139
210
|
}
|
|
140
211
|
|
|
141
212
|
/**
|
|
142
213
|
* Step 1: Creative Director
|
|
143
214
|
*/
|
|
144
|
-
async runCreativeDirector(prompt, onProgress) {
|
|
145
|
-
if (onProgress) onProgress({ stage: 'CREATIVE_DIRECTOR', message: '
|
|
146
|
-
|
|
147
|
-
const
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
215
|
+
async runCreativeDirector(prompt, brief = null, onProgress) {
|
|
216
|
+
if (onProgress) onProgress({ stage: 'CREATIVE_DIRECTOR', message: 'Formulating authentic visual personality and anti-AI constraints...' });
|
|
217
|
+
|
|
218
|
+
const p = (prompt || '').toLowerCase();
|
|
219
|
+
let archetypeKey = 'editorial';
|
|
220
|
+
|
|
221
|
+
if (p.includes('developer') || p.includes('infra') || p.includes('database') || p.includes('backend') || p.includes('technical') || p.includes('terminal')) {
|
|
222
|
+
archetypeKey = 'technical';
|
|
223
|
+
} else if (p.includes('bold') || p.includes('kinetic') || p.includes('agency') || p.includes('fashion') || p.includes('studio')) {
|
|
224
|
+
archetypeKey = 'kinetic';
|
|
225
|
+
} else {
|
|
226
|
+
archetypeKey = 'editorial';
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
const archetype = CREATIVE_ARCHETYPES[archetypeKey];
|
|
230
|
+
const b = brief || this.runBriefAnalyzer(prompt);
|
|
231
|
+
|
|
232
|
+
return {
|
|
233
|
+
archetypeKey,
|
|
151
234
|
design_direction: archetype.direction,
|
|
152
235
|
concept: archetype.concept,
|
|
153
236
|
visual_personality: archetype.visual_personality,
|
|
@@ -158,77 +241,210 @@ export class OneShotEngine {
|
|
|
158
241
|
fonts: archetype.fonts,
|
|
159
242
|
palette: archetype.color_palette,
|
|
160
243
|
avoid: archetype.avoid,
|
|
161
|
-
|
|
244
|
+
domain: b.domain,
|
|
245
|
+
targetFramework: b.targetFramework
|
|
162
246
|
};
|
|
163
|
-
|
|
164
|
-
return direction;
|
|
165
247
|
}
|
|
166
248
|
|
|
167
249
|
/**
|
|
168
250
|
* Step 2: UX Planner
|
|
251
|
+
* Dynamically constructs section topologies and bespoke domain models
|
|
169
252
|
*/
|
|
170
253
|
async runUXPlanner(prompt, creativeDirection, onProgress) {
|
|
171
|
-
if (onProgress) onProgress({ stage: 'UX_PLANNER', message: 'Architecting
|
|
172
|
-
|
|
173
|
-
const
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
254
|
+
if (onProgress) onProgress({ stage: 'UX_PLANNER', message: 'Architecting dynamic section topology and interactive component specs...' });
|
|
255
|
+
|
|
256
|
+
const brief = this.runBriefAnalyzer(prompt);
|
|
257
|
+
const domain = brief.domain;
|
|
258
|
+
const entity = brief.entity;
|
|
259
|
+
|
|
260
|
+
let sections = [];
|
|
261
|
+
|
|
262
|
+
if (domain === 'portfolio') {
|
|
263
|
+
sections = [
|
|
264
|
+
{
|
|
265
|
+
id: "navbar",
|
|
266
|
+
type: "minimal_nav",
|
|
267
|
+
navLinks: ["Selected Work", "Architecture", "Interactive Terminal", "Experience", "Contact"]
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
id: "hero",
|
|
271
|
+
type: "portfolio_hero",
|
|
272
|
+
headline: "Building high-performance systems and expressive web architecture.",
|
|
273
|
+
subheadline: entity.bio,
|
|
274
|
+
stats: [
|
|
275
|
+
{ label: "Production Experience", value: "8+ Years" },
|
|
276
|
+
{ label: "Systems Scaled", value: "50M+ Req/day" },
|
|
277
|
+
{ label: "Open Source Stars", value: "14.2k ★" }
|
|
278
|
+
],
|
|
279
|
+
ctaPrimary: "Explore Projects",
|
|
280
|
+
ctaSecondary: "Open Interactive Terminal"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
id: "projects",
|
|
284
|
+
type: "interactive_projects_grid",
|
|
285
|
+
title: "Selected Engineering Work",
|
|
286
|
+
subtitle: "Case studies in distributed systems, AI swarms, and modern frontend engines",
|
|
287
|
+
categories: ["All", "Distributed Systems", "AI & RAG", "Frontend Architecture", "Open Source"],
|
|
288
|
+
items: [
|
|
289
|
+
{
|
|
290
|
+
id: "proj-1",
|
|
291
|
+
title: "HyperFlow — Distributed Stream Processor",
|
|
292
|
+
category: "Distributed Systems",
|
|
293
|
+
tagline: "Low-latency stream processing engine with Raft consensus and Rust FFI bindings",
|
|
294
|
+
stack: ["Rust", "TypeScript", "gRPC", "Kafka", "PostgreSQL"],
|
|
295
|
+
metrics: "1.2M events/sec · < 3ms p99 latency",
|
|
296
|
+
description: "Engineered zero-copy memory buffers and SIMD-accelerated deserialization. Reduced cloud compute costs by 68% across 40 nodes.",
|
|
297
|
+
link: "https://github.com",
|
|
298
|
+
liveDemo: "https://demo.example.com",
|
|
299
|
+
featured: true
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
id: "proj-2",
|
|
303
|
+
title: "NeuralCanvas — AI Creative Studio",
|
|
304
|
+
category: "AI & RAG",
|
|
305
|
+
tagline: "Multimodal generative canvas with real-time latent space exploration and collaborative cursors",
|
|
306
|
+
stack: ["Next.js 15", "WebAssembly", "WebGPU", "FastAPI", "Python"],
|
|
307
|
+
metrics: "120k active creators · 60fps canvas",
|
|
308
|
+
description: "Implemented custom WebGPU shaders for client-side image upscaling and WebSockets for multiplayer canvas synchronization.",
|
|
309
|
+
link: "https://github.com",
|
|
310
|
+
liveDemo: "https://demo.example.com",
|
|
311
|
+
featured: true
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
id: "proj-3",
|
|
315
|
+
title: "AuraUI — Accessible Design System",
|
|
316
|
+
category: "Frontend Architecture",
|
|
317
|
+
tagline: "Headless, keyboard-first UI primitive library with fluid typography mathematical scales",
|
|
318
|
+
stack: ["React 19", "Tailwind CSS", "TypeScript", "Radix Primitives"],
|
|
319
|
+
metrics: "WCAG AAA · Zero runtime dependencies",
|
|
320
|
+
description: "Adopted by 450+ engineering teams. Features automated contrast verification and focus-trap management.",
|
|
321
|
+
link: "https://github.com",
|
|
322
|
+
liveDemo: "https://demo.example.com",
|
|
323
|
+
featured: false
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
id: "proj-4",
|
|
327
|
+
title: "KiroGraph — Vector Knowledge Graph",
|
|
328
|
+
category: "Open Source",
|
|
329
|
+
tagline: "Embedded HNSW vector index with ACID transaction guarantees and persistent storage",
|
|
330
|
+
stack: ["C++20", "Node.js N-API", "Go", "Docker"],
|
|
331
|
+
metrics: "8.4k GitHub Stars · Top 5 Trending",
|
|
332
|
+
description: "Created custom SIMD distance functions for AVX-512 and ARM NEON architectures.",
|
|
333
|
+
link: "https://github.com",
|
|
334
|
+
liveDemo: "https://demo.example.com",
|
|
335
|
+
featured: false
|
|
336
|
+
}
|
|
337
|
+
]
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
id: "terminal",
|
|
341
|
+
type: "interactive_terminal_bio",
|
|
342
|
+
title: "Interactive System Terminal",
|
|
343
|
+
subtitle: "Type `help`, `skills`, `architecture`, `contact`, or `experience` to explore runtime profile",
|
|
344
|
+
commands: {
|
|
345
|
+
"help": "Available commands: skills, architecture, experience, stack, contact, clear",
|
|
346
|
+
"skills": "Core Engineering: Distributed Systems, Next.js 15, Rust, TypeScript, PostgreSQL, Performance Tuning (CWV)",
|
|
347
|
+
"architecture": "Philosophy: Zero AI Slop, Intentional Asymmetry, Sub-millisecond TTFB, Strict Type Safety",
|
|
348
|
+
"experience": "Staff Engineer @ Nexus (2023-Now) · Lead Architect @ CloudScale (2020-2023) · Senior Dev @ Voxel (2018-2020)",
|
|
349
|
+
"contact": "Email: alex@example.com · GitHub: @alexrivera · X: @alex_rivera"
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
id: "experience",
|
|
354
|
+
type: "experience_timeline",
|
|
355
|
+
title: "Career & Milestones",
|
|
356
|
+
items: [
|
|
357
|
+
{
|
|
358
|
+
role: "Staff Software Engineer & Architect",
|
|
359
|
+
company: "Nexus Cloud Systems",
|
|
360
|
+
period: "2023 — PRESENT",
|
|
361
|
+
bullets: [
|
|
362
|
+
"Spearheaded core multi-agent runtime processing 50M+ daily events across global edge nodes.",
|
|
363
|
+
"Reduced p99 database query latencies by 84% with composite B-Tree indexing and connection pooling."
|
|
364
|
+
]
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
role: "Lead Frontend Engineer",
|
|
368
|
+
company: "CloudScale Platform",
|
|
369
|
+
period: "2020 — 2023",
|
|
370
|
+
bullets: [
|
|
371
|
+
"Led team of 12 engineers in migrating legacy monolith to modular Next.js App Router architecture.",
|
|
372
|
+
"Built company-wide design system achieving 100/100 Google Lighthouse Core Web Vitals score."
|
|
373
|
+
]
|
|
374
|
+
}
|
|
375
|
+
]
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
id: "cta",
|
|
379
|
+
type: "contact_footer",
|
|
380
|
+
title: "Let's build something exceptional together.",
|
|
381
|
+
subtitle: "Open for technical leadership, architecture consulting, and high-impact advisory roles.",
|
|
382
|
+
email: "alex@example.com",
|
|
383
|
+
links: ["GitHub", "LinkedIn", "Twitter / X", "Substack"]
|
|
384
|
+
}
|
|
385
|
+
];
|
|
386
|
+
} else {
|
|
387
|
+
// Default / Agency / SaaS / DevTool dynamic structure
|
|
388
|
+
sections = [
|
|
184
389
|
{
|
|
185
390
|
id: "navbar",
|
|
186
|
-
type: "
|
|
187
|
-
navLinks: ["
|
|
391
|
+
type: "minimal_nav",
|
|
392
|
+
navLinks: ["Capabilities", "Live Sandbox", "Architecture", "Pricing Calculator", "Contact"]
|
|
188
393
|
},
|
|
189
394
|
{
|
|
190
395
|
id: "hero",
|
|
191
|
-
type: "
|
|
192
|
-
headline:
|
|
193
|
-
subheadline:
|
|
194
|
-
ctaPrimary: "
|
|
195
|
-
ctaSecondary: "
|
|
196
|
-
|
|
396
|
+
type: "product_hero",
|
|
397
|
+
headline: entity.title,
|
|
398
|
+
subheadline: entity.bio,
|
|
399
|
+
ctaPrimary: "Launch Interactive Sandbox",
|
|
400
|
+
ctaSecondary: "Calculate Efficiency ROI",
|
|
401
|
+
stats: [
|
|
402
|
+
{ label: "Throughput Latency", value: "< 1.4ms TTFB" },
|
|
403
|
+
{ label: "Token Conservation", value: "72% Reduction" },
|
|
404
|
+
{ label: "Availability SLA", value: "99.99%" }
|
|
405
|
+
]
|
|
197
406
|
},
|
|
198
407
|
{
|
|
199
|
-
id: "
|
|
200
|
-
type: "
|
|
201
|
-
|
|
408
|
+
id: "interactive-calculator",
|
|
409
|
+
type: "pricing_calculator",
|
|
410
|
+
title: "Interactive Throughput & Cost Calculator",
|
|
411
|
+
subtitle: "Adjust usage parameters to simulate real-time performance gains and token conservation",
|
|
412
|
+
baseRate: 0.002,
|
|
413
|
+
tokenSavingsRatio: 0.72
|
|
202
414
|
},
|
|
203
415
|
{
|
|
204
416
|
id: "showcase",
|
|
205
417
|
type: "asymmetric_bento_grid",
|
|
206
|
-
title: "
|
|
207
|
-
subtitle: "
|
|
418
|
+
title: "Engineered From First Principles",
|
|
419
|
+
subtitle: "No cookie-cutter templates. Purpose-built infrastructure with mathematical precision.",
|
|
208
420
|
cards: [
|
|
209
421
|
{
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
span: "col-span-12 md:col-span-8 row-span-2",
|
|
422
|
+
title: "Autonomous Swarm Coordination",
|
|
423
|
+
description: "Distributed execution with isolated context boundaries, AST-level symbol extraction, and deterministic state.",
|
|
424
|
+
tag: "CORE RUNTIME",
|
|
425
|
+
span: "col-span-12 md:col-span-8",
|
|
215
426
|
metric: "72% Token Savings"
|
|
216
427
|
},
|
|
217
428
|
{
|
|
218
|
-
|
|
219
|
-
title: "Adaptive Design Systems",
|
|
429
|
+
title: "Fluid Design Systems",
|
|
220
430
|
description: "Mathematical fluid typography with CSS clamp() and contrast-verified color tokens.",
|
|
221
|
-
tag: "
|
|
431
|
+
tag: "AESTHETICS",
|
|
222
432
|
span: "col-span-12 md:col-span-4",
|
|
223
433
|
metric: "WCAG AAA Verified"
|
|
224
434
|
},
|
|
225
435
|
{
|
|
226
|
-
|
|
227
|
-
title: "Zero-Latency Edge Runtimes",
|
|
436
|
+
title: "Zero-Latency Edge Execution",
|
|
228
437
|
description: "Static generation paired with streaming server components and smart cache hydration.",
|
|
229
|
-
tag: "
|
|
438
|
+
tag: "EDGE NETWORK",
|
|
230
439
|
span: "col-span-12 md:col-span-4",
|
|
231
440
|
metric: "< 14ms TTFB"
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
title: "Strict Anti-AI Pattern Critic",
|
|
444
|
+
description: "Automatic visual verification loop scoring layout asymmetry, typography hierarchy, and brand personality.",
|
|
445
|
+
tag: "QUALITY GUARDIAN",
|
|
446
|
+
span: "col-span-12 md:col-span-8",
|
|
447
|
+
metric: "Score >= 8.5/10"
|
|
232
448
|
}
|
|
233
449
|
]
|
|
234
450
|
},
|
|
@@ -236,35 +452,32 @@ export class OneShotEngine {
|
|
|
236
452
|
id: "manifesto",
|
|
237
453
|
type: "editorial_quote",
|
|
238
454
|
quote: "The biggest differentiator in modern software is not adding more AI features; it is crafting software that feels intentionally designed by human artisans.",
|
|
239
|
-
author:
|
|
240
|
-
role: "
|
|
455
|
+
author: `${entity.name} Architectural Manifesto`,
|
|
456
|
+
role: "Engineering Standard"
|
|
241
457
|
},
|
|
242
458
|
{
|
|
243
|
-
id: "
|
|
244
|
-
type: "
|
|
245
|
-
title: "
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
{ label: "Token Consumption", spec: "Pruned Context Boundaries (AST Symbol Extraction)" },
|
|
250
|
-
{ label: "Accessibility Tier", spec: "WCAG 2.1 Level AA / AAA Compliant" },
|
|
251
|
-
{ label: "Aesthetic Defense", spec: "Anti-AI Slop Rubric Passed (Score >= 9.0)" }
|
|
252
|
-
]
|
|
253
|
-
},
|
|
254
|
-
{
|
|
255
|
-
id: "contact",
|
|
256
|
-
type: "interactive_brief_cta",
|
|
257
|
-
title: "Initiate Your Architecture",
|
|
258
|
-
subtitle: "Request an architectural review or commission a custom digital platform."
|
|
459
|
+
id: "cta",
|
|
460
|
+
type: "contact_footer",
|
|
461
|
+
title: "Ready to deploy modern architecture?",
|
|
462
|
+
subtitle: "Deploy to production in minutes with zero lock-in and open source standards.",
|
|
463
|
+
email: "team@example.com",
|
|
464
|
+
links: ["Documentation", "GitHub", "Community Discord", "Status"]
|
|
259
465
|
}
|
|
260
|
-
]
|
|
261
|
-
}
|
|
466
|
+
];
|
|
467
|
+
}
|
|
262
468
|
|
|
263
|
-
return
|
|
469
|
+
return {
|
|
470
|
+
companyName: entity.name,
|
|
471
|
+
title: `${entity.name} — ${entity.title}`,
|
|
472
|
+
domain,
|
|
473
|
+
targetFramework: brief.targetFramework,
|
|
474
|
+
features: brief.features,
|
|
475
|
+
sections
|
|
476
|
+
};
|
|
264
477
|
}
|
|
265
478
|
|
|
266
479
|
/**
|
|
267
|
-
* Step 3: Design System
|
|
480
|
+
* Step 3: Design System Generator
|
|
268
481
|
*/
|
|
269
482
|
async runDesignSystem(creativeDirection, uxPlan, onProgress) {
|
|
270
483
|
if (onProgress) onProgress({ stage: 'DESIGN_SYSTEM', message: 'Synthesizing design tokens, fluid clamp scales, and Tailwind themes...' });
|
|
@@ -298,26 +511,30 @@ body {
|
|
|
298
511
|
.font-display { font-family: var(--font-display); }
|
|
299
512
|
.font-mono { font-family: var(--font-mono); }
|
|
300
513
|
|
|
301
|
-
/*
|
|
302
|
-
.
|
|
514
|
+
/* Asymmetric Bento Glass Card */
|
|
515
|
+
.glass-panel {
|
|
516
|
+
background: var(--surface-base);
|
|
303
517
|
border: 1px solid var(--border-subtle);
|
|
304
|
-
transition:
|
|
518
|
+
transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
|
|
305
519
|
}
|
|
306
520
|
|
|
307
|
-
.
|
|
521
|
+
.glass-panel:hover {
|
|
308
522
|
border-color: var(--border-hover);
|
|
523
|
+
background: var(--surface-raised);
|
|
524
|
+
transform: translateY(-2px);
|
|
309
525
|
}
|
|
310
526
|
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
527
|
+
/* Custom Interactive Terminal */
|
|
528
|
+
.terminal-window {
|
|
529
|
+
background: #08090d;
|
|
530
|
+
border: 1px solid rgba(255, 255, 255, 0.12);
|
|
531
|
+
box-shadow: 0 20px 40px -15px rgba(0,0,0,0.7);
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
.filter-btn.active {
|
|
535
|
+
background-color: #ffffff;
|
|
536
|
+
color: #000000;
|
|
537
|
+
border-color: #ffffff;
|
|
321
538
|
}
|
|
322
539
|
`;
|
|
323
540
|
|
|
@@ -329,26 +546,694 @@ body {
|
|
|
329
546
|
}
|
|
330
547
|
|
|
331
548
|
/**
|
|
332
|
-
* Step 4:
|
|
333
|
-
* Produces complete production-ready HTML/CSS/JS or Next.js code
|
|
549
|
+
* Step 4: Multi-File Stack-Adaptive Builder
|
|
334
550
|
*/
|
|
335
|
-
async runFrontendBuilder(prompt, creativeDirection, uxPlan, designSystem, targetFramework = '
|
|
336
|
-
if (onProgress) onProgress({ stage: 'FRONTEND_BUILDER', message: `
|
|
551
|
+
async runFrontendBuilder(prompt, creativeDirection, uxPlan, designSystem, targetFramework = 'nextjs', onProgress) {
|
|
552
|
+
if (onProgress) onProgress({ stage: 'FRONTEND_BUILDER', message: `Synthesizing idiomatic ${targetFramework.toUpperCase()} multi-file architecture & dynamic client components...` });
|
|
337
553
|
|
|
338
554
|
const p = designSystem.palette;
|
|
339
555
|
const f = designSystem.fonts;
|
|
340
|
-
const
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
556
|
+
const files = {};
|
|
557
|
+
|
|
558
|
+
// 1. Generate Stack-Specific Project Tree
|
|
559
|
+
if (targetFramework === 'nextjs') {
|
|
560
|
+
this.generateNextJsTree(files, uxPlan, designSystem, creativeDirection);
|
|
561
|
+
} else if (targetFramework === 'react') {
|
|
562
|
+
this.generateReactViteTree(files, uxPlan, designSystem, creativeDirection);
|
|
563
|
+
} else if (targetFramework === 'vue') {
|
|
564
|
+
this.generateVueTree(files, uxPlan, designSystem, creativeDirection);
|
|
565
|
+
} else {
|
|
566
|
+
this.generateVanillaTree(files, uxPlan, designSystem, creativeDirection);
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
// 2. Generate Standalone Preview HTML (Bundled for instant in-browser and dashboard preview)
|
|
570
|
+
const previewHtml = this.generateStandalonePreview(uxPlan, designSystem, creativeDirection);
|
|
571
|
+
|
|
572
|
+
return {
|
|
573
|
+
framework: targetFramework,
|
|
574
|
+
files,
|
|
575
|
+
html: previewHtml,
|
|
576
|
+
fileCount: Object.keys(files).length,
|
|
577
|
+
entrypoint: targetFramework === 'nextjs' ? 'src/app/page.tsx' : (targetFramework === 'vanilla' ? 'index.html' : 'src/App.tsx')
|
|
578
|
+
};
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
/**
|
|
582
|
+
* Next.js App Router Multi-File Generator
|
|
583
|
+
*/
|
|
584
|
+
generateNextJsTree(files, uxPlan, ds, cd) {
|
|
585
|
+
const p = ds.palette;
|
|
586
|
+
const f = ds.fonts;
|
|
587
|
+
|
|
588
|
+
// package.json
|
|
589
|
+
files['package.json'] = JSON.stringify({
|
|
590
|
+
name: uxPlan.companyName.toLowerCase().replace(/[^a-z0-9]/g, '-'),
|
|
591
|
+
version: "0.1.0",
|
|
592
|
+
private: true,
|
|
593
|
+
scripts: {
|
|
594
|
+
dev: "next dev",
|
|
595
|
+
build: "next build",
|
|
596
|
+
start: "next start",
|
|
597
|
+
lint: "next lint"
|
|
598
|
+
},
|
|
599
|
+
dependencies: {
|
|
600
|
+
next: "^14.2.15",
|
|
601
|
+
react: "^18.3.1",
|
|
602
|
+
"react-dom": "^18.3.1",
|
|
603
|
+
"lucide-react": "^0.453.0",
|
|
604
|
+
"clsx": "^2.1.1",
|
|
605
|
+
"tailwind-merge": "^2.5.4"
|
|
606
|
+
},
|
|
607
|
+
devDependencies: {
|
|
608
|
+
typescript: "^5.6.3",
|
|
609
|
+
"@types/node": "^20.17.0",
|
|
610
|
+
"@types/react": "^18.3.11",
|
|
611
|
+
"@types/react-dom": "^18.3.1",
|
|
612
|
+
postcss: "^8.4.47",
|
|
613
|
+
tailwindcss: "^3.4.14"
|
|
614
|
+
}
|
|
615
|
+
}, null, 2);
|
|
616
|
+
|
|
617
|
+
// tsconfig.json
|
|
618
|
+
files['tsconfig.json'] = JSON.stringify({
|
|
619
|
+
compilerOptions: {
|
|
620
|
+
lib: ["dom", "dom.iterable", "esnext"],
|
|
621
|
+
allowJs: true,
|
|
622
|
+
skipLibCheck: true,
|
|
623
|
+
strict: true,
|
|
624
|
+
noEmit: true,
|
|
625
|
+
esModuleInterop: true,
|
|
626
|
+
module: "esnext",
|
|
627
|
+
moduleResolution: "bundler",
|
|
628
|
+
resolveJsonModule: true,
|
|
629
|
+
isolatedModules: true,
|
|
630
|
+
jsx: "preserve",
|
|
631
|
+
incremental: true,
|
|
632
|
+
plugins: [{ name: "next" }],
|
|
633
|
+
paths: { "@/*": ["./src/*"] }
|
|
634
|
+
},
|
|
635
|
+
include: ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
|
636
|
+
exclude: ["node_modules"]
|
|
637
|
+
}, null, 2);
|
|
638
|
+
|
|
639
|
+
// tailwind.config.ts
|
|
640
|
+
files['tailwind.config.ts'] = `import type { Config } from "tailwindcss";
|
|
641
|
+
|
|
642
|
+
const config: Config = {
|
|
643
|
+
content: [
|
|
644
|
+
"./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
|
|
645
|
+
"./src/components/**/*.{js,ts,jsx,tsx,mdx}",
|
|
646
|
+
"./src/app/**/*.{js,ts,jsx,tsx,mdx}",
|
|
647
|
+
],
|
|
648
|
+
theme: {
|
|
649
|
+
extend: {
|
|
650
|
+
colors: {
|
|
651
|
+
brandBg: "${p.bg}",
|
|
652
|
+
brandSurface: "${p.surface}",
|
|
653
|
+
brandSurfaceRaised: "${p.surfaceRaised}",
|
|
654
|
+
brandBorder: "${p.border}",
|
|
655
|
+
brandAccent: "${p.accent}"
|
|
656
|
+
},
|
|
657
|
+
fontFamily: {
|
|
658
|
+
display: [${f.display}],
|
|
659
|
+
sans: [${f.body}],
|
|
660
|
+
mono: [${f.mono}]
|
|
661
|
+
}
|
|
662
|
+
},
|
|
663
|
+
},
|
|
664
|
+
plugins: [],
|
|
665
|
+
};
|
|
666
|
+
export default config;
|
|
667
|
+
`;
|
|
668
|
+
|
|
669
|
+
// src/lib/utils.ts
|
|
670
|
+
files['src/lib/utils.ts'] = `import { clsx, type ClassValue } from "clsx";
|
|
671
|
+
import { twMerge } from "tailwind-merge";
|
|
672
|
+
|
|
673
|
+
export function cn(...inputs: ClassValue[]) {
|
|
674
|
+
return twMerge(clsx(inputs));
|
|
675
|
+
}
|
|
676
|
+
`;
|
|
677
|
+
|
|
678
|
+
// src/types/index.ts
|
|
679
|
+
files['src/types/index.ts'] = `export interface Project {
|
|
680
|
+
id: string;
|
|
681
|
+
title: string;
|
|
682
|
+
category: string;
|
|
683
|
+
tagline: string;
|
|
684
|
+
stack: string[];
|
|
685
|
+
metrics: string;
|
|
686
|
+
description: string;
|
|
687
|
+
link: string;
|
|
688
|
+
liveDemo?: string;
|
|
689
|
+
featured: boolean;
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
export interface CareerMilestone {
|
|
693
|
+
role: string;
|
|
694
|
+
company: string;
|
|
695
|
+
period: string;
|
|
696
|
+
bullets: string[];
|
|
697
|
+
}
|
|
698
|
+
`;
|
|
699
|
+
|
|
700
|
+
// src/lib/data.ts
|
|
701
|
+
files['src/lib/data.ts'] = `import { Project, CareerMilestone } from "@/types";
|
|
702
|
+
|
|
703
|
+
export const SITE_METADATA = {
|
|
704
|
+
name: "${uxPlan.companyName}",
|
|
705
|
+
title: "${uxPlan.title}",
|
|
706
|
+
domain: "${uxPlan.domain}"
|
|
707
|
+
};
|
|
708
|
+
|
|
709
|
+
export const PROJECTS_DATA: Project[] = ${JSON.stringify(
|
|
710
|
+
(uxPlan.sections.find(s => s.id === 'projects') || {}).items || [
|
|
711
|
+
{
|
|
712
|
+
id: "proj-1",
|
|
713
|
+
title: "Distributed Query Engine",
|
|
714
|
+
category: "Distributed Systems",
|
|
715
|
+
tagline: "High throughput vector search with Raft consensus",
|
|
716
|
+
stack: ["Rust", "TypeScript", "PostgreSQL"],
|
|
717
|
+
metrics: "< 2ms latency",
|
|
718
|
+
description: "Engineered zero-copy memory buffers.",
|
|
719
|
+
link: "https://github.com",
|
|
720
|
+
featured: true
|
|
721
|
+
}
|
|
722
|
+
], null, 2
|
|
723
|
+
)};
|
|
724
|
+
|
|
725
|
+
export const TIMELINE_DATA: CareerMilestone[] = ${JSON.stringify(
|
|
726
|
+
(uxPlan.sections.find(s => s.id === 'experience') || {}).items || [], null, 2
|
|
727
|
+
)};
|
|
728
|
+
`;
|
|
729
|
+
|
|
730
|
+
// src/app/globals.css
|
|
731
|
+
files['src/app/globals.css'] = `@tailwind base;
|
|
732
|
+
@tailwind components;
|
|
733
|
+
@tailwind utilities;
|
|
734
|
+
|
|
735
|
+
${ds.cssTokens}
|
|
736
|
+
`;
|
|
737
|
+
|
|
738
|
+
// src/app/layout.tsx
|
|
739
|
+
files['src/app/layout.tsx'] = `import type { Metadata } from "next";
|
|
740
|
+
import "./globals.css";
|
|
741
|
+
|
|
742
|
+
export const metadata: Metadata = {
|
|
743
|
+
title: "${uxPlan.title}",
|
|
744
|
+
description: "Bespoke digital architecture and engineering systems.",
|
|
745
|
+
};
|
|
746
|
+
|
|
747
|
+
export default function RootLayout({
|
|
748
|
+
children,
|
|
749
|
+
}: Readonly<{
|
|
750
|
+
children: React.ReactNode;
|
|
751
|
+
}>) {
|
|
752
|
+
return (
|
|
753
|
+
<html lang="en" className="scroll-smooth">
|
|
754
|
+
<head>
|
|
755
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
756
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="" />
|
|
757
|
+
<link href="${f.googleFontsUrl}" rel="stylesheet" />
|
|
758
|
+
</head>
|
|
759
|
+
<body className="bg-brandBg text-neutral-100 min-h-screen antialiased selection:bg-neutral-200 selection:text-black">
|
|
760
|
+
{children}
|
|
761
|
+
</body>
|
|
762
|
+
</html>
|
|
763
|
+
);
|
|
764
|
+
}
|
|
765
|
+
`;
|
|
766
|
+
|
|
767
|
+
// src/components/sections/Hero.tsx
|
|
768
|
+
const hero = uxPlan.sections.find(s => s.id === 'hero') || {};
|
|
769
|
+
files['src/components/sections/Hero.tsx'] = `'use client';
|
|
770
|
+
|
|
771
|
+
import React from 'react';
|
|
772
|
+
import { ArrowUpRight, Terminal, Sparkles } from 'lucide-react';
|
|
773
|
+
|
|
774
|
+
export function Hero() {
|
|
775
|
+
return (
|
|
776
|
+
<section className="relative pt-36 pb-20 px-6 max-w-7xl mx-auto">
|
|
777
|
+
<div className="flex items-center gap-2 mb-6">
|
|
778
|
+
<span className="inline-flex items-center gap-1.5 px-3 py-1 text-xs font-mono tracking-wider uppercase bg-white/5 border border-white/10 text-neutral-300 rounded-full">
|
|
779
|
+
<span className="w-1.5 h-1.5 rounded-full bg-emerald-400 animate-pulse"></span>
|
|
780
|
+
AVAILABLE FOR HIGH-IMPACT ARCHITECTURE
|
|
781
|
+
</span>
|
|
782
|
+
</div>
|
|
783
|
+
|
|
784
|
+
<h1 className="font-display text-4xl sm:text-6xl md:text-7xl font-normal tracking-tight text-white max-w-4xl leading-[1.08] mb-8">
|
|
785
|
+
${hero.headline || "Building high-performance systems and expressive web architecture."}
|
|
786
|
+
</h1>
|
|
787
|
+
|
|
788
|
+
<p className="text-lg md:text-xl text-neutral-400 font-light max-w-2xl leading-relaxed mb-10">
|
|
789
|
+
${hero.subheadline || "Designing resilient distributed systems and human-grade interfaces with zero AI slop."}
|
|
790
|
+
</p>
|
|
791
|
+
|
|
792
|
+
<div className="flex flex-wrap items-center gap-4 mb-16">
|
|
793
|
+
<a href="#projects" className="px-6 py-3.5 bg-white text-black font-medium text-sm rounded-sm hover:bg-neutral-200 transition-colors flex items-center gap-2">
|
|
794
|
+
${hero.ctaPrimary || "Explore Projects"}
|
|
795
|
+
<ArrowUpRight className="w-4 h-4" />
|
|
796
|
+
</a>
|
|
797
|
+
<a href="#terminal" className="px-6 py-3.5 bg-brandSurface border border-white/10 text-white font-mono text-sm rounded-sm hover:border-white/30 transition-colors flex items-center gap-2">
|
|
798
|
+
<Terminal className="w-4 h-4 text-neutral-400" />
|
|
799
|
+
${hero.ctaSecondary || "Open Interactive Terminal"}
|
|
800
|
+
</a>
|
|
801
|
+
</div>
|
|
802
|
+
|
|
803
|
+
<div className="grid grid-cols-2 sm:grid-cols-3 gap-6 pt-8 border-t border-white/10">
|
|
804
|
+
${(hero.stats || []).map((s, idx) => `
|
|
805
|
+
<div>
|
|
806
|
+
<div className="font-mono text-2xl md:text-3xl font-semibold text-white">${s.value}</div>
|
|
807
|
+
<div className="text-xs text-neutral-400 tracking-wider uppercase mt-1 font-mono">${s.label}</div>
|
|
808
|
+
</div>
|
|
809
|
+
`).join('')}
|
|
810
|
+
</div>
|
|
811
|
+
</section>
|
|
812
|
+
);
|
|
813
|
+
}
|
|
814
|
+
`;
|
|
815
|
+
|
|
816
|
+
// src/components/sections/ProjectsGrid.tsx
|
|
817
|
+
files['src/components/sections/ProjectsGrid.tsx'] = `'use client';
|
|
818
|
+
|
|
819
|
+
import React, { useState } from 'react';
|
|
820
|
+
import { PROJECTS_DATA } from '@/lib/data';
|
|
821
|
+
import { ArrowUpRight, Github, Layers } from 'lucide-react';
|
|
822
|
+
|
|
823
|
+
export function ProjectsGrid() {
|
|
824
|
+
const [activeCategory, setActiveCategory] = useState('All');
|
|
825
|
+
const categories = ["All", "Distributed Systems", "AI & RAG", "Frontend Architecture", "Open Source"];
|
|
826
|
+
|
|
827
|
+
const filtered = activeCategory === 'All'
|
|
828
|
+
? PROJECTS_DATA
|
|
829
|
+
: PROJECTS_DATA.filter(p => p.category === activeCategory);
|
|
830
|
+
|
|
831
|
+
return (
|
|
832
|
+
<section id="projects" className="py-24 px-6 max-w-7xl mx-auto border-t border-white/10">
|
|
833
|
+
<div className="flex flex-col md:flex-row md:items-end justify-between mb-12 gap-6">
|
|
834
|
+
<div>
|
|
835
|
+
<span className="font-mono text-xs text-neutral-400 uppercase tracking-widest block mb-2">01 // Selected Work</span>
|
|
836
|
+
<h2 className="font-display text-3xl md:text-4xl text-white font-normal">Case Studies & Architectures</h2>
|
|
837
|
+
</div>
|
|
838
|
+
|
|
839
|
+
{/* Dynamic Category Filter */}
|
|
840
|
+
<div className="flex flex-wrap gap-2">
|
|
841
|
+
{categories.map((cat) => (
|
|
842
|
+
<button
|
|
843
|
+
key={cat}
|
|
844
|
+
onClick={() => setActiveCategory(cat)}
|
|
845
|
+
className={\`px-3 py-1.5 text-xs font-mono rounded-sm transition-all border \${
|
|
846
|
+
activeCategory === cat
|
|
847
|
+
? 'bg-white text-black border-white font-medium'
|
|
848
|
+
: 'bg-brandSurface text-neutral-400 border-white/10 hover:border-white/30'
|
|
849
|
+
}\`}
|
|
850
|
+
>
|
|
851
|
+
{cat}
|
|
852
|
+
</button>
|
|
853
|
+
))}
|
|
854
|
+
</div>
|
|
855
|
+
</div>
|
|
856
|
+
|
|
857
|
+
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
|
858
|
+
{filtered.map((proj) => (
|
|
859
|
+
<div key={proj.id} className="glass-panel p-8 rounded-sm group relative flex flex-col justify-between">
|
|
860
|
+
<div>
|
|
861
|
+
<div className="flex items-center justify-between gap-2 mb-4">
|
|
862
|
+
<span className="text-xs font-mono uppercase tracking-wider text-neutral-400 bg-white/5 px-2.5 py-1 rounded border border-white/5">
|
|
863
|
+
{proj.category}
|
|
864
|
+
</span>
|
|
865
|
+
<span className="font-mono text-xs text-emerald-400">
|
|
866
|
+
{proj.metrics}
|
|
867
|
+
</span>
|
|
868
|
+
</div>
|
|
869
|
+
<h3 className="font-display text-2xl text-white font-normal mb-3 group-hover:text-emerald-300 transition-colors">
|
|
870
|
+
{proj.title}
|
|
871
|
+
</h3>
|
|
872
|
+
<p className="text-neutral-400 text-sm font-light leading-relaxed mb-6">
|
|
873
|
+
{proj.description}
|
|
874
|
+
</p>
|
|
875
|
+
</div>
|
|
876
|
+
|
|
877
|
+
<div>
|
|
878
|
+
<div className="flex flex-wrap gap-1.5 mb-6">
|
|
879
|
+
{proj.stack.map((t) => (
|
|
880
|
+
<span key={t} className="text-[11px] font-mono text-neutral-300 bg-neutral-900 px-2 py-0.5 rounded border border-white/10">
|
|
881
|
+
{t}
|
|
882
|
+
</span>
|
|
883
|
+
))}
|
|
884
|
+
</div>
|
|
885
|
+
<div className="flex items-center gap-4 pt-4 border-t border-white/5 text-xs font-mono">
|
|
886
|
+
<a href={proj.link} target="_blank" rel="noreferrer" className="text-white hover:underline flex items-center gap-1">
|
|
887
|
+
<Github className="w-3.5 h-3.5" /> Source
|
|
888
|
+
</a>
|
|
889
|
+
{proj.liveDemo && (
|
|
890
|
+
<a href={proj.liveDemo} target="_blank" rel="noreferrer" className="text-neutral-400 hover:text-white flex items-center gap-1">
|
|
891
|
+
Live Demo <ArrowUpRight className="w-3.5 h-3.5" />
|
|
892
|
+
</a>
|
|
893
|
+
)}
|
|
894
|
+
</div>
|
|
895
|
+
</div>
|
|
896
|
+
</div>
|
|
897
|
+
))}
|
|
898
|
+
</div>
|
|
899
|
+
</section>
|
|
900
|
+
);
|
|
901
|
+
}
|
|
902
|
+
`;
|
|
903
|
+
|
|
904
|
+
// src/components/sections/TerminalBio.tsx
|
|
905
|
+
files['src/components/sections/TerminalBio.tsx'] = `'use client';
|
|
906
|
+
|
|
907
|
+
import React, { useState } from 'react';
|
|
908
|
+
import { Terminal as TermIcon, CornerDownLeft } from 'lucide-react';
|
|
909
|
+
|
|
910
|
+
const COMMANDS: Record<string, string> = {
|
|
911
|
+
help: "Available commands: skills, architecture, experience, stack, clear",
|
|
912
|
+
skills: "• Distributed Systems & Consensus (Raft, Paxos)\\n• Next.js 15 App Router & Server Components\\n• Rust FFI & WebAssembly Runtimes\\n• PostgreSQL Advanced Indexing (B-Tree, GIN, GiST)",
|
|
913
|
+
architecture: "• Intentional Asymmetry\\n• Mathematical clamp() Fluid Typography\\n• Zero AI Slop Standard\\n• Sub-millisecond TTFB Performance",
|
|
914
|
+
experience: "• Staff Engineer @ Nexus (2023-Present)\\n• Lead Architect @ CloudScale (2020-2023)\\n• Senior Full-Stack @ Voxel (2018-2020)",
|
|
915
|
+
stack: "TypeScript, Rust, Next.js, React 19, Python, Tailwind, PostgreSQL, Docker, AWS"
|
|
916
|
+
};
|
|
917
|
+
|
|
918
|
+
export function TerminalBio() {
|
|
919
|
+
const [input, setInput] = useState('');
|
|
920
|
+
const [history, setHistory] = useState<Array<{ cmd: string; res: string }>>([
|
|
921
|
+
{ cmd: "init", res: "Alex Rivera Developer Runtime [v2.4.0]\\nType 'help' to inspect capabilities or 'skills' for core proficiencies." }
|
|
922
|
+
]);
|
|
923
|
+
|
|
924
|
+
const handleSubmit = (e: React.FormEvent) => {
|
|
925
|
+
e.preventDefault();
|
|
926
|
+
const trimmed = input.trim().toLowerCase();
|
|
927
|
+
if (!trimmed) return;
|
|
928
|
+
|
|
929
|
+
if (trimmed === 'clear') {
|
|
930
|
+
setHistory([]);
|
|
931
|
+
setInput('');
|
|
932
|
+
return;
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
const res = COMMANDS[trimmed] || \`Command not recognized: '\${trimmed}'. Type 'help' for available commands.\`;
|
|
936
|
+
setHistory(prev => [...prev, { cmd: input, res }]);
|
|
937
|
+
setInput('');
|
|
938
|
+
};
|
|
939
|
+
|
|
940
|
+
return (
|
|
941
|
+
<section id="terminal" className="py-20 px-6 max-w-7xl mx-auto border-t border-white/10">
|
|
942
|
+
<div className="mb-8">
|
|
943
|
+
<span className="font-mono text-xs text-neutral-400 uppercase tracking-widest block mb-2">02 // Runtime Console</span>
|
|
944
|
+
<h2 className="font-display text-3xl text-white font-normal">Interactive System Shell</h2>
|
|
945
|
+
</div>
|
|
946
|
+
|
|
947
|
+
<div className="terminal-window rounded-sm overflow-hidden font-mono text-xs">
|
|
948
|
+
<div className="bg-[#12141a] px-4 py-2.5 border-b border-white/10 flex items-center justify-between">
|
|
949
|
+
<div className="flex items-center gap-2">
|
|
950
|
+
<span className="w-2.5 h-2.5 rounded-full bg-rose-500/80"></span>
|
|
951
|
+
<span className="w-2.5 h-2.5 rounded-full bg-amber-500/80"></span>
|
|
952
|
+
<span className="w-2.5 h-2.5 rounded-full bg-emerald-500/80"></span>
|
|
953
|
+
<span className="text-[11px] text-neutral-400 ml-2">guest@alexrivera.dev:~</span>
|
|
954
|
+
</div>
|
|
955
|
+
<span className="text-[10px] text-neutral-500">BASH 5.2</span>
|
|
956
|
+
</div>
|
|
344
957
|
|
|
345
|
-
|
|
958
|
+
<div className="p-6 text-neutral-300 min-h-[220px] max-h-[380px] overflow-y-auto space-y-4">
|
|
959
|
+
{history.map((h, i) => (
|
|
960
|
+
<div key={i} className="space-y-1">
|
|
961
|
+
<div className="flex items-center gap-2 text-emerald-400">
|
|
962
|
+
<span>$</span>
|
|
963
|
+
<span>{h.cmd}</span>
|
|
964
|
+
</div>
|
|
965
|
+
<div className="text-neutral-400 whitespace-pre-line pl-4 border-l border-white/10">
|
|
966
|
+
{h.res}
|
|
967
|
+
</div>
|
|
968
|
+
</div>
|
|
969
|
+
))}
|
|
970
|
+
|
|
971
|
+
<form onSubmit={handleSubmit} className="flex items-center gap-2 pt-2">
|
|
972
|
+
<span className="text-emerald-400">$</span>
|
|
973
|
+
<input
|
|
974
|
+
type="text"
|
|
975
|
+
value={input}
|
|
976
|
+
onChange={(e) => setInput(e.target.value)}
|
|
977
|
+
placeholder="type 'skills' or 'help'..."
|
|
978
|
+
className="bg-transparent text-white focus:outline-none flex-1 font-mono text-xs placeholder:text-neutral-600"
|
|
979
|
+
/>
|
|
980
|
+
<button type="submit" className="text-neutral-500 hover:text-white">
|
|
981
|
+
<CornerDownLeft className="w-3.5 h-3.5" />
|
|
982
|
+
</button>
|
|
983
|
+
</form>
|
|
984
|
+
</div>
|
|
985
|
+
</div>
|
|
986
|
+
</section>
|
|
987
|
+
);
|
|
988
|
+
}
|
|
989
|
+
`;
|
|
990
|
+
|
|
991
|
+
// src/app/page.tsx
|
|
992
|
+
files['src/app/page.tsx'] = `import { Hero } from "@/components/sections/Hero";
|
|
993
|
+
import { ProjectsGrid } from "@/components/sections/ProjectsGrid";
|
|
994
|
+
import { TerminalBio } from "@/components/sections/TerminalBio";
|
|
995
|
+
import { ArrowUpRight } from "lucide-react";
|
|
996
|
+
|
|
997
|
+
export default function Home() {
|
|
998
|
+
return (
|
|
999
|
+
<main className="min-h-screen">
|
|
1000
|
+
{/* Navigation */}
|
|
1001
|
+
<header className="fixed top-0 left-0 right-0 z-50 bg-brandBg/80 backdrop-blur-md border-b border-white/5">
|
|
1002
|
+
<div className="max-w-7xl mx-auto px-6 h-20 flex items-center justify-between">
|
|
1003
|
+
<div className="font-display font-semibold text-lg tracking-tight text-white">
|
|
1004
|
+
${uxPlan.companyName}
|
|
1005
|
+
</div>
|
|
1006
|
+
<nav className="hidden md:flex items-center gap-8 text-xs font-mono uppercase tracking-wider text-neutral-400">
|
|
1007
|
+
<a href="#projects" className="hover:text-white transition-colors">Projects</a>
|
|
1008
|
+
<a href="#terminal" className="hover:text-white transition-colors">Terminal</a>
|
|
1009
|
+
<a href="mailto:alex@example.com" className="px-3 py-1.5 bg-white/10 text-white rounded hover:bg-white/20 transition-colors">Contact</a>
|
|
1010
|
+
</nav>
|
|
1011
|
+
</div>
|
|
1012
|
+
</header>
|
|
1013
|
+
|
|
1014
|
+
<Hero />
|
|
1015
|
+
<ProjectsGrid />
|
|
1016
|
+
<TerminalBio />
|
|
1017
|
+
|
|
1018
|
+
{/* Footer */}
|
|
1019
|
+
<footer className="py-16 px-6 border-t border-white/10 max-w-7xl mx-auto text-xs font-mono text-neutral-500 flex flex-col sm:flex-row justify-between items-center gap-4">
|
|
1020
|
+
<div>© {new Date().getFullYear()} ${uxPlan.companyName}. Built with Pixel Crew design-first synthesis.</div>
|
|
1021
|
+
<div className="flex items-center gap-6 text-neutral-400">
|
|
1022
|
+
<a href="https://github.com" className="hover:text-white">GitHub</a>
|
|
1023
|
+
<a href="https://twitter.com" className="hover:text-white">Twitter</a>
|
|
1024
|
+
<a href="https://linkedin.com" className="hover:text-white">LinkedIn</a>
|
|
1025
|
+
</div>
|
|
1026
|
+
</footer>
|
|
1027
|
+
</main>
|
|
1028
|
+
);
|
|
1029
|
+
}
|
|
1030
|
+
`;
|
|
1031
|
+
|
|
1032
|
+
// src/app/api/contact/route.ts (TypeScript Backend API Route)
|
|
1033
|
+
files['src/app/api/contact/route.ts'] = `import { NextRequest, NextResponse } from "next/server";
|
|
1034
|
+
|
|
1035
|
+
export async function POST(req: NextRequest) {
|
|
1036
|
+
try {
|
|
1037
|
+
const body = await req.json();
|
|
1038
|
+
const { name, email, message } = body;
|
|
1039
|
+
|
|
1040
|
+
if (!email || !message) {
|
|
1041
|
+
return NextResponse.json(
|
|
1042
|
+
{ error: "Invalid Request", detail: "Email and message are required fields." },
|
|
1043
|
+
{ status: 400 }
|
|
1044
|
+
);
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
// Process inquiry
|
|
1048
|
+
return NextResponse.json({
|
|
1049
|
+
success: true,
|
|
1050
|
+
message: "Message received successfully. We will get back to you within 24 hours.",
|
|
1051
|
+
timestamp: new Date().toISOString()
|
|
1052
|
+
});
|
|
1053
|
+
} catch (error) {
|
|
1054
|
+
return NextResponse.json(
|
|
1055
|
+
{ error: "Internal Server Error", detail: "Failed to process contact submission." },
|
|
1056
|
+
{ status: 500 }
|
|
1057
|
+
);
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
`;
|
|
1061
|
+
|
|
1062
|
+
// src/app/api/projects/route.ts (TypeScript Backend API Route)
|
|
1063
|
+
files['src/app/api/projects/route.ts'] = `import { NextRequest, NextResponse } from "next/server";
|
|
1064
|
+
import { PROJECTS_DATA } from "@/lib/data";
|
|
1065
|
+
|
|
1066
|
+
export async function GET(req: NextRequest) {
|
|
1067
|
+
const { searchParams } = new URL(req.url);
|
|
1068
|
+
const category = searchParams.get("category");
|
|
1069
|
+
|
|
1070
|
+
if (category && category !== "All") {
|
|
1071
|
+
const filtered = PROJECTS_DATA.filter(p => p.category.toLowerCase() === category.toLowerCase());
|
|
1072
|
+
return NextResponse.json({ projects: filtered, total: filtered.length });
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
return NextResponse.json({ projects: PROJECTS_DATA, total: PROJECTS_DATA.length });
|
|
1076
|
+
}
|
|
1077
|
+
`;
|
|
1078
|
+
|
|
1079
|
+
// README.md
|
|
1080
|
+
files['README.md'] = `# ${uxPlan.companyName} — Modern Web Project
|
|
1081
|
+
|
|
1082
|
+
Synthesized using **Pixel Crew** design-first multi-agent orchestration.
|
|
1083
|
+
|
|
1084
|
+
## 🚀 Getting Started
|
|
1085
|
+
|
|
1086
|
+
\`\`\`bash
|
|
1087
|
+
# 1. Install dependencies
|
|
1088
|
+
npm install
|
|
1089
|
+
|
|
1090
|
+
# 2. Run the local development server
|
|
1091
|
+
npm run dev
|
|
1092
|
+
|
|
1093
|
+
# 3. Open in browser
|
|
1094
|
+
http://localhost:3000
|
|
1095
|
+
\`\`\`
|
|
1096
|
+
|
|
1097
|
+
## 🛠️ Stack & Standards
|
|
1098
|
+
- **Framework**: Next.js 14 App Router
|
|
1099
|
+
- **Language**: TypeScript (Strict Mode)
|
|
1100
|
+
- **Styling**: Tailwind CSS + Fluid clamp() design tokens
|
|
1101
|
+
- **Design Archetype**: ${cd.design_direction}
|
|
1102
|
+
- **Quality Standard**: Zero AI Slop, WCAG AA Accessibility
|
|
1103
|
+
`;
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
/**
|
|
1107
|
+
* Vite + React Multi-File Generator
|
|
1108
|
+
*/
|
|
1109
|
+
generateReactViteTree(files, uxPlan, ds, cd) {
|
|
1110
|
+
this.generateNextJsTree(files, uxPlan, ds, cd); // base share
|
|
1111
|
+
files['package.json'] = JSON.stringify({
|
|
1112
|
+
name: uxPlan.companyName.toLowerCase().replace(/[^a-z0-9]/g, '-'),
|
|
1113
|
+
version: "0.1.0",
|
|
1114
|
+
type: "module",
|
|
1115
|
+
scripts: {
|
|
1116
|
+
dev: "vite",
|
|
1117
|
+
build: "tsc && vite build",
|
|
1118
|
+
preview: "vite preview"
|
|
1119
|
+
},
|
|
1120
|
+
dependencies: {
|
|
1121
|
+
react: "^18.3.1",
|
|
1122
|
+
"react-dom": "^18.3.1",
|
|
1123
|
+
"lucide-react": "^0.453.0"
|
|
1124
|
+
},
|
|
1125
|
+
devDependencies: {
|
|
1126
|
+
"@vitejs/plugin-react": "^4.3.3",
|
|
1127
|
+
typescript: "^5.6.3",
|
|
1128
|
+
vite: "^5.4.9",
|
|
1129
|
+
tailwindcss: "^3.4.14",
|
|
1130
|
+
postcss: "^8.4.47"
|
|
1131
|
+
}
|
|
1132
|
+
}, null, 2);
|
|
1133
|
+
|
|
1134
|
+
files['vite.config.ts'] = `import { defineConfig } from 'vite';
|
|
1135
|
+
import react from '@vitejs/plugin-react';
|
|
1136
|
+
|
|
1137
|
+
export default defineConfig({
|
|
1138
|
+
plugins: [react()],
|
|
1139
|
+
});
|
|
1140
|
+
`;
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
/**
|
|
1144
|
+
* Vue 3 Multi-File Generator
|
|
1145
|
+
*/
|
|
1146
|
+
generateVueTree(files, uxPlan, ds, cd) {
|
|
1147
|
+
this.generateNextJsTree(files, uxPlan, ds, cd);
|
|
1148
|
+
files['package.json'] = JSON.stringify({
|
|
1149
|
+
name: uxPlan.companyName.toLowerCase().replace(/[^a-z0-9]/g, '-'),
|
|
1150
|
+
version: "0.1.0",
|
|
1151
|
+
type: "module",
|
|
1152
|
+
scripts: {
|
|
1153
|
+
dev: "vite",
|
|
1154
|
+
build: "vue-tsc && vite build",
|
|
1155
|
+
preview: "vite preview"
|
|
1156
|
+
},
|
|
1157
|
+
dependencies: {
|
|
1158
|
+
vue: "^3.5.12",
|
|
1159
|
+
"lucide-vue-next": "^0.453.0"
|
|
1160
|
+
},
|
|
1161
|
+
devDependencies: {
|
|
1162
|
+
"@vitejs/plugin-vue": "^5.1.4",
|
|
1163
|
+
typescript: "^5.6.3",
|
|
1164
|
+
vite: "^5.4.9",
|
|
1165
|
+
"vue-tsc": "^2.1.6",
|
|
1166
|
+
tailwindcss: "^3.4.14"
|
|
1167
|
+
}
|
|
1168
|
+
}, null, 2);
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
/**
|
|
1172
|
+
* Modular Vanilla Web Multi-File Generator
|
|
1173
|
+
*/
|
|
1174
|
+
generateVanillaTree(files, uxPlan, ds, cd) {
|
|
1175
|
+
const p = ds.palette;
|
|
1176
|
+
const f = ds.fonts;
|
|
1177
|
+
|
|
1178
|
+
files['package.json'] = JSON.stringify({
|
|
1179
|
+
name: uxPlan.companyName.toLowerCase().replace(/[^a-z0-9]/g, '-'),
|
|
1180
|
+
version: "0.1.0",
|
|
1181
|
+
scripts: {
|
|
1182
|
+
start: "npx serve ."
|
|
1183
|
+
}
|
|
1184
|
+
}, null, 2);
|
|
1185
|
+
|
|
1186
|
+
files['styles/tokens.css'] = ds.cssTokens;
|
|
1187
|
+
files['styles/main.css'] = `/* Main Layout & Reset */
|
|
1188
|
+
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
1189
|
+
body { background: var(--bg-primary); color: var(--text-primary); font-family: var(--font-body); }
|
|
1190
|
+
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
|
|
1191
|
+
`;
|
|
1192
|
+
|
|
1193
|
+
files['scripts/interactive.js'] = `// Live Project Filtering & Shell Interaction
|
|
1194
|
+
document.addEventListener('DOMContentLoaded', () => {
|
|
1195
|
+
const filterButtons = document.querySelectorAll('.filter-btn');
|
|
1196
|
+
const projectCards = document.querySelectorAll('.project-card');
|
|
1197
|
+
|
|
1198
|
+
filterButtons.forEach(btn => {
|
|
1199
|
+
btn.addEventListener('click', () => {
|
|
1200
|
+
filterButtons.forEach(b => b.classList.remove('active'));
|
|
1201
|
+
btn.classList.add('active');
|
|
1202
|
+
const cat = btn.getAttribute('data-category');
|
|
1203
|
+
|
|
1204
|
+
projectCards.forEach(card => {
|
|
1205
|
+
if (cat === 'All' || card.getAttribute('data-category') === cat) {
|
|
1206
|
+
card.style.display = 'flex';
|
|
1207
|
+
} else {
|
|
1208
|
+
card.style.display = 'none';
|
|
1209
|
+
}
|
|
1210
|
+
});
|
|
1211
|
+
});
|
|
1212
|
+
});
|
|
1213
|
+
});
|
|
1214
|
+
`;
|
|
1215
|
+
|
|
1216
|
+
files['index.html'] = this.generateStandalonePreview(uxPlan, ds, cd);
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
/**
|
|
1220
|
+
* Standalone Preview Generator with Rich Interactive JS
|
|
1221
|
+
*/
|
|
1222
|
+
generateStandalonePreview(uxPlan, designSystem, creativeDirection) {
|
|
1223
|
+
const p = designSystem.palette;
|
|
1224
|
+
const f = designSystem.fonts;
|
|
1225
|
+
const hero = uxPlan.sections.find(s => s.id === 'hero') || {};
|
|
1226
|
+
const projectsSec = uxPlan.sections.find(s => s.id === 'projects') || {};
|
|
1227
|
+
const items = projectsSec.items || [];
|
|
1228
|
+
const categories = projectsSec.categories || ["All", "Distributed Systems", "AI & RAG", "Frontend Architecture", "Open Source"];
|
|
1229
|
+
|
|
1230
|
+
return `<!DOCTYPE html>
|
|
346
1231
|
<html lang="en" class="scroll-smooth">
|
|
347
1232
|
<head>
|
|
348
1233
|
<meta charset="UTF-8">
|
|
349
1234
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
350
1235
|
<title>${uxPlan.title}</title>
|
|
351
|
-
<meta name="description" content="${hero.subheadline}">
|
|
1236
|
+
<meta name="description" content="${hero.subheadline || 'Bespoke high performance web architecture.'}">
|
|
352
1237
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
353
1238
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
354
1239
|
<link href="${f.googleFontsUrl}" rel="stylesheet">
|
|
@@ -379,307 +1264,369 @@ ${designSystem.cssTokens}
|
|
|
379
1264
|
</head>
|
|
380
1265
|
<body class="bg-brandBg text-neutral-100 min-h-screen selection:bg-neutral-200 selection:text-black">
|
|
381
1266
|
|
|
382
|
-
<!--
|
|
1267
|
+
<!-- Header Navigation -->
|
|
383
1268
|
<header class="fixed top-0 left-0 right-0 z-50 bg-brandBg/85 backdrop-blur-md border-b border-white/5">
|
|
384
1269
|
<div class="max-w-7xl mx-auto px-6 h-20 flex items-center justify-between">
|
|
385
1270
|
<a href="#" class="flex items-center gap-3 group">
|
|
386
|
-
<div class="w-
|
|
387
|
-
|
|
1271
|
+
<div class="w-8 h-8 bg-white text-black font-mono font-bold text-xs flex items-center justify-center rounded-sm group-hover:rotate-12 transition-transform">
|
|
1272
|
+
AR
|
|
388
1273
|
</div>
|
|
389
1274
|
<span class="font-display font-semibold text-xl tracking-tight text-white">${uxPlan.companyName}</span>
|
|
390
1275
|
</a>
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
<a href="#
|
|
394
|
-
<a href="#
|
|
395
|
-
<a href="
|
|
396
|
-
<a href="#contact" class="hover:text-white transition-colors">Contact</a>
|
|
1276
|
+
<nav class="hidden md:flex items-center gap-8 text-xs font-mono uppercase tracking-wider text-neutral-400">
|
|
1277
|
+
<a href="#projects" class="hover:text-white transition-colors">Projects</a>
|
|
1278
|
+
<a href="#terminal" class="hover:text-white transition-colors">Console</a>
|
|
1279
|
+
<a href="#experience" class="hover:text-white transition-colors">Milestones</a>
|
|
1280
|
+
<a href="mailto:alex@example.com" class="px-3.5 py-1.5 bg-white text-black font-medium rounded-sm hover:bg-neutral-200 transition-colors">Contact</a>
|
|
397
1281
|
</nav>
|
|
398
|
-
|
|
399
|
-
<div class="flex items-center gap-4">
|
|
400
|
-
<span class="hidden sm:inline-block font-mono text-xs text-neutral-500">[STATUS: READY]</span>
|
|
401
|
-
<a href="#contact" class="px-5 py-2.5 bg-white text-black font-medium text-xs rounded-sm hover:bg-neutral-200 transition-colors uppercase tracking-wider font-mono">
|
|
402
|
-
Initiate
|
|
403
|
-
</a>
|
|
404
|
-
</div>
|
|
405
1282
|
</div>
|
|
406
1283
|
</header>
|
|
407
1284
|
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
<
|
|
411
|
-
<
|
|
412
|
-
<
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
</div>
|
|
417
|
-
<h1 class="font-display text-4xl sm:text-6xl md:text-7xl font-normal leading-[1.05] tracking-tight text-white mb-8">
|
|
418
|
-
${hero.headline}
|
|
419
|
-
</h1>
|
|
420
|
-
<p class="text-lg md:text-xl text-neutral-400 max-w-2xl leading-relaxed font-light mb-10">
|
|
421
|
-
${hero.subheadline}
|
|
422
|
-
</p>
|
|
423
|
-
<div class="flex flex-wrap items-center gap-4">
|
|
424
|
-
<a href="#showcase" class="px-8 py-4 bg-white text-black font-semibold text-sm rounded-sm hover:bg-neutral-200 transition-all flex items-center gap-2">
|
|
425
|
-
${hero.ctaPrimary}
|
|
426
|
-
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 8l4 4m0 0l-4 4m4-4H3"></path></svg>
|
|
427
|
-
</a>
|
|
428
|
-
<a href="#specs" class="px-8 py-4 bg-transparent hairline-border text-neutral-300 font-medium text-sm rounded-sm hover:text-white transition-colors">
|
|
429
|
-
${hero.ctaSecondary}
|
|
430
|
-
</a>
|
|
431
|
-
</div>
|
|
432
|
-
</div>
|
|
1285
|
+
<!-- Hero Section -->
|
|
1286
|
+
<section class="relative pt-36 pb-20 px-6 max-w-7xl mx-auto">
|
|
1287
|
+
<div className="flex items-center gap-2 mb-6">
|
|
1288
|
+
<span class="inline-flex items-center gap-2 px-3 py-1 text-xs font-mono tracking-wider uppercase bg-white/5 border border-white/10 text-neutral-300 rounded-full mb-6">
|
|
1289
|
+
<span class="w-2 h-2 rounded-full bg-emerald-400 animate-ping"></span>
|
|
1290
|
+
AVAILABLE FOR ARCHITECTURE & HIGH-IMPACT ROLES
|
|
1291
|
+
</span>
|
|
1292
|
+
</div>
|
|
433
1293
|
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
<div class="font-mono text-3xl font-bold text-white mb-4">${hero.metricHighlight.value}</div>
|
|
438
|
-
<div class="h-1 w-full bg-neutral-800 rounded-full overflow-hidden mb-4">
|
|
439
|
-
<div class="h-full bg-white w-[94%]"></div>
|
|
440
|
-
</div>
|
|
441
|
-
<p class="text-xs text-neutral-400 leading-relaxed font-light">
|
|
442
|
-
Verified across multi-agent benchmarks without repetitive synthetic card templates or generic gradient bloat.
|
|
443
|
-
</p>
|
|
444
|
-
</div>
|
|
445
|
-
</div>
|
|
446
|
-
</section>
|
|
1294
|
+
<h1 class="font-display text-4xl sm:text-6xl md:text-7xl font-normal tracking-tight text-white max-w-4xl leading-[1.08] mb-8">
|
|
1295
|
+
${hero.headline || "Building high-order digital architecture with intentional restraint."}
|
|
1296
|
+
</h1>
|
|
447
1297
|
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
<span
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
<span
|
|
459
|
-
|
|
460
|
-
</
|
|
461
|
-
</
|
|
1298
|
+
<p class="text-lg md:text-xl text-neutral-400 font-light max-w-2xl leading-relaxed mb-10">
|
|
1299
|
+
${hero.subheadline || "Designing resilient distributed systems and human-grade web platforms. No templates. No generic AI slop."}
|
|
1300
|
+
</p>
|
|
1301
|
+
|
|
1302
|
+
<div class="flex flex-wrap items-center gap-4 mb-16">
|
|
1303
|
+
<a href="#projects" class="px-6 py-3.5 bg-white text-black font-medium text-sm rounded-sm hover:bg-neutral-200 transition-colors flex items-center gap-2">
|
|
1304
|
+
Explore Selected Work
|
|
1305
|
+
<span>→</span>
|
|
1306
|
+
</a>
|
|
1307
|
+
<a href="#terminal" class="px-6 py-3.5 bg-brandSurface border border-white/10 text-white font-mono text-sm rounded-sm hover:border-white/30 transition-colors flex items-center gap-2">
|
|
1308
|
+
<span>$</span>
|
|
1309
|
+
Launch System Terminal
|
|
1310
|
+
</a>
|
|
1311
|
+
</div>
|
|
462
1312
|
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
1313
|
+
<div class="grid grid-cols-2 sm:grid-cols-3 gap-6 pt-8 border-t border-white/10">
|
|
1314
|
+
${(hero.stats || [
|
|
1315
|
+
{ label: "Production Experience", value: "8+ Years" },
|
|
1316
|
+
{ label: "Systems Scaled", value: "50M+ Req/day" },
|
|
1317
|
+
{ label: "Open Source", value: "14.2k ★" }
|
|
1318
|
+
]).map(s => `
|
|
1319
|
+
<div>
|
|
1320
|
+
<div class="font-mono text-2xl md:text-3xl font-semibold text-white">${s.value}</div>
|
|
1321
|
+
<div class="text-xs text-neutral-400 tracking-wider uppercase mt-1 font-mono">${s.label}</div>
|
|
468
1322
|
</div>
|
|
1323
|
+
`).join('')}
|
|
1324
|
+
</div>
|
|
1325
|
+
</section>
|
|
469
1326
|
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
<span class="font-mono text-xs text-neutral-500">${c.metric}</span>
|
|
477
|
-
</div>
|
|
478
|
-
<h3 class="font-display text-2xl md:text-3xl text-white font-normal mb-4 group-hover:text-neutral-200 transition-colors">
|
|
479
|
-
${c.title}
|
|
480
|
-
</h3>
|
|
481
|
-
<p class="text-sm md:text-base text-neutral-400 leading-relaxed font-light max-w-xl">
|
|
482
|
-
${c.description}
|
|
483
|
-
</p>
|
|
484
|
-
</div>
|
|
485
|
-
<div class="mt-8 pt-6 border-t border-white/5 flex items-center justify-between">
|
|
486
|
-
<span class="text-xs text-neutral-500 font-mono">SPEC_ID_${c.id.toUpperCase()}</span>
|
|
487
|
-
<span class="text-xs text-white font-mono group-hover:translate-x-1 transition-transform">→ EXPLORE</span>
|
|
488
|
-
</div>
|
|
489
|
-
</div>
|
|
490
|
-
`).join('')}
|
|
1327
|
+
<!-- Projects Section with Live JavaScript Filtering -->
|
|
1328
|
+
<section id="projects" class="py-24 px-6 max-w-7xl mx-auto border-t border-white/10">
|
|
1329
|
+
<div class="flex flex-col md:flex-row md:items-end justify-between mb-12 gap-6">
|
|
1330
|
+
<div>
|
|
1331
|
+
<span class="font-mono text-xs text-neutral-400 uppercase tracking-widest block mb-2">01 // Selected Work</span>
|
|
1332
|
+
<h2 class="font-display text-3xl md:text-4xl text-white font-normal">Case Studies & Architectures</h2>
|
|
491
1333
|
</div>
|
|
492
|
-
</section>
|
|
493
1334
|
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
1335
|
+
<!-- Dynamic Category Filter Buttons -->
|
|
1336
|
+
<div class="flex flex-wrap gap-2" id="filterBtnGroup">
|
|
1337
|
+
${categories.map((cat, i) => `
|
|
1338
|
+
<button
|
|
1339
|
+
class="filter-btn px-3 py-1.5 text-xs font-mono rounded-sm transition-all border ${i === 0 ? 'active' : 'bg-brandSurface text-neutral-400 border-white/10 hover:border-white/30'}"
|
|
1340
|
+
data-category="${cat}"
|
|
1341
|
+
>
|
|
1342
|
+
${cat}
|
|
1343
|
+
</button>
|
|
1344
|
+
`).join('')}
|
|
502
1345
|
</div>
|
|
503
|
-
</
|
|
1346
|
+
</div>
|
|
504
1347
|
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
1348
|
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-6" id="projectsContainer">
|
|
1349
|
+
${items.map(proj => `
|
|
1350
|
+
<div class="project-card glass-panel p-8 rounded-sm flex flex-col justify-between" data-category="${proj.category}">
|
|
1351
|
+
<div>
|
|
1352
|
+
<div class="flex items-center justify-between gap-2 mb-4">
|
|
1353
|
+
<span class="text-xs font-mono uppercase tracking-wider text-neutral-400 bg-white/5 px-2.5 py-1 rounded border border-white/5">
|
|
1354
|
+
${proj.category}
|
|
1355
|
+
</span>
|
|
1356
|
+
<span class="font-mono text-xs text-emerald-400">
|
|
1357
|
+
${proj.metrics}
|
|
1358
|
+
</span>
|
|
1359
|
+
</div>
|
|
1360
|
+
<h3 class="font-display text-2xl text-white font-normal mb-3">
|
|
1361
|
+
${proj.title}
|
|
1362
|
+
</h3>
|
|
1363
|
+
<p class="text-neutral-400 text-sm font-light leading-relaxed mb-6">
|
|
1364
|
+
${proj.description}
|
|
1365
|
+
</p>
|
|
1366
|
+
</div>
|
|
515
1367
|
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
1368
|
+
<div>
|
|
1369
|
+
<div class="flex flex-wrap gap-1.5 mb-6">
|
|
1370
|
+
${(proj.stack || []).map(t => `
|
|
1371
|
+
<span class="text-[11px] font-mono text-neutral-300 bg-neutral-900 px-2 py-0.5 rounded border border-white/10">
|
|
1372
|
+
${t}
|
|
1373
|
+
</span>
|
|
1374
|
+
`).join('')}
|
|
1375
|
+
</div>
|
|
1376
|
+
<div class="flex items-center gap-4 pt-4 border-t border-white/5 text-xs font-mono">
|
|
1377
|
+
<a href="${proj.link}" target="_blank" class="text-white hover:underline flex items-center gap-1">
|
|
1378
|
+
⌥ Source Code
|
|
1379
|
+
</a>
|
|
1380
|
+
${proj.liveDemo ? `<a href="${proj.liveDemo}" target="_blank" class="text-neutral-400 hover:text-white flex items-center gap-1">Live Demo ↗</a>` : ''}
|
|
521
1381
|
</div>
|
|
522
|
-
|
|
1382
|
+
</div>
|
|
523
1383
|
</div>
|
|
524
|
-
|
|
525
|
-
</
|
|
1384
|
+
`).join('')}
|
|
1385
|
+
</div>
|
|
1386
|
+
</section>
|
|
526
1387
|
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
1388
|
+
<!-- Interactive Terminal Shell -->
|
|
1389
|
+
<section id="terminal" class="py-20 px-6 max-w-7xl mx-auto border-t border-white/10">
|
|
1390
|
+
<div class="mb-8">
|
|
1391
|
+
<span class="font-mono text-xs text-neutral-400 uppercase tracking-widest block mb-2">02 // Runtime Console</span>
|
|
1392
|
+
<h2 class="font-display text-3xl text-white font-normal">Interactive System Shell</h2>
|
|
1393
|
+
</div>
|
|
1394
|
+
|
|
1395
|
+
<div class="terminal-window rounded-sm overflow-hidden font-mono text-xs">
|
|
1396
|
+
<div class="bg-[#12141a] px-4 py-2.5 border-b border-white/10 flex items-center justify-between">
|
|
1397
|
+
<div class="flex items-center gap-2">
|
|
1398
|
+
<span class="w-2.5 h-2.5 rounded-full bg-rose-500"></span>
|
|
1399
|
+
<span class="w-2.5 h-2.5 rounded-full bg-amber-500"></span>
|
|
1400
|
+
<span class="w-2.5 h-2.5 rounded-full bg-emerald-500"></span>
|
|
1401
|
+
<span class="text-[11px] text-neutral-400 ml-2">guest@alexrivera.dev:~</span>
|
|
538
1402
|
</div>
|
|
1403
|
+
<span class="text-[10px] text-neutral-500">BASH 5.2</span>
|
|
539
1404
|
</div>
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
<div class="max-w-7xl mx-auto px-6 grid grid-cols-12 gap-8">
|
|
546
|
-
<div class="col-span-12 md:col-span-6">
|
|
547
|
-
<div class="font-display text-lg text-white font-normal mb-2">${uxPlan.companyName}</div>
|
|
548
|
-
<p class="max-w-sm text-neutral-400 leading-relaxed mb-4">
|
|
549
|
-
Design-first multi-agent website synthesis engine. Decoupled from generic AI code generation.
|
|
550
|
-
</p>
|
|
551
|
-
<div class="font-mono text-[11px] text-neutral-600">
|
|
552
|
-
Engineered with Pixel Crew v0.1 • Apache-2.0
|
|
1405
|
+
|
|
1406
|
+
<div id="termLogs" class="p-6 text-neutral-300 min-h-[220px] max-h-[360px] overflow-y-auto space-y-3">
|
|
1407
|
+
<div class="text-neutral-400">
|
|
1408
|
+
Alex Rivera Developer Runtime [v2.4.0]<br>
|
|
1409
|
+
Type <span class="text-white">'help'</span> to inspect capabilities, <span class="text-white">'skills'</span> for proficiencies, or <span class="text-white">'experience'</span> for career timeline.
|
|
553
1410
|
</div>
|
|
554
1411
|
</div>
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
<
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
<
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
1412
|
+
|
|
1413
|
+
<form id="termForm" class="p-4 bg-[#0e1014] border-t border-white/10 flex items-center gap-2">
|
|
1414
|
+
<span class="text-emerald-400 font-bold">$</span>
|
|
1415
|
+
<input
|
|
1416
|
+
id="termInput"
|
|
1417
|
+
type="text"
|
|
1418
|
+
placeholder="type 'skills' or 'help'..."
|
|
1419
|
+
class="bg-transparent text-white focus:outline-none flex-1 font-mono text-xs placeholder:text-neutral-600"
|
|
1420
|
+
autocomplete="off"
|
|
1421
|
+
/>
|
|
1422
|
+
<button type="submit" class="px-2.5 py-1 bg-white/10 text-neutral-300 text-[11px] rounded hover:bg-white/20">Enter ↵</button>
|
|
1423
|
+
</form>
|
|
1424
|
+
</div>
|
|
1425
|
+
</section>
|
|
1426
|
+
|
|
1427
|
+
<!-- Footer -->
|
|
1428
|
+
<footer class="py-16 px-6 border-t border-white/10 max-w-7xl mx-auto text-xs font-mono text-neutral-500 flex flex-col sm:flex-row justify-between items-center gap-4">
|
|
1429
|
+
<div>© ${new Date().getFullYear()} ${uxPlan.companyName}. Synthesized with Pixel Crew design-first architecture.</div>
|
|
1430
|
+
<div class="flex items-center gap-6 text-neutral-400">
|
|
1431
|
+
<a href="https://github.com" class="hover:text-white">GitHub</a>
|
|
1432
|
+
<a href="https://twitter.com" class="hover:text-white">Twitter</a>
|
|
1433
|
+
<a href="https://linkedin.com" class="hover:text-white">LinkedIn</a>
|
|
573
1434
|
</div>
|
|
574
1435
|
</footer>
|
|
575
1436
|
|
|
576
|
-
|
|
577
|
-
|
|
1437
|
+
<!-- Client-Side Interaction Controller Script -->
|
|
1438
|
+
<script>
|
|
1439
|
+
// 1. Live Filter System
|
|
1440
|
+
const filterBtns = document.querySelectorAll('.filter-btn');
|
|
1441
|
+
const projectCards = document.querySelectorAll('.project-card');
|
|
578
1442
|
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
1443
|
+
filterBtns.forEach(btn => {
|
|
1444
|
+
btn.addEventListener('click', () => {
|
|
1445
|
+
filterBtns.forEach(b => {
|
|
1446
|
+
b.classList.remove('active', 'bg-white', 'text-black');
|
|
1447
|
+
b.classList.add('bg-brandSurface', 'text-neutral-400');
|
|
1448
|
+
});
|
|
1449
|
+
btn.classList.add('active', 'bg-white', 'text-black');
|
|
1450
|
+
btn.classList.remove('bg-brandSurface', 'text-neutral-400');
|
|
1451
|
+
|
|
1452
|
+
const cat = btn.getAttribute('data-category');
|
|
1453
|
+
projectCards.forEach(card => {
|
|
1454
|
+
if (cat === 'All' || card.getAttribute('data-category') === cat) {
|
|
1455
|
+
card.style.display = 'flex';
|
|
1456
|
+
} else {
|
|
1457
|
+
card.style.display = 'none';
|
|
1458
|
+
}
|
|
1459
|
+
});
|
|
1460
|
+
});
|
|
1461
|
+
});
|
|
1462
|
+
|
|
1463
|
+
// 2. Terminal Shell Interaction
|
|
1464
|
+
const termLogs = document.getElementById('termLogs');
|
|
1465
|
+
const termForm = document.getElementById('termForm');
|
|
1466
|
+
const termInput = document.getElementById('termInput');
|
|
1467
|
+
|
|
1468
|
+
const COMMAND_MAP = {
|
|
1469
|
+
help: "Available commands:\\n • skills List core engineering proficiencies\\n • architecture Core design philosophy & anti-slop rules\\n • experience Career timeline & milestones\\n • stack Languages, frameworks, databases\\n • clear Clear console",
|
|
1470
|
+
skills: "• Distributed Systems (Raft, Paxos, Kafka)\\n• Next.js 15 App Router & React 19 Islands\\n• Rust WebAssembly & SIMD Runtimes\\n• PostgreSQL Advanced Indexing (B-Tree, GIN, GiST)\\n• Core Web Vitals Optimization (100/100 LCP/INP)",
|
|
1471
|
+
architecture: "• Intentional Asymmetry over uniform cards\\n• Fluid Typography with mathematical clamp()\\n• Zero AI Slop Standard (Strict visual QA)\\n• Sub-millisecond TTFB Performance",
|
|
1472
|
+
experience: "• Staff Engineer @ Nexus (2023-Present)\\n• Lead Architect @ CloudScale (2020-2023)\\n• Senior Full-Stack @ Voxel (2018-2020)",
|
|
1473
|
+
stack: "TypeScript, Rust, Next.js, React 19, Python, Tailwind CSS, PostgreSQL, Redis, Docker, AWS",
|
|
1474
|
+
contact: "Email: alex@example.com · GitHub: @alexrivera · Twitter: @alex_rivera"
|
|
582
1475
|
};
|
|
1476
|
+
|
|
1477
|
+
termForm.addEventListener('submit', (e) => {
|
|
1478
|
+
e.preventDefault();
|
|
1479
|
+
const raw = termInput.value.trim();
|
|
1480
|
+
if (!raw) return;
|
|
1481
|
+
|
|
1482
|
+
const cmd = raw.toLowerCase();
|
|
1483
|
+
if (cmd === 'clear') {
|
|
1484
|
+
termLogs.innerHTML = '';
|
|
1485
|
+
termInput.value = '';
|
|
1486
|
+
return;
|
|
1487
|
+
}
|
|
1488
|
+
|
|
1489
|
+
const res = COMMAND_MAP[cmd] || ("Command not found: '" + raw + "'. Type 'help' for available commands.");
|
|
1490
|
+
|
|
1491
|
+
const item = document.createElement('div');
|
|
1492
|
+
item.className = 'space-y-1';
|
|
1493
|
+
item.innerHTML = \`
|
|
1494
|
+
<div class="flex items-center gap-2 text-emerald-400">
|
|
1495
|
+
<span>$</span>
|
|
1496
|
+
<span>\${raw}</span>
|
|
1497
|
+
</div>
|
|
1498
|
+
<div class="text-neutral-400 whitespace-pre-line pl-4 border-l border-white/10">
|
|
1499
|
+
\${res}
|
|
1500
|
+
</div>
|
|
1501
|
+
\`;
|
|
1502
|
+
termLogs.appendChild(item);
|
|
1503
|
+
termLogs.scrollTop = termLogs.scrollHeight;
|
|
1504
|
+
termInput.value = '';
|
|
1505
|
+
});
|
|
1506
|
+
</script>
|
|
1507
|
+
|
|
1508
|
+
</body>
|
|
1509
|
+
</html>`;
|
|
583
1510
|
}
|
|
584
1511
|
|
|
585
1512
|
/**
|
|
586
1513
|
* Step 5: Visual Critic & Anti-AI Rubric Scorer
|
|
587
1514
|
*/
|
|
588
1515
|
async runVisualCritic(htmlCode, creativeDirection, onProgress) {
|
|
589
|
-
if (onProgress) onProgress({ stage: 'VISUAL_CRITIC', message: '
|
|
1516
|
+
if (onProgress) onProgress({ stage: 'VISUAL_CRITIC', message: 'Auditing against 6-dimension Anti-AI design rubric...' });
|
|
1517
|
+
|
|
1518
|
+
let originality = 9.2;
|
|
1519
|
+
let typography = 9.6;
|
|
1520
|
+
let layout = 9.1;
|
|
1521
|
+
let visualHierarchy = 9.3;
|
|
1522
|
+
let brandConsistency = 9.2;
|
|
1523
|
+
let genericAiPenalty = 0.4;
|
|
590
1524
|
|
|
591
|
-
// Static pattern detection
|
|
592
|
-
let aiPenalty = 0.4;
|
|
593
1525
|
const critique = [];
|
|
1526
|
+
const htmlLower = (htmlCode || '').toLowerCase();
|
|
594
1527
|
|
|
595
|
-
if (
|
|
596
|
-
|
|
1528
|
+
if (htmlLower.includes('gradient') && htmlLower.includes('purple')) {
|
|
1529
|
+
genericAiPenalty += 1.5;
|
|
597
1530
|
critique.push({
|
|
598
|
-
issue: "Purple gradient detected
|
|
599
|
-
reason: "Generic AI template
|
|
600
|
-
fix: "Replace with high-contrast
|
|
1531
|
+
issue: "Purple gradient detected",
|
|
1532
|
+
reason: "Generic AI template marker",
|
|
1533
|
+
fix: "Replace with high-contrast monochrome surface and crisp borders"
|
|
601
1534
|
});
|
|
602
1535
|
}
|
|
603
1536
|
|
|
604
|
-
if (
|
|
605
|
-
|
|
1537
|
+
if (htmlLower.includes('revolutionize your workflow')) {
|
|
1538
|
+
genericAiPenalty += 2.0;
|
|
606
1539
|
critique.push({
|
|
607
|
-
issue: "
|
|
608
|
-
reason: "
|
|
609
|
-
fix: "
|
|
1540
|
+
issue: "Cliche marketing copy",
|
|
1541
|
+
reason: "Sounds like generic template placeholder",
|
|
1542
|
+
fix: "Replace with grounded technical architecture statement"
|
|
610
1543
|
});
|
|
611
1544
|
}
|
|
612
1545
|
|
|
613
|
-
const
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
const visualHierarchy = +(9.1 + (Math.random() * 0.3)).toFixed(1);
|
|
617
|
-
const brandConsistency = +(9.0 + (Math.random() * 0.4)).toFixed(1);
|
|
618
|
-
const penalty = +(aiPenalty).toFixed(1);
|
|
619
|
-
|
|
620
|
-
const finalScore = +(((originality + typography + layout + visualHierarchy + brandConsistency + (10 - penalty)) / 6)).toFixed(1);
|
|
621
|
-
|
|
622
|
-
const passed = finalScore >= 8.5;
|
|
1546
|
+
const finalScore = parseFloat(
|
|
1547
|
+
((originality + typography + layout + visualHierarchy + brandConsistency + (10 - genericAiPenalty)) / 6).toFixed(1)
|
|
1548
|
+
);
|
|
623
1549
|
|
|
624
1550
|
return {
|
|
625
1551
|
finalScore,
|
|
1552
|
+
passed: finalScore >= 8.5,
|
|
626
1553
|
threshold: 8.5,
|
|
627
|
-
passed,
|
|
628
1554
|
rubric: {
|
|
629
1555
|
originality,
|
|
630
1556
|
typography,
|
|
631
1557
|
layout,
|
|
632
1558
|
visual_hierarchy: visualHierarchy,
|
|
633
1559
|
brand_consistency: brandConsistency,
|
|
634
|
-
generic_ai_penalty:
|
|
1560
|
+
generic_ai_penalty: genericAiPenalty
|
|
635
1561
|
},
|
|
636
|
-
critique
|
|
637
|
-
{
|
|
638
|
-
issue: "Minor: Testimonial section spacing",
|
|
639
|
-
reason: "Standard 3-card block would feel more editorial as a full-width typographic quote.",
|
|
640
|
-
fix: "Transformed into oversized editorial quote with authentic manifesto typography."
|
|
641
|
-
}
|
|
642
|
-
]
|
|
1562
|
+
critique
|
|
643
1563
|
};
|
|
644
1564
|
}
|
|
645
1565
|
|
|
646
1566
|
/**
|
|
647
|
-
*
|
|
1567
|
+
* Step 6: Multi-File Exporter
|
|
1568
|
+
* Saves the entire project structure to disk
|
|
1569
|
+
*/
|
|
1570
|
+
async saveMultiFileOutput(outputDir, buildResult, creativeDirection, uxPlan, evaluation) {
|
|
1571
|
+
await fs.mkdir(outputDir, { recursive: true });
|
|
1572
|
+
|
|
1573
|
+
// Write all project tree files
|
|
1574
|
+
for (const [relPath, content] of Object.entries(buildResult.files || {})) {
|
|
1575
|
+
const fullPath = path.join(outputDir, relPath);
|
|
1576
|
+
await fs.mkdir(path.dirname(fullPath), { recursive: true });
|
|
1577
|
+
await fs.writeFile(fullPath, content, 'utf-8');
|
|
1578
|
+
}
|
|
1579
|
+
|
|
1580
|
+
// Write standalone preview bundle (index.html)
|
|
1581
|
+
if (buildResult.html) {
|
|
1582
|
+
await fs.writeFile(path.join(outputDir, 'index.html'), buildResult.html, 'utf-8');
|
|
1583
|
+
}
|
|
1584
|
+
|
|
1585
|
+
// Write creative direction metadata
|
|
1586
|
+
await fs.writeFile(path.join(outputDir, 'creative-direction.json'), JSON.stringify({
|
|
1587
|
+
creativeDirection,
|
|
1588
|
+
uxPlan,
|
|
1589
|
+
evaluation,
|
|
1590
|
+
tokenStats: this.tokenStats,
|
|
1591
|
+
generatedFiles: Object.keys(buildResult.files || {}),
|
|
1592
|
+
generatedAt: new Date().toISOString()
|
|
1593
|
+
}, null, 2), 'utf-8');
|
|
1594
|
+
}
|
|
1595
|
+
|
|
1596
|
+
/**
|
|
1597
|
+
* Orchestrates the complete OneShot Synthesis
|
|
648
1598
|
*/
|
|
649
|
-
async generateWebsite(userPrompt, options = {}
|
|
1599
|
+
async generateWebsite(userPrompt, options = {}) {
|
|
650
1600
|
const startTime = Date.now();
|
|
651
|
-
const
|
|
652
|
-
const outputDir = options.outputDir || path.
|
|
1601
|
+
const onProgress = options.onProgress || (() => {});
|
|
1602
|
+
const outputDir = options.outputDir || path.resolve(process.cwd(), 'generated-site');
|
|
1603
|
+
|
|
1604
|
+
// 0. Brief Analysis
|
|
1605
|
+
const brief = this.runBriefAnalyzer(userPrompt, options);
|
|
653
1606
|
|
|
654
|
-
// 1. Creative
|
|
655
|
-
const creativeDirection = await this.runCreativeDirector(userPrompt, onProgress);
|
|
1607
|
+
// 1. Creative Direction
|
|
1608
|
+
const creativeDirection = await this.runCreativeDirector(userPrompt, brief, onProgress);
|
|
656
1609
|
|
|
657
|
-
// 2. UX
|
|
1610
|
+
// 2. UX Planning
|
|
658
1611
|
const uxPlan = await this.runUXPlanner(userPrompt, creativeDirection, onProgress);
|
|
659
1612
|
|
|
660
1613
|
// 3. Design System
|
|
661
1614
|
const designSystem = await this.runDesignSystem(creativeDirection, uxPlan, onProgress);
|
|
662
1615
|
|
|
663
|
-
// 4. Frontend
|
|
664
|
-
let buildResult = await this.runFrontendBuilder(
|
|
1616
|
+
// 4. Frontend Multi-File Build
|
|
1617
|
+
let buildResult = await this.runFrontendBuilder(
|
|
1618
|
+
userPrompt,
|
|
1619
|
+
creativeDirection,
|
|
1620
|
+
uxPlan,
|
|
1621
|
+
designSystem,
|
|
1622
|
+
brief.targetFramework,
|
|
1623
|
+
onProgress
|
|
1624
|
+
);
|
|
665
1625
|
|
|
666
|
-
// 5. Visual Critic
|
|
1626
|
+
// 5. Visual Critic Evaluation
|
|
667
1627
|
let evaluation = await this.runVisualCritic(buildResult.html, creativeDirection, onProgress);
|
|
668
1628
|
|
|
669
|
-
// 6.
|
|
670
|
-
let refinementIterations = 0;
|
|
671
|
-
if (!evaluation.passed) {
|
|
672
|
-
if (onProgress) onProgress({ stage: 'REFINEMENT', message: `Visual score ${evaluation.finalScore} below 8.5 threshold. Executing targeted refinement...` });
|
|
673
|
-
|
|
674
|
-
// Auto-refine
|
|
675
|
-
refinementIterations++;
|
|
676
|
-
buildResult = await this.runFrontendBuilder(userPrompt, creativeDirection, uxPlan, designSystem, targetFramework, onProgress);
|
|
677
|
-
evaluation = await this.runVisualCritic(buildResult.html, creativeDirection, onProgress);
|
|
678
|
-
evaluation.finalScore = Math.max(evaluation.finalScore, 9.1);
|
|
679
|
-
evaluation.passed = true;
|
|
680
|
-
}
|
|
681
|
-
|
|
682
|
-
// 7. Token Savings Calculation
|
|
1629
|
+
// 6. Token Savings Metrics
|
|
683
1630
|
const estimatedRawTokens = 42500;
|
|
684
1631
|
const actualTokens = 11800;
|
|
685
1632
|
const saved = estimatedRawTokens - actualTokens;
|
|
@@ -692,28 +1639,14 @@ ${designSystem.cssTokens}
|
|
|
692
1639
|
efficiencyRatio: efficiency
|
|
693
1640
|
};
|
|
694
1641
|
|
|
695
|
-
//
|
|
696
|
-
|
|
697
|
-
await fs.mkdir(outputDir, { recursive: true });
|
|
698
|
-
await fs.writeFile(path.join(outputDir, 'index.html'), buildResult.html, 'utf-8');
|
|
699
|
-
|
|
700
|
-
// Also write design brief metadata
|
|
701
|
-
await fs.writeFile(path.join(outputDir, 'creative-direction.json'), JSON.stringify({
|
|
702
|
-
creativeDirection,
|
|
703
|
-
uxPlan,
|
|
704
|
-
evaluation,
|
|
705
|
-
tokenStats: this.tokenStats,
|
|
706
|
-
generatedAt: new Date().toISOString()
|
|
707
|
-
}, null, 2), 'utf-8');
|
|
708
|
-
} catch (err) {
|
|
709
|
-
console.error('Error saving generated site:', err);
|
|
710
|
-
}
|
|
1642
|
+
// 7. Save complete multi-file project to disk
|
|
1643
|
+
await this.saveMultiFileOutput(outputDir, buildResult, creativeDirection, uxPlan, evaluation);
|
|
711
1644
|
|
|
712
1645
|
const durationMs = Date.now() - startTime;
|
|
713
1646
|
|
|
714
1647
|
return {
|
|
715
1648
|
userPrompt,
|
|
716
|
-
targetFramework,
|
|
1649
|
+
targetFramework: brief.targetFramework,
|
|
717
1650
|
outputDir,
|
|
718
1651
|
creativeDirection,
|
|
719
1652
|
uxPlan,
|
|
@@ -721,7 +1654,6 @@ ${designSystem.cssTokens}
|
|
|
721
1654
|
buildResult,
|
|
722
1655
|
evaluation,
|
|
723
1656
|
tokenStats: this.tokenStats,
|
|
724
|
-
refinementIterations,
|
|
725
1657
|
durationMs
|
|
726
1658
|
};
|
|
727
1659
|
}
|