pixelcrew 0.2.1 → 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.
@@ -1,16 +1,20 @@
1
1
  /**
2
- * PIXEL CREW — OneShot Multi-Agent Website & Project Generation Engine
2
+ * PIXEL CREW — Dynamic Multi-Agent Website & Project Generation Engine
3
3
  *
4
4
  * Pipeline:
5
- * User Prompt -> Brief Analyzer -> Creative Director -> UX Planner ->
6
- * Design System -> Multi-File Stack Builder -> Visual Critic & Anti-AI Guardian ->
7
- * Multi-File Project Exporter + Standalone Previewer
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 p = (prompt || '').toLowerCase();
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: { name, title, bio }
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 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 = [
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: entity.name,
471
- title: `${entity.name} — ${entity.title}`,
472
- domain,
473
- targetFramework: brief.targetFramework,
474
- features: brief.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,920 +284,27 @@ body {
546
284
  }
547
285
 
548
286
  /**
549
- * Step 4: Multi-File Stack-Adaptive Builder
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 p = designSystem.palette;
555
- const f = designSystem.fonts;
556
- const files = {};
292
+ const analysis = this.planner.analyzeRequirements(prompt, { targetFramework });
293
+ const spec = this.planner.createProjectSpecification(analysis);
557
294
 
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
- }
295
+ // Override with active tokens
296
+ spec.palette = designSystem.palette;
297
+ spec.fonts = designSystem.fonts;
568
298
 
569
- // 2. Generate Standalone Preview HTML (Bundled for instant in-browser and dashboard preview)
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: 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>
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
- // README.md
1033
- files['README.md'] = `# ${uxPlan.companyName} — Modern Web Project
1034
-
1035
- Synthesized using **Pixel Crew** design-first multi-agent orchestration.
1036
-
1037
- ## 🚀 Getting Started
1038
-
1039
- \`\`\`bash
1040
- # 1. Install dependencies
1041
- npm install
1042
-
1043
- # 2. Run the local development server
1044
- npm run dev
1045
-
1046
- # 3. Open in browser
1047
- http://localhost:3000
1048
- \`\`\`
1049
-
1050
- ## 🛠️ Stack & Standards
1051
- - **Framework**: Next.js 14 App Router
1052
- - **Language**: TypeScript (Strict Mode)
1053
- - **Styling**: Tailwind CSS + Fluid clamp() design tokens
1054
- - **Design Archetype**: ${cd.design_direction}
1055
- - **Quality Standard**: Zero AI Slop, WCAG AA Accessibility
1056
- `;
1057
- }
1058
-
1059
- /**
1060
- * Vite + React Multi-File Generator
1061
- */
1062
- generateReactViteTree(files, uxPlan, ds, cd) {
1063
- this.generateNextJsTree(files, uxPlan, ds, cd); // base share
1064
- files['package.json'] = JSON.stringify({
1065
- name: uxPlan.companyName.toLowerCase().replace(/[^a-z0-9]/g, '-'),
1066
- version: "0.1.0",
1067
- type: "module",
1068
- scripts: {
1069
- dev: "vite",
1070
- build: "tsc && vite build",
1071
- preview: "vite preview"
1072
- },
1073
- dependencies: {
1074
- react: "^18.3.1",
1075
- "react-dom": "^18.3.1",
1076
- "lucide-react": "^0.453.0"
1077
- },
1078
- devDependencies: {
1079
- "@vitejs/plugin-react": "^4.3.3",
1080
- typescript: "^5.6.3",
1081
- vite: "^5.4.9",
1082
- tailwindcss: "^3.4.14",
1083
- postcss: "^8.4.47"
1084
- }
1085
- }, null, 2);
1086
-
1087
- files['vite.config.ts'] = `import { defineConfig } from 'vite';
1088
- import react from '@vitejs/plugin-react';
1089
-
1090
- export default defineConfig({
1091
- plugins: [react()],
1092
- });
1093
- `;
1094
- }
1095
-
1096
- /**
1097
- * Vue 3 Multi-File Generator
1098
- */
1099
- generateVueTree(files, uxPlan, ds, cd) {
1100
- this.generateNextJsTree(files, uxPlan, ds, cd);
1101
- files['package.json'] = JSON.stringify({
1102
- name: uxPlan.companyName.toLowerCase().replace(/[^a-z0-9]/g, '-'),
1103
- version: "0.1.0",
1104
- type: "module",
1105
- scripts: {
1106
- dev: "vite",
1107
- build: "vue-tsc && vite build",
1108
- preview: "vite preview"
1109
- },
1110
- dependencies: {
1111
- vue: "^3.5.12",
1112
- "lucide-vue-next": "^0.453.0"
1113
- },
1114
- devDependencies: {
1115
- "@vitejs/plugin-vue": "^5.1.4",
1116
- typescript: "^5.6.3",
1117
- vite: "^5.4.9",
1118
- "vue-tsc": "^2.1.6",
1119
- tailwindcss: "^3.4.14"
1120
- }
1121
- }, null, 2);
1122
- }
1123
-
1124
- /**
1125
- * Modular Vanilla Web Multi-File Generator
1126
- */
1127
- generateVanillaTree(files, uxPlan, ds, cd) {
1128
- const p = ds.palette;
1129
- const f = ds.fonts;
1130
-
1131
- files['package.json'] = JSON.stringify({
1132
- name: uxPlan.companyName.toLowerCase().replace(/[^a-z0-9]/g, '-'),
1133
- version: "0.1.0",
1134
- scripts: {
1135
- start: "npx serve ."
1136
- }
1137
- }, null, 2);
1138
-
1139
- files['styles/tokens.css'] = ds.cssTokens;
1140
- files['styles/main.css'] = `/* Main Layout & Reset */
1141
- * { box-sizing: border-box; margin: 0; padding: 0; }
1142
- body { background: var(--bg-primary); color: var(--text-primary); font-family: var(--font-body); }
1143
- .container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
1144
- `;
1145
-
1146
- files['scripts/interactive.js'] = `// Live Project Filtering & Shell Interaction
1147
- document.addEventListener('DOMContentLoaded', () => {
1148
- const filterButtons = document.querySelectorAll('.filter-btn');
1149
- const projectCards = document.querySelectorAll('.project-card');
1150
-
1151
- filterButtons.forEach(btn => {
1152
- btn.addEventListener('click', () => {
1153
- filterButtons.forEach(b => b.classList.remove('active'));
1154
- btn.classList.add('active');
1155
- const cat = btn.getAttribute('data-category');
1156
-
1157
- projectCards.forEach(card => {
1158
- if (cat === 'All' || card.getAttribute('data-category') === cat) {
1159
- card.style.display = 'flex';
1160
- } else {
1161
- card.style.display = 'none';
1162
- }
1163
- });
1164
- });
1165
- });
1166
- });
1167
- `;
1168
-
1169
- files['index.html'] = this.generateStandalonePreview(uxPlan, ds, cd);
1170
- }
1171
-
1172
- /**
1173
- * Standalone Preview Generator with Rich Interactive JS
1174
- */
1175
- generateStandalonePreview(uxPlan, designSystem, creativeDirection) {
1176
- const p = designSystem.palette;
1177
- const f = designSystem.fonts;
1178
- const hero = uxPlan.sections.find(s => s.id === 'hero') || {};
1179
- const projectsSec = uxPlan.sections.find(s => s.id === 'projects') || {};
1180
- const items = projectsSec.items || [];
1181
- const categories = projectsSec.categories || ["All", "Distributed Systems", "AI & RAG", "Frontend Architecture", "Open Source"];
1182
-
1183
- return `<!DOCTYPE html>
1184
- <html lang="en" class="scroll-smooth">
1185
- <head>
1186
- <meta charset="UTF-8">
1187
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
1188
- <title>${uxPlan.title}</title>
1189
- <meta name="description" content="${hero.subheadline || 'Bespoke high performance web architecture.'}">
1190
- <link rel="preconnect" href="https://fonts.googleapis.com">
1191
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
1192
- <link href="${f.googleFontsUrl}" rel="stylesheet">
1193
- <script src="https://cdn.tailwindcss.com"></script>
1194
- <script>
1195
- tailwind.config = {
1196
- theme: {
1197
- extend: {
1198
- colors: {
1199
- brandBg: '${p.bg}',
1200
- brandSurface: '${p.surface}',
1201
- brandSurfaceRaised: '${p.surfaceRaised}',
1202
- brandBorder: '${p.border}',
1203
- brandAccent: '${p.accent}'
1204
- },
1205
- fontFamily: {
1206
- display: [${f.display}],
1207
- sans: [${f.body}],
1208
- mono: [${f.mono}]
1209
- }
1210
- }
1211
- }
1212
- }
1213
- </script>
1214
- <style>
1215
- ${designSystem.cssTokens}
1216
- </style>
1217
- </head>
1218
- <body class="bg-brandBg text-neutral-100 min-h-screen selection:bg-neutral-200 selection:text-black">
1219
-
1220
- <!-- Header Navigation -->
1221
- <header class="fixed top-0 left-0 right-0 z-50 bg-brandBg/85 backdrop-blur-md border-b border-white/5">
1222
- <div class="max-w-7xl mx-auto px-6 h-20 flex items-center justify-between">
1223
- <a href="#" class="flex items-center gap-3 group">
1224
- <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">
1225
- AR
1226
- </div>
1227
- <span class="font-display font-semibold text-xl tracking-tight text-white">${uxPlan.companyName}</span>
1228
- </a>
1229
- <nav class="hidden md:flex items-center gap-8 text-xs font-mono uppercase tracking-wider text-neutral-400">
1230
- <a href="#projects" class="hover:text-white transition-colors">Projects</a>
1231
- <a href="#terminal" class="hover:text-white transition-colors">Console</a>
1232
- <a href="#experience" class="hover:text-white transition-colors">Milestones</a>
1233
- <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>
1234
- </nav>
1235
- </div>
1236
- </header>
1237
-
1238
- <!-- Hero Section -->
1239
- <section class="relative pt-36 pb-20 px-6 max-w-7xl mx-auto">
1240
- <div className="flex items-center gap-2 mb-6">
1241
- <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">
1242
- <span class="w-2 h-2 rounded-full bg-emerald-400 animate-ping"></span>
1243
- AVAILABLE FOR ARCHITECTURE & HIGH-IMPACT ROLES
1244
- </span>
1245
- </div>
1246
-
1247
- <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">
1248
- ${hero.headline || "Building high-order digital architecture with intentional restraint."}
1249
- </h1>
1250
-
1251
- <p class="text-lg md:text-xl text-neutral-400 font-light max-w-2xl leading-relaxed mb-10">
1252
- ${hero.subheadline || "Designing resilient distributed systems and human-grade web platforms. No templates. No generic AI slop."}
1253
- </p>
1254
-
1255
- <div class="flex flex-wrap items-center gap-4 mb-16">
1256
- <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">
1257
- Explore Selected Work
1258
- <span>→</span>
1259
- </a>
1260
- <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">
1261
- <span>$</span>
1262
- Launch System Terminal
1263
- </a>
1264
- </div>
1265
-
1266
- <div class="grid grid-cols-2 sm:grid-cols-3 gap-6 pt-8 border-t border-white/10">
1267
- ${(hero.stats || [
1268
- { label: "Production Experience", value: "8+ Years" },
1269
- { label: "Systems Scaled", value: "50M+ Req/day" },
1270
- { label: "Open Source", value: "14.2k ★" }
1271
- ]).map(s => `
1272
- <div>
1273
- <div class="font-mono text-2xl md:text-3xl font-semibold text-white">${s.value}</div>
1274
- <div class="text-xs text-neutral-400 tracking-wider uppercase mt-1 font-mono">${s.label}</div>
1275
- </div>
1276
- `).join('')}
1277
- </div>
1278
- </section>
1279
-
1280
- <!-- Projects Section with Live JavaScript Filtering -->
1281
- <section id="projects" class="py-24 px-6 max-w-7xl mx-auto border-t border-white/10">
1282
- <div class="flex flex-col md:flex-row md:items-end justify-between mb-12 gap-6">
1283
- <div>
1284
- <span class="font-mono text-xs text-neutral-400 uppercase tracking-widest block mb-2">01 // Selected Work</span>
1285
- <h2 class="font-display text-3xl md:text-4xl text-white font-normal">Case Studies & Architectures</h2>
1286
- </div>
1287
-
1288
- <!-- Dynamic Category Filter Buttons -->
1289
- <div class="flex flex-wrap gap-2" id="filterBtnGroup">
1290
- ${categories.map((cat, i) => `
1291
- <button
1292
- 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'}"
1293
- data-category="${cat}"
1294
- >
1295
- ${cat}
1296
- </button>
1297
- `).join('')}
1298
- </div>
1299
- </div>
1300
-
1301
- <div class="grid grid-cols-1 md:grid-cols-2 gap-6" id="projectsContainer">
1302
- ${items.map(proj => `
1303
- <div class="project-card glass-panel p-8 rounded-sm flex flex-col justify-between" data-category="${proj.category}">
1304
- <div>
1305
- <div class="flex items-center justify-between gap-2 mb-4">
1306
- <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">
1307
- ${proj.category}
1308
- </span>
1309
- <span class="font-mono text-xs text-emerald-400">
1310
- ${proj.metrics}
1311
- </span>
1312
- </div>
1313
- <h3 class="font-display text-2xl text-white font-normal mb-3">
1314
- ${proj.title}
1315
- </h3>
1316
- <p class="text-neutral-400 text-sm font-light leading-relaxed mb-6">
1317
- ${proj.description}
1318
- </p>
1319
- </div>
1320
-
1321
- <div>
1322
- <div class="flex flex-wrap gap-1.5 mb-6">
1323
- ${(proj.stack || []).map(t => `
1324
- <span class="text-[11px] font-mono text-neutral-300 bg-neutral-900 px-2 py-0.5 rounded border border-white/10">
1325
- ${t}
1326
- </span>
1327
- `).join('')}
1328
- </div>
1329
- <div class="flex items-center gap-4 pt-4 border-t border-white/5 text-xs font-mono">
1330
- <a href="${proj.link}" target="_blank" class="text-white hover:underline flex items-center gap-1">
1331
- ⌥ Source Code
1332
- </a>
1333
- ${proj.liveDemo ? `<a href="${proj.liveDemo}" target="_blank" class="text-neutral-400 hover:text-white flex items-center gap-1">Live Demo ↗</a>` : ''}
1334
- </div>
1335
- </div>
1336
- </div>
1337
- `).join('')}
1338
- </div>
1339
- </section>
1340
-
1341
- <!-- Interactive Terminal Shell -->
1342
- <section id="terminal" class="py-20 px-6 max-w-7xl mx-auto border-t border-white/10">
1343
- <div class="mb-8">
1344
- <span class="font-mono text-xs text-neutral-400 uppercase tracking-widest block mb-2">02 // Runtime Console</span>
1345
- <h2 class="font-display text-3xl text-white font-normal">Interactive System Shell</h2>
1346
- </div>
1347
-
1348
- <div class="terminal-window rounded-sm overflow-hidden font-mono text-xs">
1349
- <div class="bg-[#12141a] px-4 py-2.5 border-b border-white/10 flex items-center justify-between">
1350
- <div class="flex items-center gap-2">
1351
- <span class="w-2.5 h-2.5 rounded-full bg-rose-500"></span>
1352
- <span class="w-2.5 h-2.5 rounded-full bg-amber-500"></span>
1353
- <span class="w-2.5 h-2.5 rounded-full bg-emerald-500"></span>
1354
- <span class="text-[11px] text-neutral-400 ml-2">guest@alexrivera.dev:~</span>
1355
- </div>
1356
- <span class="text-[10px] text-neutral-500">BASH 5.2</span>
1357
- </div>
1358
-
1359
- <div id="termLogs" class="p-6 text-neutral-300 min-h-[220px] max-h-[360px] overflow-y-auto space-y-3">
1360
- <div class="text-neutral-400">
1361
- Alex Rivera Developer Runtime [v2.4.0]<br>
1362
- 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.
1363
- </div>
1364
- </div>
1365
-
1366
- <form id="termForm" class="p-4 bg-[#0e1014] border-t border-white/10 flex items-center gap-2">
1367
- <span class="text-emerald-400 font-bold">$</span>
1368
- <input
1369
- id="termInput"
1370
- type="text"
1371
- placeholder="type 'skills' or 'help'..."
1372
- class="bg-transparent text-white focus:outline-none flex-1 font-mono text-xs placeholder:text-neutral-600"
1373
- autocomplete="off"
1374
- />
1375
- <button type="submit" class="px-2.5 py-1 bg-white/10 text-neutral-300 text-[11px] rounded hover:bg-white/20">Enter ↵</button>
1376
- </form>
1377
- </div>
1378
- </section>
1379
-
1380
- <!-- Footer -->
1381
- <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">
1382
- <div>© ${new Date().getFullYear()} ${uxPlan.companyName}. Synthesized with Pixel Crew design-first architecture.</div>
1383
- <div class="flex items-center gap-6 text-neutral-400">
1384
- <a href="https://github.com" class="hover:text-white">GitHub</a>
1385
- <a href="https://twitter.com" class="hover:text-white">Twitter</a>
1386
- <a href="https://linkedin.com" class="hover:text-white">LinkedIn</a>
1387
- </div>
1388
- </footer>
1389
-
1390
- <!-- Client-Side Interaction Controller Script -->
1391
- <script>
1392
- // 1. Live Filter System
1393
- const filterBtns = document.querySelectorAll('.filter-btn');
1394
- const projectCards = document.querySelectorAll('.project-card');
1395
-
1396
- filterBtns.forEach(btn => {
1397
- btn.addEventListener('click', () => {
1398
- filterBtns.forEach(b => {
1399
- b.classList.remove('active', 'bg-white', 'text-black');
1400
- b.classList.add('bg-brandSurface', 'text-neutral-400');
1401
- });
1402
- btn.classList.add('active', 'bg-white', 'text-black');
1403
- btn.classList.remove('bg-brandSurface', 'text-neutral-400');
1404
-
1405
- const cat = btn.getAttribute('data-category');
1406
- projectCards.forEach(card => {
1407
- if (cat === 'All' || card.getAttribute('data-category') === cat) {
1408
- card.style.display = 'flex';
1409
- } else {
1410
- card.style.display = 'none';
1411
- }
1412
- });
1413
- });
1414
- });
1415
-
1416
- // 2. Terminal Shell Interaction
1417
- const termLogs = document.getElementById('termLogs');
1418
- const termForm = document.getElementById('termForm');
1419
- const termInput = document.getElementById('termInput');
1420
-
1421
- const COMMAND_MAP = {
1422
- 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",
1423
- 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)",
1424
- 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",
1425
- experience: "• Staff Engineer @ Nexus (2023-Present)\\n• Lead Architect @ CloudScale (2020-2023)\\n• Senior Full-Stack @ Voxel (2018-2020)",
1426
- stack: "TypeScript, Rust, Next.js, React 19, Python, Tailwind CSS, PostgreSQL, Redis, Docker, AWS",
1427
- 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
1428
307
  };
1429
-
1430
- termForm.addEventListener('submit', (e) => {
1431
- e.preventDefault();
1432
- const raw = termInput.value.trim();
1433
- if (!raw) return;
1434
-
1435
- const cmd = raw.toLowerCase();
1436
- if (cmd === 'clear') {
1437
- termLogs.innerHTML = '';
1438
- termInput.value = '';
1439
- return;
1440
- }
1441
-
1442
- const res = COMMAND_MAP[cmd] || ("Command not found: '" + raw + "'. Type 'help' for available commands.");
1443
-
1444
- const item = document.createElement('div');
1445
- item.className = 'space-y-1';
1446
- item.innerHTML = \`
1447
- <div class="flex items-center gap-2 text-emerald-400">
1448
- <span>$</span>
1449
- <span>\${raw}</span>
1450
- </div>
1451
- <div class="text-neutral-400 whitespace-pre-line pl-4 border-l border-white/10">
1452
- \${res}
1453
- </div>
1454
- \`;
1455
- termLogs.appendChild(item);
1456
- termLogs.scrollTop = termLogs.scrollHeight;
1457
- termInput.value = '';
1458
- });
1459
- </script>
1460
-
1461
- </body>
1462
- </html>`;
1463
308
  }
