@deneb-ui/cli 2.0.22 → 2.0.24

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.
Files changed (52) hide show
  1. package/README.md +62 -114
  2. package/bin/index.js +55 -12
  3. package/package.json +25 -5
  4. package/src/arc/__fixtures__/next-app-basic/package.json +10 -0
  5. package/src/arc/__fixtures__/next-app-basic/src/app/globals.css +3 -0
  6. package/src/arc/__fixtures__/next-app-basic/src/app/layout.tsx +9 -0
  7. package/src/arc/__fixtures__/next-app-basic/src/app/page.tsx +11 -0
  8. package/src/arc/__fixtures__/next-app-basic/src/components/Header.tsx +13 -0
  9. package/src/arc/__fixtures__/next-app-basic/src/components/Hero.tsx +12 -0
  10. package/src/arc/__fixtures__/next-app-basic/src/components/PromoBanner.tsx +10 -0
  11. package/src/arc/__fixtures__/next-app-basic/tsconfig.json +12 -0
  12. package/src/arc/__fixtures__/next-app-storefront/components.json +14 -0
  13. package/src/arc/__fixtures__/next-app-storefront/package.json +22 -0
  14. package/src/arc/__fixtures__/next-app-storefront/src/app/about/page.tsx +13 -0
  15. package/src/arc/__fixtures__/next-app-storefront/src/app/globals.css +5 -0
  16. package/src/arc/__fixtures__/next-app-storefront/src/app/layout.tsx +19 -0
  17. package/src/arc/__fixtures__/next-app-storefront/src/app/page.tsx +13 -0
  18. package/src/arc/__fixtures__/next-app-storefront/src/components/Features.tsx +31 -0
  19. package/src/arc/__fixtures__/next-app-storefront/src/components/Hero.tsx +45 -0
  20. package/src/arc/__fixtures__/next-app-storefront/src/components/ProductGrid.tsx +49 -0
  21. package/src/arc/__fixtures__/next-app-storefront/src/components/SiteFooter.tsx +22 -0
  22. package/src/arc/__fixtures__/next-app-storefront/src/components/SiteHeader.tsx +21 -0
  23. package/src/arc/__fixtures__/next-app-storefront/src/components/ui/button.tsx +36 -0
  24. package/src/arc/__fixtures__/next-app-storefront/tsconfig.json +15 -0
  25. package/src/arc/__fixtures__/next-pages-basic/package.json +10 -0
  26. package/src/arc/__fixtures__/next-pages-basic/pages/_app.jsx +5 -0
  27. package/src/arc/__fixtures__/next-pages-basic/pages/contact.jsx +9 -0
  28. package/src/arc/__fixtures__/next-pages-basic/pages/index.jsx +11 -0
  29. package/src/arc/__fixtures__/next-pages-basic/styles/globals.css +9 -0
  30. package/src/arc/__tests__/arc.test.cjs +498 -0
  31. package/src/arc/adapters.cjs +184 -0
  32. package/src/arc/ast.cjs +339 -0
  33. package/src/arc/field-paths.cjs +165 -0
  34. package/src/arc/fivora-contract.cjs +521 -0
  35. package/src/arc/font-plan.cjs +65 -0
  36. package/src/arc/fs-utils.cjs +170 -0
  37. package/src/arc/index.cjs +627 -0
  38. package/src/arc/learning.cjs +211 -0
  39. package/src/arc/manifest.cjs +438 -0
  40. package/src/arc/next-config.cjs +279 -0
  41. package/src/arc/planner.cjs +252 -0
  42. package/src/arc/printer.cjs +183 -0
  43. package/src/arc/recipes-v2.cjs +49 -0
  44. package/src/arc/scanner.cjs +613 -0
  45. package/src/arc/semantic.cjs +651 -0
  46. package/src/arc/style-candidates.cjs +72 -0
  47. package/src/arc/transformer.cjs +677 -0
  48. package/src/arc/validator.cjs +173 -0
  49. package/src/arc/version.cjs +22 -0
  50. package/src/common/style-validation.ts +30 -0
  51. package/src/tools/deneb-fonts.cjs +114 -0
  52. package/src/tools/template-preview-focus-bridge.cjs +3 -3
