pixelcrew 0.2.2 → 0.2.3
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/package.json +1 -1
- package/src/orchestrator/code-generator.js +994 -0
- package/src/orchestrator/engine.js +11 -1
- package/src/orchestrator/oneshot.js +80 -1277
- package/src/orchestrator/planner.js +329 -0
- package/src/orchestrator/skills-registry.js +194 -0
- package/src/orchestrator/task-queue.js +128 -0
- package/src/server/server.js +9 -2
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* PIXEL CREW —
|
|
2
|
+
* PIXEL CREW — Dynamic Multi-Agent Website & Project Generation Engine
|
|
3
3
|
*
|
|
4
4
|
* Pipeline:
|
|
5
|
-
* User Prompt ->
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* User Prompt -> Dynamic Planner -> Project Specification ->
|
|
6
|
+
* Dynamic Task Graph (DAG) -> Skill Matching -> Autonomous Agent Queue ->
|
|
7
|
+
* Real File Synthesis (Next.js 14/15 App Router + TS) -> Visual Critic ->
|
|
8
|
+
* Real-Time Dashboard Event Stream
|
|
8
9
|
*/
|
|
9
10
|
|
|
10
11
|
import fs from 'node:fs/promises';
|
|
11
12
|
import path from 'node:path';
|
|
13
|
+
import { DynamicPlanner } from './planner.js';
|
|
14
|
+
import { SkillRegistry } from './skills-registry.js';
|
|
15
|
+
import { TaskQueue } from './task-queue.js';
|
|
16
|
+
import { CodeGenerator } from './code-generator.js';
|
|
12
17
|
|
|
13
|
-
// Creative Archetypes for Design Director
|
|
14
18
|
export const CREATIVE_ARCHETYPES = {
|
|
15
19
|
editorial: {
|
|
16
20
|
direction: "editorial technology studio",
|
|
@@ -38,10 +42,10 @@ export const CREATIVE_ARCHETYPES = {
|
|
|
38
42
|
googleFontsUrl: "https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=JetBrains+Mono:wght@400;500;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap"
|
|
39
43
|
},
|
|
40
44
|
avoid: [
|
|
45
|
+
"purple and blue glowing gradient blobs",
|
|
46
|
+
"monotonous repeating card grids",
|
|
41
47
|
"generic SaaS cards with uniform border-radius",
|
|
42
|
-
"purple and blue glowing mesh gradients",
|
|
43
48
|
"excessive glassmorphism and frosted blur overlays",
|
|
44
|
-
"uniform 3-column feature grids",
|
|
45
49
|
"hero with floating fake dashboard screenshot",
|
|
46
50
|
"floating AI sparkles and generic rocket icons",
|
|
47
51
|
"cliché copy like 'Revolutionize your workflow'"
|
|
@@ -118,6 +122,9 @@ export const CREATIVE_ARCHETYPES = {
|
|
|
118
122
|
export class OneShotEngine {
|
|
119
123
|
constructor(options = {}) {
|
|
120
124
|
this.options = options;
|
|
125
|
+
this.planner = new DynamicPlanner();
|
|
126
|
+
this.skillRegistry = new SkillRegistry();
|
|
127
|
+
this.codeGenerator = new CodeGenerator();
|
|
121
128
|
this.tokenStats = {
|
|
122
129
|
rawTokensEstimated: 0,
|
|
123
130
|
actualTokensUsed: 0,
|
|
@@ -127,85 +134,20 @@ export class OneShotEngine {
|
|
|
127
134
|
}
|
|
128
135
|
|
|
129
136
|
/**
|
|
130
|
-
* Step 0: Brief Analyzer
|
|
131
|
-
* Extracts domain intent, target framework, interactive features, and entity profile
|
|
137
|
+
* Step 0: Brief Analyzer / Requirement Parser
|
|
132
138
|
*/
|
|
133
139
|
runBriefAnalyzer(prompt, options = {}) {
|
|
134
|
-
const
|
|
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');
|
|
170
|
-
}
|
|
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.";
|
|
201
|
-
}
|
|
202
|
-
|
|
140
|
+
const analysis = this.planner.analyzeRequirements(prompt, options);
|
|
203
141
|
return {
|
|
204
142
|
userPrompt: prompt,
|
|
205
|
-
domain,
|
|
206
|
-
targetFramework,
|
|
207
|
-
features,
|
|
208
|
-
entity: {
|
|
143
|
+
domain: analysis.domain,
|
|
144
|
+
targetFramework: analysis.framework,
|
|
145
|
+
features: analysis.requestedFeatures,
|
|
146
|
+
entity: {
|
|
147
|
+
name: analysis.companyName,
|
|
148
|
+
title: analysis.roleOrSubtitle,
|
|
149
|
+
bio: analysis.summary
|
|
150
|
+
}
|
|
209
151
|
};
|
|
210
152
|
}
|
|
211
153
|
|
|
@@ -247,232 +189,30 @@ export class OneShotEngine {
|
|
|
247
189
|
}
|
|
248
190
|
|
|
249
191
|
/**
|
|
250
|
-
* Step 2: UX Planner
|
|
251
|
-
* Dynamically constructs section topologies and bespoke domain models
|
|
192
|
+
* Step 2: UX Planner / Specification Generator
|
|
252
193
|
*/
|
|
253
194
|
async runUXPlanner(prompt, creativeDirection, onProgress) {
|
|
254
195
|
if (onProgress) onProgress({ stage: 'UX_PLANNER', message: 'Architecting dynamic section topology and interactive component specs...' });
|
|
255
196
|
|
|
256
|
-
const
|
|
257
|
-
const
|
|
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 = [
|
|
389
|
-
{
|
|
390
|
-
id: "navbar",
|
|
391
|
-
type: "minimal_nav",
|
|
392
|
-
navLinks: ["Capabilities", "Live Sandbox", "Architecture", "Pricing Calculator", "Contact"]
|
|
393
|
-
},
|
|
394
|
-
{
|
|
395
|
-
id: "hero",
|
|
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
|
-
]
|
|
406
|
-
},
|
|
407
|
-
{
|
|
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
|
|
414
|
-
},
|
|
415
|
-
{
|
|
416
|
-
id: "showcase",
|
|
417
|
-
type: "asymmetric_bento_grid",
|
|
418
|
-
title: "Engineered From First Principles",
|
|
419
|
-
subtitle: "No cookie-cutter templates. Purpose-built infrastructure with mathematical precision.",
|
|
420
|
-
cards: [
|
|
421
|
-
{
|
|
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",
|
|
426
|
-
metric: "72% Token Savings"
|
|
427
|
-
},
|
|
428
|
-
{
|
|
429
|
-
title: "Fluid Design Systems",
|
|
430
|
-
description: "Mathematical fluid typography with CSS clamp() and contrast-verified color tokens.",
|
|
431
|
-
tag: "AESTHETICS",
|
|
432
|
-
span: "col-span-12 md:col-span-4",
|
|
433
|
-
metric: "WCAG AAA Verified"
|
|
434
|
-
},
|
|
435
|
-
{
|
|
436
|
-
title: "Zero-Latency Edge Execution",
|
|
437
|
-
description: "Static generation paired with streaming server components and smart cache hydration.",
|
|
438
|
-
tag: "EDGE NETWORK",
|
|
439
|
-
span: "col-span-12 md:col-span-4",
|
|
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"
|
|
448
|
-
}
|
|
449
|
-
]
|
|
450
|
-
},
|
|
451
|
-
{
|
|
452
|
-
id: "manifesto",
|
|
453
|
-
type: "editorial_quote",
|
|
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.",
|
|
455
|
-
author: `${entity.name} Architectural Manifesto`,
|
|
456
|
-
role: "Engineering Standard"
|
|
457
|
-
},
|
|
458
|
-
{
|
|
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"]
|
|
465
|
-
}
|
|
466
|
-
];
|
|
467
|
-
}
|
|
197
|
+
const analysis = this.planner.analyzeRequirements(prompt, { targetFramework: creativeDirection?.targetFramework });
|
|
198
|
+
const spec = this.planner.createProjectSpecification(analysis);
|
|
468
199
|
|
|
469
200
|
return {
|
|
470
|
-
companyName:
|
|
471
|
-
title: `${
|
|
472
|
-
domain,
|
|
473
|
-
targetFramework:
|
|
474
|
-
features:
|
|
475
|
-
sections
|
|
201
|
+
companyName: spec.companyName,
|
|
202
|
+
title: `${spec.companyName} — ${spec.headline}`,
|
|
203
|
+
domain: spec.domain,
|
|
204
|
+
targetFramework: spec.framework,
|
|
205
|
+
features: spec.requestedFeatures,
|
|
206
|
+
sections: spec.sections.map(s => ({
|
|
207
|
+
id: s.id,
|
|
208
|
+
component: s.component,
|
|
209
|
+
type: s.id,
|
|
210
|
+
headline: s.headline,
|
|
211
|
+
subheadline: s.subheadline,
|
|
212
|
+
title: s.title,
|
|
213
|
+
categories: s.categories,
|
|
214
|
+
items: this.codeGenerator.generateDomainItems(spec.domain)
|
|
215
|
+
}))
|
|
476
216
|
};
|
|
477
217
|
}
|
|
478
218
|
|
|
@@ -511,7 +251,6 @@ body {
|
|
|
511
251
|
.font-display { font-family: var(--font-display); }
|
|
512
252
|
.font-mono { font-family: var(--font-mono); }
|
|
513
253
|
|
|
514
|
-
/* Asymmetric Bento Glass Card */
|
|
515
254
|
.glass-panel {
|
|
516
255
|
background: var(--surface-base);
|
|
517
256
|
border: 1px solid var(--border-subtle);
|
|
@@ -524,7 +263,6 @@ body {
|
|
|
524
263
|
transform: translateY(-2px);
|
|
525
264
|
}
|
|
526
265
|
|
|
527
|
-
/* Custom Interactive Terminal */
|
|
528
266
|
.terminal-window {
|
|
529
267
|
background: #08090d;
|
|
530
268
|
border: 1px solid rgba(255, 255, 255, 0.12);
|
|
@@ -546,967 +284,27 @@ body {
|
|
|
546
284
|
}
|
|
547
285
|
|
|
548
286
|
/**
|
|
549
|
-
* Step 4: Multi-File
|
|
287
|
+
* Step 4: Frontend & Multi-File Codebase Generator
|
|
550
288
|
*/
|
|
551
289
|
async runFrontendBuilder(prompt, creativeDirection, uxPlan, designSystem, targetFramework = 'nextjs', onProgress) {
|
|
552
290
|
if (onProgress) onProgress({ stage: 'FRONTEND_BUILDER', message: `Synthesizing idiomatic ${targetFramework.toUpperCase()} multi-file architecture & dynamic client components...` });
|
|
553
291
|
|
|
554
|
-
const
|
|
555
|
-
const
|
|
556
|
-
const files = {};
|
|
292
|
+
const analysis = this.planner.analyzeRequirements(prompt, { targetFramework });
|
|
293
|
+
const spec = this.planner.createProjectSpecification(analysis);
|
|
557
294
|
|
|
558
|
-
//
|
|
559
|
-
|
|
560
|
-
|
|
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
|
-
}
|
|
295
|
+
// Override with active tokens
|
|
296
|
+
spec.palette = designSystem.palette;
|
|
297
|
+
spec.fonts = designSystem.fonts;
|
|
568
298
|
|
|
569
|
-
|
|
570
|
-
const previewHtml = this.generateStandalonePreview(uxPlan, designSystem, creativeDirection);
|
|
299
|
+
const result = this.codeGenerator.generateProject(spec);
|
|
571
300
|
|
|
572
301
|
return {
|
|
573
302
|
framework: targetFramework,
|
|
574
|
-
files,
|
|
575
|
-
html: previewHtml,
|
|
576
|
-
fileCount:
|
|
577
|
-
entrypoint:
|
|
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>
|
|
957
|
-
|
|
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>
|
|
1231
|
-
<html lang="en" class="scroll-smooth">
|
|
1232
|
-
<head>
|
|
1233
|
-
<meta charset="UTF-8">
|
|
1234
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
1235
|
-
<title>${uxPlan.title}</title>
|
|
1236
|
-
<meta name="description" content="${hero.subheadline || 'Bespoke high performance web architecture.'}">
|
|
1237
|
-
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
1238
|
-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
1239
|
-
<link href="${f.googleFontsUrl}" rel="stylesheet">
|
|
1240
|
-
<script src="https://cdn.tailwindcss.com"></script>
|
|
1241
|
-
<script>
|
|
1242
|
-
tailwind.config = {
|
|
1243
|
-
theme: {
|
|
1244
|
-
extend: {
|
|
1245
|
-
colors: {
|
|
1246
|
-
brandBg: '${p.bg}',
|
|
1247
|
-
brandSurface: '${p.surface}',
|
|
1248
|
-
brandSurfaceRaised: '${p.surfaceRaised}',
|
|
1249
|
-
brandBorder: '${p.border}',
|
|
1250
|
-
brandAccent: '${p.accent}'
|
|
1251
|
-
},
|
|
1252
|
-
fontFamily: {
|
|
1253
|
-
display: [${f.display}],
|
|
1254
|
-
sans: [${f.body}],
|
|
1255
|
-
mono: [${f.mono}]
|
|
1256
|
-
}
|
|
1257
|
-
}
|
|
1258
|
-
}
|
|
1259
|
-
}
|
|
1260
|
-
</script>
|
|
1261
|
-
<style>
|
|
1262
|
-
${designSystem.cssTokens}
|
|
1263
|
-
</style>
|
|
1264
|
-
</head>
|
|
1265
|
-
<body class="bg-brandBg text-neutral-100 min-h-screen selection:bg-neutral-200 selection:text-black">
|
|
1266
|
-
|
|
1267
|
-
<!-- Header Navigation -->
|
|
1268
|
-
<header class="fixed top-0 left-0 right-0 z-50 bg-brandBg/85 backdrop-blur-md border-b border-white/5">
|
|
1269
|
-
<div class="max-w-7xl mx-auto px-6 h-20 flex items-center justify-between">
|
|
1270
|
-
<a href="#" class="flex items-center gap-3 group">
|
|
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
|
|
1273
|
-
</div>
|
|
1274
|
-
<span class="font-display font-semibold text-xl tracking-tight text-white">${uxPlan.companyName}</span>
|
|
1275
|
-
</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>
|
|
1281
|
-
</nav>
|
|
1282
|
-
</div>
|
|
1283
|
-
</header>
|
|
1284
|
-
|
|
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>
|
|
1293
|
-
|
|
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>
|
|
1297
|
-
|
|
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>
|
|
1312
|
-
|
|
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>
|
|
1322
|
-
</div>
|
|
1323
|
-
`).join('')}
|
|
1324
|
-
</div>
|
|
1325
|
-
</section>
|
|
1326
|
-
|
|
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>
|
|
1333
|
-
</div>
|
|
1334
|
-
|
|
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('')}
|
|
1345
|
-
</div>
|
|
1346
|
-
</div>
|
|
1347
|
-
|
|
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>
|
|
1367
|
-
|
|
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>` : ''}
|
|
1381
|
-
</div>
|
|
1382
|
-
</div>
|
|
1383
|
-
</div>
|
|
1384
|
-
`).join('')}
|
|
1385
|
-
</div>
|
|
1386
|
-
</section>
|
|
1387
|
-
|
|
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>
|
|
1402
|
-
</div>
|
|
1403
|
-
<span class="text-[10px] text-neutral-500">BASH 5.2</span>
|
|
1404
|
-
</div>
|
|
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.
|
|
1410
|
-
</div>
|
|
1411
|
-
</div>
|
|
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>
|
|
1434
|
-
</div>
|
|
1435
|
-
</footer>
|
|
1436
|
-
|
|
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');
|
|
1442
|
-
|
|
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"
|
|
303
|
+
files: result.files,
|
|
304
|
+
html: result.previewHtml,
|
|
305
|
+
fileCount: result.fileCount,
|
|
306
|
+
entrypoint: result.entrypoint
|
|
1475
307
|
};
|
|
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>`;
|
|
1510
308
|
}
|
|
1511
309
|
|
|
1512
310
|
/**
|
|
@@ -1565,7 +363,6 @@ ${designSystem.cssTokens}
|
|
|
1565
363
|
|
|
1566
364
|
/**
|
|
1567
365
|
* Step 6: Multi-File Exporter
|
|
1568
|
-
* Saves the entire project structure to disk
|
|
1569
366
|
*/
|
|
1570
367
|
async saveMultiFileOutput(outputDir, buildResult, creativeDirection, uxPlan, evaluation) {
|
|
1571
368
|
await fs.mkdir(outputDir, { recursive: true });
|
|
@@ -1594,39 +391,44 @@ ${designSystem.cssTokens}
|
|
|
1594
391
|
}
|
|
1595
392
|
|
|
1596
393
|
/**
|
|
1597
|
-
* Orchestrates the complete OneShot Synthesis
|
|
394
|
+
* Orchestrates the complete OneShot Synthesis via Dynamic Task Graph
|
|
1598
395
|
*/
|
|
1599
396
|
async generateWebsite(userPrompt, options = {}) {
|
|
1600
397
|
const startTime = Date.now();
|
|
1601
398
|
const onProgress = options.onProgress || (() => {});
|
|
1602
399
|
const outputDir = options.outputDir || path.resolve(process.cwd(), 'generated-site');
|
|
1603
400
|
|
|
1604
|
-
//
|
|
1605
|
-
const
|
|
401
|
+
// 1. Dynamic Planning & Task Graph Compilation
|
|
402
|
+
const analysis = this.planner.analyzeRequirements(userPrompt, options);
|
|
403
|
+
const spec = this.planner.createProjectSpecification(analysis);
|
|
404
|
+
const taskGraph = this.planner.createTaskGraph(spec);
|
|
1606
405
|
|
|
1607
|
-
//
|
|
1608
|
-
const creativeDirection = await this.runCreativeDirector(userPrompt,
|
|
406
|
+
// 2. Creative Direction
|
|
407
|
+
const creativeDirection = await this.runCreativeDirector(userPrompt, { domain: spec.domain, targetFramework: spec.framework }, onProgress);
|
|
1609
408
|
|
|
1610
|
-
//
|
|
409
|
+
// 3. UX Planning
|
|
1611
410
|
const uxPlan = await this.runUXPlanner(userPrompt, creativeDirection, onProgress);
|
|
1612
411
|
|
|
1613
|
-
//
|
|
412
|
+
// 4. Design System
|
|
1614
413
|
const designSystem = await this.runDesignSystem(creativeDirection, uxPlan, onProgress);
|
|
1615
414
|
|
|
1616
|
-
//
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
415
|
+
// 5. Code Generation (Next.js 14 App Router + TS + Components)
|
|
416
|
+
spec.palette = designSystem.palette;
|
|
417
|
+
spec.fonts = designSystem.fonts;
|
|
418
|
+
const generated = this.codeGenerator.generateProject(spec);
|
|
419
|
+
|
|
420
|
+
const buildResult = {
|
|
421
|
+
framework: spec.framework,
|
|
422
|
+
files: generated.files,
|
|
423
|
+
html: generated.previewHtml,
|
|
424
|
+
fileCount: generated.fileCount,
|
|
425
|
+
entrypoint: generated.entrypoint
|
|
426
|
+
};
|
|
1625
427
|
|
|
1626
|
-
//
|
|
1627
|
-
|
|
428
|
+
// 6. Visual Critic Evaluation
|
|
429
|
+
const evaluation = await this.runVisualCritic(buildResult.html, creativeDirection, onProgress);
|
|
1628
430
|
|
|
1629
|
-
//
|
|
431
|
+
// 7. Token Savings Metrics
|
|
1630
432
|
const estimatedRawTokens = 42500;
|
|
1631
433
|
const actualTokens = 11800;
|
|
1632
434
|
const saved = estimatedRawTokens - actualTokens;
|
|
@@ -1639,14 +441,15 @@ ${designSystem.cssTokens}
|
|
|
1639
441
|
efficiencyRatio: efficiency
|
|
1640
442
|
};
|
|
1641
443
|
|
|
1642
|
-
//
|
|
444
|
+
// 8. Save complete multi-file project to disk
|
|
1643
445
|
await this.saveMultiFileOutput(outputDir, buildResult, creativeDirection, uxPlan, evaluation);
|
|
1644
446
|
|
|
1645
447
|
const durationMs = Date.now() - startTime;
|
|
1646
448
|
|
|
1647
449
|
return {
|
|
1648
450
|
userPrompt,
|
|
1649
|
-
targetFramework:
|
|
451
|
+
targetFramework: spec.framework,
|
|
452
|
+
taskGraph,
|
|
1650
453
|
outputDir,
|
|
1651
454
|
creativeDirection,
|
|
1652
455
|
uxPlan,
|