1464
309
 
1465
310
  /**
@@ -1518,7 +363,6 @@ ${designSystem.cssTokens}
1518
363
 
1519
364
  /**
1520
365
  * Step 6: Multi-File Exporter
1521
- * Saves the entire project structure to disk
1522
366
  */
1523
367
  async saveMultiFileOutput(outputDir, buildResult, creativeDirection, uxPlan, evaluation) {
1524
368
  await fs.mkdir(outputDir, { recursive: true });
@@ -1547,39 +391,44 @@ ${designSystem.cssTokens}
1547
391
  }
1548
392
 
1549
393
  /**
1550
- * Orchestrates the complete OneShot Synthesis
394
+ * Orchestrates the complete OneShot Synthesis via Dynamic Task Graph
1551
395
  */
1552
396
  async generateWebsite(userPrompt, options = {}) {
1553
397
  const startTime = Date.now();
1554
398
  const onProgress = options.onProgress || (() => {});
1555
399
  const outputDir = options.outputDir || path.resolve(process.cwd(), 'generated-site');
1556
400
 
1557
- // 0. Brief Analysis
1558
- const brief = this.runBriefAnalyzer(userPrompt, options);
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);
1559
405
 
1560
- // 1. Creative Direction
1561
- const creativeDirection = await this.runCreativeDirector(userPrompt, brief, onProgress);
406
+ // 2. Creative Direction
407
+ const creativeDirection = await this.runCreativeDirector(userPrompt, { domain: spec.domain, targetFramework: spec.framework }, onProgress);
1562
408
 