package/README.md CHANGED
@@ -1,138 +1,86 @@
1
- # DENEB
2
-
3
- ### The official developer CLI for DENEB UI.
4
-
5
- > **DENEB UI — Build beautiful interfaces, effortlessly.**
6
- > The premier visual-first React component ecosystem.
7
- > Proudly presented by **DENEB-UI Collaborate with FIVORA**.
8
-
9
- [![Framework: DENEB UI](https://img.shields.io/badge/Framework-DENEB_UI_v2.0-blue.svg)](https://github.com/deneb-ui/ui)
10
- [![License: MIT](https://img.shields.io/badge/License-MIT-teal.svg)](https://opensource.org/licenses/MIT)
11
-
12
- ---
13
-
14
- ## Installation
15
-
16
- You can run commands directly using `npx`:
17
- ```bash
18
- npx @deneb-ui/cli <command>
19
- ```
20
-
21
- Or install as a project devDependency:
22
- ```bash
23
- npm install -D @deneb-ui/cli
24
- ```
25
-
26
- Or install globally:
27
- ```bash
28
- npm install -g @deneb-ui/cli
29
- ```
30
-
31
- The CLI command is available as `deneb` (with alias `denebui`).
1
+ <p align="center">
2
+ <a href="https://deneb.fivora.site">
3
+ <img src="https://img.shields.io/badge/DENEB_CLI-Storefront_Authoring_Toolkit-6366F1?style=for-the-badge&labelColor=0f172a" alt="DENEB CLI" />
4
+ </a>
5
+ </p>
6
+
7
+ <p align="center">
8
+ <a href="https://www.npmjs.com/package/@deneb-ui/cli"><img src="https://img.shields.io/npm/v/@deneb-ui/cli.svg?style=flat-square&color=6366F1" alt="npm version" /></a>
9
+ <a href="https://www.npmjs.com/package/@deneb-ui/cli"><img src="https://img.shields.io/npm/dm/@deneb-ui/cli.svg?style=flat-square&color=6366F1" alt="npm downloads" /></a>
10
+ <img src="https://img.shields.io/badge/Node-%3E%3D18-339933?style=flat-square&logo=node.js&logoColor=white" alt="Node.js" />
11
+ <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-emerald?style=flat-square" alt="MIT License" /></a>
12
+ </p>
13
+
14
+ <p align="center">
15
+ <strong>Scaffold, convert, validate, and ship Fivora-ready storefront templates.</strong>
16
+ </p>
17
+
18
+ <p align="center">
19
+ <a href="https://deneb.fivora.site/docs/cli"><strong>CLI Reference</strong></a> ·
20
+ <a href="https://deneb.fivora.site/docs/installation"><strong>Installation</strong></a> ·
21
+ <a href="https://github.com/deneb-ui/core"><strong>GitHub</strong></a>
22
+ </p>
32
23
 
33
24
  ---
34
25
 
35
- ## Commands
36
-
37
- ### 1. `deneb add <component>` (Component Registry)
38
- Add production-ready DENEB UI components into `src/components/ui/`:
39
-
40
- ```bash
41
- # List available components:
42
- npx @deneb-ui/cli add list
43
-
44
- # Add specific components:
45
- npx @deneb-ui/cli add product-card
46
- npx @deneb-ui/cli add contact-actions
47
- npx @deneb-ui/cli add location-card
48
- npx @deneb-ui/cli add whatsapp-button
49
- npx @deneb-ui/cli add dialog
50
- npx @deneb-ui/cli add all
51
- ```
52
-
53
- ### 1. `deneb init` (Initialize Existing Project)
54
- Converts and configures any **ongoing Next.js project** for the Fivora platform:
55
- - Generates `fivora-template.json` (Version 2 contract with strict visual editing)
56
- - Creates `src/data/site-data.json` with merchant defaults
57
- - Injects npm scripts (`lab`, `validate`, `zip`, `validate-and-zip`, `update:deneb`)
58
- - Installs `@deneb-ui/ui` and `@deneb-ui/cli`
26
+ ## Quick start
59
27
 
60
28
  ```bash
29
+ # Convert an existing Next.js app (Deneb ARC — default engine)
61
30
  npx @deneb-ui/cli init
62
- # Or: deneb init
63
- ```
64
-
65
- ### 2. `deneb update` (Update Packages & DENEB Components)
66
- Keeps your project up to date by updating both npm packages and installed DENEB components:
67
- - Updates `@deneb-ui/ui` and `@deneb-ui/cli` to the latest releases
68
- - Automatically scans `src/components/ui/` and synchronizes existing DENEB UI components with the latest definitions
69
31
 
70
- ```bash
71
- npm run update:deneb
72
- # Or: deneb update
73
- ```
32
+ # Preview the transformation plan without writing files
33
+ npx @deneb-ui/cli init --explain
74
34
 
75
- ### 3. `deneb validate` (Preflight Contract Validator)
76
- Runs Fivora preflight verification against manifest contracts, static export fixtures, and visual editing markers (`data-fivora-path`, `data-fivora-page`):
35
+ # Validate Fivora contract compliance
36
+ npx @deneb-ui/cli validate .
77
37
 
78
- ```bash
79
- npm run validate
80
- # Or: deneb validate .
81
- # Or validate and immediately bundle on success:
82
- deneb validate --zip
38
+ # Package a clean upload ZIP
39
+ npx @deneb-ui/cli validate --zip
83
40
  ```
84
41
 
85
- ### 4. `deneb zip` / `deneb pack` (Clean Package Generator)
86
- Creates a clean, upload-ready `fivora-template.zip` excluding unnecessary directories and secret files (`node_modules`, `.next`, `.git`, `.env*`, `.cache`, `.turbo`, logs):
42
+ Install as a dev dependency:
87
43
 
88
44
  ```bash
89
- npm run zip
90
- # Or: deneb zip .
91
- ```
92
-
93
- ### 5. `deneb validate-and-zip` (One-Step Preflight Check & Clean ZIP)
94
- The safest, recommended command for releasing templates. Runs full preflight validation; if and only if all platform checks pass 100%, it bundles a clean `fivora-template.zip`:
95
-
96
- ```bash
97
- npm run validate-and-zip
98
- # Or: deneb validate-and-zip .
99
- # Or: deneb validate and zip
45
+ npm install -D @deneb-ui/cli
46
+ # Command: deneb
100
47
  ```
101
48
 
102
- ### 6. `deneb add <component>` (Component Registry)
103
- Add or update production-ready DENEB UI components into `src/components/ui/`:
49
+ ---
104
50
 
105
- ```bash
106
- # List available components:
107
- npx @deneb-ui/cli add list
108
-
109
- # Add specific components:
110
- npx @deneb-ui/cli add product-card
111
- npx @deneb-ui/cli add contact-actions
112
- npx @deneb-ui/cli add location-card
113
- npx @deneb-ui/cli add whatsapp-button
114
- npx @deneb-ui/cli add dialog
115
- npx @deneb-ui/cli add all
116
- ```
51
+ ## Commands
117
52
 
118
- ### 7. `deneb create <project-name>` (Start from Scratch)
119
- Scaffolds a brand-new Next.js App Router storefront pre-configured with Tailwind CSS and `@deneb-ui/ui`:
53
+ | Command | Description |
54
+ | :--- | :--- |
55
+ | `deneb init` | Run **Deneb ARC** — AST conversion of React/Next.js apps into Fivora-editable templates |
56
+ | `deneb init --legacy` | Use the legacy regex converter instead of ARC |
57
+ | `deneb init --dry-run` | Simulate conversion; print field paths without writing |
58
+ | `deneb init --explain` | Show transformation plan with confidence scores |
59
+ | `deneb validate` | Preflight manifest + visual editing contract checks |
60
+ | `deneb zip` | Create upload-ready `fivora-template.zip` |
61
+ | `deneb doctor` | Environment, dependency, and export diagnostics |
62
+ | `deneb add <component>` | Copy DENEB UI components into your project |
63
+ | `deneb lab` | Launch local visual editing preview lab |
64
+ | `deneb update` | Update `@deneb-ui/*` packages and synced components |
65
+
66
+ Full reference: [deneb.fivora.site/docs/cli](https://deneb.fivora.site/docs/cli)
120
67
 
121
- ```bash
122
- npx @deneb-ui/cli create my-store
123
- ```
68
+ ---
124
69
 
125
- ### 8. `deneb lab` (Local Visual Editing Lab)
126
- Launches the interactive visual editing test lab simulating Fivora editor messages:
70
+ ## What `deneb init` does (ARC)
127
71
 
128
- ```bash
129
- npm run lab
130
- # Or: deneb lab .
131
- ```
72
+ 1. **Scans** your Next.js project — routes, dependencies, reachable pages
73
+ 2. **Analyzes** JSX for editable text, images, URLs, collections, CTAs
74
+ 3. **Transforms** source via AST — injects preview markers and `site-data` bindings
75
+ 4. **Generates** `fivora-template.json` + `site-data.json` with strict self-validation
76
+ 5. **Backs up** changed files to `.deneb-backup-*` for safe rollback
132
77
 
133
78
  ---
134
79
 
135
- ## 👤 Author & Credits
80
+ ## Authors
81
+
82
+ Created and maintained by **[Chamika Gayashan](https://github.com/chamikathereal)** and **[Induranga Kawishwara](https://github.com/Induranga-kawishwara)**.
136
83
 
137
- Created and architected by **Chamika Gayashan & Induranga Kawishwara**.
138
- Part of the **DENEB UI** ecosystem.
84
+ <p align="center">
85
+ <sub>MIT © DENEB UI</sub>
86
+ </p>
package/bin/index.js CHANGED
@@ -602,8 +602,8 @@ function initProject(targetInput, options = {}) {
602
602
  const pkgPath = path.join(targetDir, 'package.json');
603
603
 
604
604
  console.log('\n' + createBox([
605
- '\x1b[1m\x1b[37mDENEB TEMPLATE INITIALIZER\x1b[0m',
606
- '\x1b[90mConfigure existing Next.js project for Fivora Platform\x1b[0m',
605
+ '\x1b[1m\x1b[37mDENEB ARC\x1b[0m',
606
+ '\x1b[90mAdaptive Refactoring Compiler for Fivora-editable UI\x1b[0m',
607
607
  '\x1b[90mPowered by DENEB-UI Collaborate with FIVORA\x1b[0m'
608
608
  ], 58) + '\n');
609
609
 
@@ -637,20 +637,27 @@ function initProject(targetInput, options = {}) {
637
637
  // 1. Scan / Detect Pages
638
638
  const detectedPages = detectPages(targetDir);
639
639
 
640
- // 2. Run Universal Template Conversion Engine
641
- // Automatically detects CSS/UI frameworks (shadcn/ui, HeroUI, Tailwind CSS),
642
- // creates safe backup, instruments Root Layout with SiteDataProvider,
643
- // extracts hardcoded text/images/buttons/placeholders,
644
- // injects data-preview-field-path markers, harmonizes UI components,
645
- // and builds synchronized site-data.json & fivora-template.json.
640
+ // 2. Deneb ARC (default) or legacy regex converter (--legacy)
646
641
  let conversionRes = null;
647
642
  try {
648
- const { runUniversalTemplateConversion } = require('../src/tools/template-converter.cjs');
649
- conversionRes = runUniversalTemplateConversion(targetDir, projectName, detectedPages, options);
643
+ if (options.legacy) {
644
+ const { runUniversalTemplateConversion } = require('../src/tools/template-converter.cjs');
645
+ conversionRes = runUniversalTemplateConversion(targetDir, projectName, detectedPages, options);
646
+ } else {
647
+ const { runDenebArc } = require('../src/arc/index.cjs');
648
+ conversionRes = runDenebArc(targetDir, projectName, {
649
+ ...options,
650
+ detectedPages,
651
+ });
652
+ }
650
653
  } catch (err) {
651
654
  console.error(`\x1b[33m⚠ Note:\x1b[0m Automated conversion encountered an issue: ${err.message}. Falling back to default generation.`);
652
655
  }
653
656
 
657
+ if (options.dryRun) {
658
+ return conversionRes;
659
+ }
660
+
654
661
  // 3. Fallback: Generate fivora-template.json if not yet present
655
662
  const manifestPath = path.join(targetDir, 'fivora-template.json');
656
663
  if (!fs.existsSync(manifestPath)) {
@@ -685,6 +692,7 @@ function initProject(targetInput, options = {}) {
685
692
  'validate-and-zip': 'deneb validate-and-zip .',
686
693
  'package:template': 'deneb package .',
687
694
  'update:deneb': 'deneb update',
695
+ 'fonts:install': 'deneb fonts install .',
688
696
  };
689
697
  let addedCount = 0;
690
698
  for (const [key, val] of Object.entries(scriptsToAdd)) {
@@ -756,6 +764,16 @@ function initProject(targetInput, options = {}) {
756
764
  }
757
765
  }
758
766
 
767
+ if (!skipInstall) {
768
+ try {
769
+ const { runFontsInstall } = require('../src/tools/deneb-fonts.cjs');
770
+ console.log(`\n\x1b[36mAa Downloading and configuring DENEB Google Fonts...\x1b[0m`);
771
+ runFontsInstall(targetDir, []);
772
+ } catch (err) {
773
+ console.log(`\n\x1b[33m! Fonts were not installed automatically: ${err.message}. Run \x1b[1mdeneb fonts install .\x1b[0m\x1b[0m`);
774
+ }
775
+ }
776
+
759
777
  console.log(`\n\x1b[32m✔ Project initialization complete!\x1b[0m`);
760
778
  console.log(`\nYou can now run:`);
761
779
  console.log(` \x1b[36mnpm run lab\x1b[0m \x1b[90m# Launch Local Visual Editing Lab\x1b[0m`);
@@ -999,17 +1017,31 @@ if (command === 'validate' && (commandArgs[0] === 'and' || commandArgs[0] === '&
999
1017
  if (command === 'init') {
1000
1018
  let targetInput = '.';
1001
1019
  let recipeName = null;
1020
+ let dryRun = false;
1021
+ let explain = false;
1022
+ let legacy = false;
1023
+ let telemetry = 'off';
1002
1024
  for (let i = 0; i < commandArgs.length; i++) {
1003
1025
  const arg = commandArgs[i];
1004
1026
  if (arg === '--recipe' || arg === '-r') {
1005
1027
  recipeName = commandArgs[++i];
1006
1028
  } else if (arg.startsWith('--recipe=')) {
1007
1029
  recipeName = arg.split('=')[1];
1030
+ } else if (arg === '--dry-run' || arg === '--dryrun') {
1031
+ dryRun = true;
1032
+ } else if (arg === '--explain') {
1033
+ explain = true;
1034
+ } else if (arg === '--legacy') {
1035
+ legacy = true;
1036
+ } else if (arg === '--telemetry' && commandArgs[i + 1]) {
1037
+ telemetry = commandArgs[++i];
1038
+ } else if (arg.startsWith('--telemetry=')) {
1039
+ telemetry = arg.split('=')[1] || 'off';
1008
1040
  } else if (!arg.startsWith('-')) {
1009
1041
  targetInput = arg;
1010
1042
  }
1011
1043
  }
1012
- initProject(targetInput, { recipeName });
1044
+ initProject(targetInput, { recipeName, dryRun, explain, legacy, telemetry });
1013
1045
  } else if (command === 'create') {
1014
1046
  createTemplate(commandArgs[0]);
1015
1047
  } else if (command === 'add') {
@@ -1053,6 +1085,9 @@ if (command === 'init') {
1053
1085
  runValidateAndZip(commandArgs[0] || '.', commandArgs.slice(1));
1054
1086
  } else if (command === 'update' || command === 'upgrade') {
1055
1087
  updateDependencies(commandArgs);
1088
+ } else if (command === 'fonts') {
1089
+ const { runFontsCommand } = require('../src/tools/deneb-fonts.cjs');
1090
+ process.exit(runFontsCommand(commandArgs));
1056
1091
  } else if (command === 'save-recipe' || command === 'learn') {
1057
1092
  const targetDir = path.resolve(commandArgs[0] || '.');
1058
1093
  const recipeName = commandArgs[1] || path.basename(targetDir);
@@ -1072,10 +1107,12 @@ if (command === 'init') {
1072
1107
  DENEB UI Framework — Powered by DENEB-UI Collaborate with FIVORA
1073
1108
 
1074
1109
  Core Commands:
1075
- init Auto-convert & configure existing Next.js into editable Fivora storefront (e.g. deneb init --recipe fashion)
1110
+ init Deneb ARC: convert an existing React/Next.js app into a Fivora-editable storefront
1111
+ flags: --dry-run --explain --recipe <name> --legacy --telemetry off|anonymous|enhanced
1076
1112
  doctor Run comprehensive environment, manifest, visual editing AST & asset diagnostic checks (flags: --fix, --json)
1077
1113
  save-recipe Learn and save calibrated fixes & schemas into reusable recipe bank (e.g. deneb save-recipe . shoes-store)
1078
1114
  learn Alias for save-recipe
1115
+ fonts Google Fonts catalog — list presets or install self-hosted @fontsource packages
1079
1116
  update Update DENEB packages (@deneb-ui/ui, @deneb-ui/cli) and UI components
1080
1117
  validate Validate website configuration and visual editing contracts with Fivora platform
1081
1118
  zip Zip the project without unnecessary folders or files (node_modules, .next, .git, .env)
@@ -1093,9 +1130,15 @@ Examples:
1093
1130
  deneb doctor --fix
1094
1131
  deneb doctor --json
1095
1132
  deneb init
1133
+ deneb init --dry-run
1134
+ deneb init --explain
1096
1135
  deneb init --recipe fashion
1097
1136
  deneb init --recipe electronics
1098
1137
  deneb init --recipe cosmetics
1138
+ deneb init --legacy
1139
+ deneb fonts list
1140
+ deneb fonts install .
1141
+ deneb fonts install . --font inter --font playfair-display
1099
1142
  deneb update
1100
1143
  deneb validate .
1101
1144
  deneb validate --zip
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deneb-ui/cli",
3
- "version": "2.0.22",
4
- "description": "Official developer CLI for DENEB UI — Validating, scaffolding, testing, and packaging storefront templates. Created by Chamika Gayashan & Induranga Kawishwara.",
3
+ "version": "2.0.24",
4
+ "description": "Official DENEB CLI — scaffold, convert, validate, and package Fivora-ready storefront templates.",
5
5
  "bin": {
6
6
  "deneb": "bin/index.js",
7
7
  "denebui": "bin/index.js",
@@ -15,7 +15,7 @@
15
15
  "url": "git+https://github.com/deneb-ui/core.git",
16
16
  "directory": "cli/deneb-cli"
17
17
  },
18
- "homepage": "https://github.com/deneb-ui/core#readme",
18
+ "homepage": "https://deneb.fivora.site/docs/cli",
19
19
  "bugs": {
20
20
  "url": "https://github.com/deneb-ui/core/issues"
21
21
  },
@@ -24,16 +24,36 @@
24
24
  "src",
25
25
  "README.md"
26
26
  ],
27
+ "scripts": {
28
+ "test": "node --test src/arc/__tests__/arc.test.cjs"
29
+ },
27
30
  "keywords": [
28
31
  "deneb",
29
32
  "deneb-ui",
30
33
  "cli",
34
+ "fivora",
35
+ "nextjs",
36
+ "template",
31
37
  "validator",
32
- "packager"
38
+ "packager",
39
+ "visual-editing",
40
+ "storefront",
41
+ "scaffold"
33
42
  ],
34
43
  "author": "Chamika Gayashan & Induranga Kawishwara",
44
+ "contributors": [
45
+ "Chamika Gayashan <https://github.com/chamikathereal>",
46
+ "Induranga Kawishwara <https://github.com/Induranga-kawishwara>"
47
+ ],
35
48
  "license": "MIT",
36
49
  "dependencies": {
37
- "adm-zip": "^0.6.0"
50
+ "@babel/parser": "^7.28.0",
51
+ "@deneb-ui/core": "^2.0.24",
52
+ "adm-zip": "^0.6.0",
53
+ "recast": "^0.23.11"
54
+ },
55
+ "devDependencies": {
56
+ "esbuild": "^0.28.2",
57
+ "typescript": "^5.9.3"
38
58
  }
39
59
  }
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "arc-fixture-next-app",
3
+ "private": true,
4
+ "dependencies": {
5
+ "next": "16.0.0",
6
+ "react": "^19.0.0",
7
+ "react-dom": "^19.0.0",
8
+ "tailwindcss": "^3.4.0"
9
+ }
10
+ }
@@ -0,0 +1,3 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
@@ -0,0 +1,9 @@
1
+ import './globals.css';
2
+
3
+ export default function RootLayout({ children }: { children: React.ReactNode }) {
4
+ return (
5
+ <html lang="en">
6
+ <body>{children}</body>
7
+ </html>
8
+ );
9
+ }
@@ -0,0 +1,11 @@
1
+ import { Hero } from '../components/Hero';
2
+ import { Header } from '../components/Header';
3
+
4
+ export default function HomePage() {
5
+ return (
6
+ <main>
7
+ <Header />
8
+ <Hero />
9
+ </main>
10
+ );
11
+ }
@@ -0,0 +1,13 @@
1
+ export function Header() {
2
+ return (
3
+ <header className="site-header">
4
+ <a href="/" className="logo">
5
+ Aurora Store
6
+ </a>
7
+ <nav>
8
+ <a href="/shop">Shop</a>
9
+ <a href="/about">About</a>
10
+ </nav>
11
+ </header>
12
+ );
13
+ }
@@ -0,0 +1,12 @@
1
+ export function Hero() {
2
+ return (
3
+ <section className="hero">
4
+ <h1>Summer Collection</h1>
5
+ <p>Discover lightweight performance apparel for every season.</p>
6
+ <a href="https://wa.me/94771234567" className="btn cta">
7
+ Start a Conversation
8
+ </a>
9
+ <img src="/hero.jpg" alt="Summer Collection" />
10
+ </section>
11
+ );
12
+ }
@@ -0,0 +1,10 @@
1
+ 'use client';
2
+
3
+ export function PromoBanner() {
4
+ return (
5
+ <div className="banner">
6
+ <h2>Limited Drop</h2>
7
+ <button>Notify Me</button>
8
+ </div>
9
+ );
10
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2017",
4
+ "jsx": "preserve",
5
+ "module": "esnext",
6
+ "moduleResolution": "bundler",
7
+ "resolveJsonModule": true,
8
+ "paths": {
9
+ "@/*": ["./src/*"]
10
+ }
11
+ }
12
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema.json",
3
+ "style": "new-york",
4
+ "tailwind": {
5
+ "config": "",
6
+ "css": "src/app/globals.css",
7
+ "baseColor": "slate",
8
+ "cssVariables": true
9
+ },
10
+ "aliases": {
11
+ "components": "@/components",
12
+ "ui": "@/components/ui"
13
+ }
14
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "acme-storefront",
3
+ "version": "0.1.0",
4
+ "private": true,
5
+ "scripts": {
6
+ "dev": "next dev",
7
+ "build": "next build"
8
+ },
9
+ "dependencies": {
10
+ "next": "15.1.0",
11
+ "react": "19.0.0",
12
+ "react-dom": "19.0.0",
13
+ "lucide-react": "^0.460.0",
14
+ "framer-motion": "^11.11.0",
15
+ "class-variance-authority": "^0.7.0",
16
+ "@radix-ui/react-slot": "^1.1.0"
17
+ },
18
+ "devDependencies": {
19
+ "tailwindcss": "^4.0.0",
20
+ "typescript": "^5.6.0"
21
+ }
22
+ }
@@ -0,0 +1,13 @@
1
+ export default function AboutPage() {
2
+ return (
3
+ <main className="mx-auto max-w-3xl px-6 py-24">
4
+ <h1 className="text-4xl font-semibold tracking-tight">Our Story</h1>
5
+ <p className="mt-6 text-lg leading-relaxed text-slate-600">
6
+ Acme was founded in a garage in 2014 with a single goal: build tools that outlast trends.
7
+ </p>
8
+ <div className="mt-10 text-sm text-slate-500">
9
+ Every product is assembled by hand in small batches.
10
+ </div>
11
+ </main>
12
+ );
13
+ }
@@ -0,0 +1,5 @@
1
+ @import 'tailwindcss';
2
+
3
+ :root {
4
+ --brand-primary: #0f172a;
5
+ }
@@ -0,0 +1,19 @@
1
+ import type { ReactNode } from 'react';
2
+ import { SiteHeader } from '@/components/SiteHeader';
3
+ import { SiteFooter } from '@/components/SiteFooter';
4
+
5
+ export const metadata = {
6
+ title: 'Acme Storefront',
7
+ };
8
+
9
+ export default function RootLayout({ children }: { children: ReactNode }) {
10
+ return (
11
+ <html lang="en">
12
+ <body className="min-h-screen bg-white text-slate-900 antialiased">
13
+ <SiteHeader />
14
+ {children}
15
+ <SiteFooter />
16
+ </body>
17
+ </html>
18
+ );
19
+ }
@@ -0,0 +1,13 @@
1
+ import { Hero } from '@/components/Hero';
2
+ import { ProductGrid } from '@/components/ProductGrid';
3
+ import { Features } from '@/components/Features';
4
+
5
+ export default function HomePage() {
6
+ return (
7
+ <main className="flex flex-col gap-24 pb-24">
8
+ <Hero />
9
+ <ProductGrid />
10
+ <Features />
11
+ </main>
12
+ );
13
+ }
@@ -0,0 +1,31 @@
1
+ 'use client';
2
+
3
+ import { motion } from 'framer-motion';
4
+ import { Truck, ShieldCheck, Recycle } from 'lucide-react';
5
+
6
+ const features = [
7
+ { icon: Truck, title: 'Free carbon-neutral shipping', body: 'On every order above $80.' },
8
+ { icon: ShieldCheck, title: 'Five year warranty', body: 'Repairs handled in-house, forever.' },
9
+ { icon: Recycle, title: 'Circular by design', body: 'Send it back and we rebuild it.' },
10
+ ];
11
+
12
+ export function Features() {
13
+ return (
14
+ <section className="bg-slate-50 px-6 py-20">
15
+ <div className="mx-auto grid max-w-5xl gap-10 md:grid-cols-3">
16
+ {features.map((feature) => (
17
+ <motion.div
18
+ key={feature.title}
19
+ initial={{ opacity: 0, y: 12 }}
20
+ whileInView={{ opacity: 1, y: 0 }}
21
+ className="flex flex-col gap-3"
22
+ >
23
+ <feature.icon className="size-6 text-slate-900" aria-hidden="true" />
24
+ <h3 className="text-base font-semibold">{feature.title}</h3>
25
+ <p className="text-sm text-slate-600">{feature.body}</p>
26
+ </motion.div>
27
+ ))}
28
+ </div>
29
+ </section>
30
+ );
31
+ }