1563
- // 2. UX Planning
409
+ // 3. UX Planning
1564
410
  const uxPlan = await this.runUXPlanner(userPrompt, creativeDirection, onProgress);
1565
411
 
1566
- // 3. Design System
412
+ // 4. Design System
1567
413
  const designSystem = await this.runDesignSystem(creativeDirection, uxPlan, onProgress);
1568
414
 
1569
- // 4. Frontend Multi-File Build
1570
- let buildResult = await this.runFrontendBuilder(
1571
- userPrompt,
1572
- creativeDirection,
1573
- uxPlan,
1574
- designSystem,
1575
- brief.targetFramework,
1576
- onProgress
1577
- );
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
+ };
1578
427
 
1579
- // 5. Visual Critic Evaluation
1580
- let evaluation = await this.runVisualCritic(buildResult.html, creativeDirection, onProgress);
428
+ // 6. Visual Critic Evaluation
429
+ const evaluation = await this.runVisualCritic(buildResult.html, creativeDirection, onProgress);
1581
430
 
1582
- // 6. Token Savings Metrics
431
+ // 7. Token Savings Metrics
1583
432
  const estimatedRawTokens = 42500;
1584
433
  const actualTokens = 11800;
1585
434
  const saved = estimatedRawTokens - actualTokens;
@@ -1592,14 +441,15 @@ ${designSystem.cssTokens}
1592
441
  efficiencyRatio: efficiency
1593
442
  };
1594
443
 
1595
- // 7. Save complete multi-file project to disk
444
+ // 8. Save complete multi-file project to disk
1596
445
  await this.saveMultiFileOutput(outputDir, buildResult, creativeDirection, uxPlan, evaluation);
1597
446
 
1598
447
  const durationMs = Date.now() - startTime;
1599
448
 
1600
449
  return {
1601
450
  userPrompt,
1602
- targetFramework: brief.targetFramework,
451
+ targetFramework: spec.framework,
452
+ taskGraph,
1603
453
  outputDir,
1604
454
  creativeDirection,
1605
455
  uxPlan,