@adlas/create-app 1.0.47 → 1.0.48

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adlas/create-app",
3
- "version": "1.0.47",
3
+ "version": "1.0.48",
4
4
  "description": "Adlas project initializer with Figma and Swagger integration",
5
5
  "type": "module",
6
6
  "main": "./dist/cli.js",
@@ -1,5 +1,24 @@
1
1
  // hero.ts
2
- import { heroui } from "@heroui/react";
2
+ import { heroui } from '@heroui/react';
3
3
  // or import from theme package if you are using individual packages.
4
4
  // import { heroui } from "@heroui/theme";
5
- export default heroui();
5
+ export default heroui({
6
+ themes: {
7
+ extend: {
8
+ colors: {
9
+ primary: {
10
+ 50: '',
11
+ 100: '',
12
+ 200: '',
13
+ 300: '',
14
+ 400: '',
15
+ 500: '',
16
+ 600: '',
17
+ 700: '',
18
+ 800: '',
19
+ 900: '',
20
+ },
21
+ },
22
+ },
23
+ },
24
+ });
@@ -10,10 +10,93 @@ This document provides comprehensive guidelines for converting Figma designs to
10
10
  2. **Use ONLY existing components** - Never create custom implementations when project components exist
11
11
  3. **i18n for ALL text** - ALL labels, placeholders, titles, error messages MUST use translation keys
12
12
  4. **Navigation from config** - NEVER hardcode URLs. Always use `NAVIGATION_URLS` from config
13
- 5. **HeroUI icons only** - Use icons from HeroUI Figma Kit: https://www.figma.com/design/kFGcjHsNKZx7zh2NxEJXYt/HeroUI-Figma-Kit--Community---Community-?node-id=10-1849
14
- 6. **Follow project structure** - Place files in correct locations as defined below
15
- 7. **Match coding patterns** - Use the same patterns found in existing code
16
- 8. **Type safety first** - Use TypeScript strictly, no `any` types
13
+ 5. **Icons workflow** - Export SVG from Figma Place in `src/assets/icons/` → Run `pnpm generate-icons` → Use generated TSX components
14
+ 6. **Logos workflow** - Export SVG/PNG from Figma → Place in `public/` Reference via path (prefer SVG over PNG)
15
+ 7. **Use Tailwind standard classes** - Use closest Tailwind class instead of custom values (e.g., `h-10` not `h-[41px]`)
16
+ 8. **Follow project structure** - Place files in correct locations as defined below
17
+ 9. **Match coding patterns** - Use the same patterns found in existing code
18
+ 10. **Type safety first** - Use TypeScript strictly, no `any` types
19
+
20
+ ---
21
+
22
+ ## 🎨 Component Configuration & Customization
23
+
24
+ ### CRITICAL: Component Styles Must Be Configured, Not Inline
25
+
26
+ **❌ WRONG - Inline custom styles**:
27
+ ```tsx
28
+ // Don't apply component-specific styles inline
29
+ <Button className="h-10 rounded-full bg-[#19ffa3] px-4 text-sm text-black">
30
+ Click Me
31
+ </Button>
32
+
33
+ // Don't use HTML elements when HeroUI component exists
34
+ <button onClick={handler}>Click</button>
35
+ ```
36
+
37
+ **✅ CORRECT - Configure in component wrapper or use variants**:
38
+ ```tsx
39
+ // Option 1: If this is a reusable button style, extend Button component
40
+ // File: src/components/ui/Button.tsx
41
+ import { extendVariants, Button as HeroUIButton } from '@heroui/react';
42
+
43
+ export const Button = extendVariants(HeroUIButton, {
44
+ variants: {
45
+ color: {
46
+ primary: 'bg-[#19ffa3] text-black hover:bg-[#00e68a]',
47
+ },
48
+ size: {
49
+ md: 'h-10 px-4 text-sm',
50
+ },
51
+ },
52
+ });
53
+
54
+ // Usage in code:
55
+ <Button color="primary" size="md" radius="full">
56
+ Click Me
57
+ </Button>
58
+
59
+ // Option 2: For one-off usage, use HeroUI Button with minimal custom classes
60
+ import { Button } from '@/components/ui';
61
+ <Button color="primary" radius="full">Click Me</Button>
62
+ ```
63
+
64
+ **When to configure vs use inline**:
65
+ - ✅ Configure: Repeated styles, component variants, brand colors
66
+ - ✅ Inline: Layout utilities only (`mt-4`, `hidden`, `lg:block`)
67
+ - ❌ Never inline: Component-specific styles (heights, colors, padding, text sizes)
68
+
69
+ ### Data Must Be Mapped from Constants
70
+
71
+ **❌ WRONG - Hardcoded data**:
72
+ ```tsx
73
+ <DropdownMenu>
74
+ <DropdownItem key="option1">Option 1</DropdownItem>
75
+ <DropdownItem key="option2">Option 2</DropdownItem>
76
+ <DropdownItem key="option3">Option 3</DropdownItem>
77
+ </DropdownMenu>
78
+ ```
79
+
80
+ **✅ CORRECT - Map from constants**:
81
+ ```tsx
82
+ // File: src/config/menuOptions.ts
83
+ export const productMenuItems = [
84
+ { key: 'analytics', labelKey: 'product.analytics', href: '/analytics' },
85
+ { key: 'insights', labelKey: 'product.insights', href: '/insights' },
86
+ { key: 'reports', labelKey: 'product.reports', href: '/reports' },
87
+ ];
88
+
89
+ // Usage:
90
+ import { productMenuItems } from '@/config/menuOptions';
91
+
92
+ <DropdownMenu>
93
+ {productMenuItems.map((item) => (
94
+ <DropdownItem key={item.key} href={item.href}>
95
+ {t(item.labelKey)}
96
+ </DropdownItem>
97
+ ))}
98
+ </DropdownMenu>
99
+ ```
17
100
 
18
101
  ---
19
102
 
@@ -214,27 +297,253 @@ import { Modal, Chip, Breadcrumbs, Tabs, Icon } from '@/components/ui';
214
297
 
215
298
  ### Icons
216
299
 
217
- **IMPORTANT**: ALL icons MUST come from HeroUI Figma Kit
218
- - **Figma Source**: https://www.figma.com/design/kFGcjHsNKZx7zh2NxEJXYt/HeroUI-Figma-Kit--Community---Community-?node-id=10-1849
219
- - **Available in project**: ChevronDown, ChevronRight, Close, Eye, EyeSlash
300
+ **CRITICAL WORKFLOW**: Icons must follow this exact process:
220
301
 
302
+ #### Step 1: Export SVG from Figma
303
+ 1. Select the icon in Figma design
304
+ 2. Export as SVG (not PNG/JPG)
305
+ 3. Download the SVG file
306
+
307
+ #### Step 2: Place in Icons Folder
308
+ ```bash
309
+ # Place SVG file in src/assets/icons/
310
+ mv downloaded-icon.svg src/assets/icons/icon-name.svg
311
+ ```
312
+
313
+ #### Step 3: Generate React Components
314
+ ```bash
315
+ # Run the icon generation script
316
+ pnpm generate-icons
317
+ ```
318
+
319
+ This command will:
320
+ - Convert all SVG files in `src/assets/icons/` to React components
321
+ - Place them in `src/components/icons/`
322
+ - Auto-format and lint the generated code
323
+ - Update `src/components/icons/index.ts` with exports
324
+
325
+ #### Step 4: Use in Code
221
326
  ```tsx
222
- import { ChevronDownIcon, ChevronRightIcon, CloseIcon, EyeIcon, EyeSlashIcon } from '@/components/icons';
327
+ import { IconNameIcon, ChevronDownIcon } from '@/components/icons';
328
+
329
+ <ChevronDownIcon className="size-5 text-white" />
330
+ <IconNameIcon className="size-4" />
331
+ ```
332
+
333
+ **Available Icons** (auto-generated):
334
+ - ChevronDownIcon, ChevronRightIcon
335
+ - CloseIcon, MenuIcon
336
+ - EyeIcon, EyeSlashIcon
337
+ - AddIcon, AddCircleIcon
338
+ - ArrowUpIcon, ArrowCircleDownIcon
339
+ - DotsVerticalIcon, FrameIcon
340
+ - And more...
341
+
342
+ **❌ DO NOT**:
343
+ - Use Lucide, Font Awesome, or other icon libraries
344
+ - Create manual icon components
345
+ - Use `<img>` tags for icons
346
+ - Hardcode SVG paths directly in components
347
+
348
+ **✅ DO**:
349
+ - Always export from Figma as SVG
350
+ - Use `pnpm generate-icons` to create components
351
+ - Import from `@/components/icons`
352
+ - Use Tailwind classes for sizing (`size-4`, `size-5`, `size-6`)
353
+
354
+ ### Logos & Images
355
+
356
+ **CRITICAL WORKFLOW**: Logos and images must be placed in `public/` directory:
357
+
358
+ #### Step 1: Export from Figma
359
+ 1. **For logos**: Export as SVG (preferred) or PNG if source is raster
360
+ 2. **For images**: Export as PNG, JPG, or WebP based on image type
361
+ 3. Use appropriate resolution (2x or 3x for retina displays)
362
+
363
+ #### Step 2: Place in Public Folder
364
+ ```bash
365
+ # Place logo/image files in public/
366
+ public/
367
+ ├── logo.svg # Main logo (SVG preferred)
368
+ ├── logo-dark.svg # Dark mode logo
369
+ ├── logo.png # Fallback PNG
370
+ ├── favicon.ico
371
+ └── images/
372
+ ├── hero-bg.jpg
373
+ └── product-1.png
374
+ ```
223
375
 
224
- <ChevronDownIcon className="h-4 w-4" />
376
+ #### Step 3: Create Centralized Image Constants
377
+
378
+ **CRITICAL**: Create a centralized constants file for all image paths:
379
+
380
+ ```typescript
381
+ // src/config/images.ts
382
+
383
+ /**
384
+ * Centralized image path constants
385
+ * Organize by category: LOGOS, AUTH, WEBSITE, SERVICES, etc.
386
+ */
387
+
388
+ const LOGOS = {
389
+ PRIMARY_CIRCLE: '/images/logos/logo-circle-primary.svg',
390
+ SECONDARY_CIRCLE: '/images/logos/logo-circle-secondary.svg',
391
+ FULL: '/images/logos/logo-full.svg',
392
+ FULL_BLACK: '/images/logos/logo-full-black.svg',
393
+ FULL_WHITE: '/images/logos/logo-full-white.svg',
394
+ ICON: '/images/logos/logo-icon.svg',
395
+ } as const;
396
+
397
+ const AUTH = {
398
+ LOGIN_BG: '/images/auth/login-background.jpg',
399
+ SIGNUP_BG: '/images/auth/signup-background.jpg',
400
+ RESET_PASSWORD: '/images/auth/reset-password.jpg',
401
+ } as const;
402
+
403
+ const WEBSITE = {
404
+ HOME_HERO: '/images/website/home-hero.webp',
405
+ HOME_NEWSLETTER: '/images/website/home-newsletter.webp',
406
+ ABOUT_HEADER: '/images/website/about-header.jpg',
407
+ CONTACT_MAP: '/images/website/contact-map.png',
408
+ } as const;
409
+
410
+ const SERVICES = {
411
+ HEADER: '/images/services/services-header.webp',
412
+ FEATURE_1: '/images/services/feature-1.jpg',
413
+ FEATURE_2: '/images/services/feature-2.jpg',
414
+ } as const;
415
+
416
+ const PRODUCTS = {
417
+ THUMBNAIL_DEFAULT: '/images/products/thumbnail-default.png',
418
+ HERO: '/images/products/hero-banner.jpg',
419
+ } as const;
420
+
421
+ export const IMAGES = {
422
+ LOGOS,
423
+ AUTH,
424
+ WEBSITE,
425
+ SERVICES,
426
+ PRODUCTS,
427
+ } as const;
225
428
  ```
226
429
 
227
- **For icons not yet in project**:
228
- 1. Find the icon in HeroUI Figma Kit
229
- 2. Create a new icon component in `src/components/icons/` following the existing pattern
230
- 3. Export it from `src/components/icons/index.ts`
430
+ #### Step 4: Reference in Code
431
+
432
+ ```tsx
433
+ // Import from centralized constants
434
+ import { IMAGES } from '@/config/images';
435
+ import Image from 'next/image';
436
+
437
+ // Using Next.js Image component (recommended)
438
+ <Image
439
+ src={IMAGES.LOGOS.FULL}
440
+ alt="Company Logo"
441
+ width={120}
442
+ height={40}
443
+ priority
444
+ />
445
+
446
+ // Using standard img tag (for SVGs with CSS control)
447
+ <img src={IMAGES.LOGOS.PRIMARY_CIRCLE} alt="Logo" className="h-10 w-auto" />
231
448
 
232
- **DO NOT use Lucide, Font Awesome, or other icon libraries**
449
+ // Background images via Tailwind
450
+ <div className={`bg-[url('${IMAGES.WEBSITE.HOME_HERO}')] bg-cover bg-center`}>
451
+
452
+ // In authentication pages
453
+ <Image
454
+ src={IMAGES.AUTH.LOGIN_BG}
455
+ alt="Login background"
456
+ fill
457
+ className="object-cover"
458
+ />
459
+ ```
460
+
461
+ **Preference Order**:
462
+ 1. ✅ **SVG** - Best for logos, icons, and vector graphics (scalable, small file size)
463
+ 2. ✅ **WebP** - Modern format for photos (smaller than PNG/JPG)
464
+ 3. ✅ **PNG** - For images requiring transparency
465
+ 4. ✅ **JPG** - For photos without transparency
466
+
467
+ **❌ DO NOT**:
468
+ - Put images in `src/` folder
469
+ - Import images as modules unless necessary
470
+ - Use base64 encoded images inline
471
+ - Forget to optimize images before adding
472
+ - Hardcode image paths directly in components (use centralized constants)
473
+
474
+ **✅ DO**:
475
+ - Always place in `public/` directory
476
+ - Create centralized image constants file (src/config/images.ts)
477
+ - Organize image paths by category (LOGOS, AUTH, WEBSITE, SERVICES)
478
+ - Use `as const` for type safety
479
+ - Import from `@/config/images` in components
480
+ - Prefer SVG for logos and icons
481
+ - Optimize images before adding (use tools like ImageOptim, Squoosh)
482
+ - Use Next.js `<Image>` component for automatic optimization
233
483
 
234
484
  ---
235
485
 
236
486
  ## 🎨 Tailwind CSS Guidelines
237
487
 
488
+ ### Using Standard Tailwind Classes
489
+
490
+ **CRITICAL**: Always use closest standard Tailwind class instead of custom arbitrary values
491
+
492
+ **Common Conversions**:
493
+ ```tsx
494
+ // ❌ WRONG - Custom arbitrary values
495
+ className="h-[41px] w-[54.6px]"
496
+ className="p-[24px]"
497
+ className="text-[14px]"
498
+ className="gap-[11px]"
499
+
500
+ // ✅ CORRECT - Standard Tailwind classes
501
+ className="h-10 w-14" // h-10 = 40px, w-14 = 56px (closest to 54.6px)
502
+ className="p-6" // p-6 = 24px
503
+ className="text-sm" // text-sm = 14px
504
+ className="gap-3" // gap-3 = 12px (closest to 11px)
505
+ ```
506
+
507
+ **Tailwind Size Reference**:
508
+ ```css
509
+ /* Spacing Scale (padding, margin, gap, etc.) */
510
+ 0.5 = 2px 4 = 16px 12 = 48px
511
+ 1 = 4px 5 = 20px 14 = 56px
512
+ 2 = 8px 6 = 24px 16 = 64px
513
+ 3 = 12px 8 = 32px 20 = 80px
514
+ 3.5 = 14px 10 = 40px 24 = 96px
515
+
516
+ /* Font Sizes */
517
+ xs = 12px (0.75rem)
518
+ sm = 14px (0.875rem)
519
+ base = 16px (1rem)
520
+ lg = 18px (1.125rem)
521
+ xl = 20px (1.25rem)
522
+ 2xl = 24px (1.5rem)
523
+ 3xl = 30px (1.875rem)
524
+
525
+ /* Width/Height */
526
+ auto, full, screen, fit, min, max
527
+ 4-96 (in increments of 4px)
528
+ ```
529
+
530
+ **Only use arbitrary values when**:
531
+ - Exact pixel value is required by design system
532
+ - No standard Tailwind class is close enough
533
+ - Using design tokens/CSS variables: `bg-[var(--custom-color)]`
534
+
535
+ **Examples**:
536
+ ```tsx
537
+ // ✅ Good - Using standard classes
538
+ <div className="h-10 w-full p-6 text-sm">
539
+
540
+ // ✅ Acceptable - Design tokens
541
+ <div className="bg-[var(--colors/primary)] text-[#19ffa3]">
542
+
543
+ // ❌ Bad - Should use standard classes
544
+ <div className="h-[40px] w-[100%] p-[24px] text-[14px]">
545
+ ```
546
+
238
547
  ### Responsive Breakpoints (Mobile-First)
239
548
  ```css
240
549
  /* Mobile */
@@ -364,15 +673,51 @@ export default function LoginForm() {
364
673
  **CRITICAL**: ALL text content MUST use i18n translation keys
365
674
 
366
675
  ### Navigation with i18n
676
+
677
+ **Import Guidelines**:
678
+ ```tsx
679
+ // For Link component - use Next.js Link
680
+ import Link from 'next/link';
681
+
682
+ // For navigation hooks - use next/navigation
683
+ import { usePathname, useRouter } from 'next/navigation';
684
+
685
+ // For navigation URLs - use centralized constants
686
+ import { NAVIGATION_URLS } from '@/config/navigationUrls';
687
+ ```
688
+
689
+ **Navigation Example**:
367
690
  ```tsx
368
- import { Link } from '@/libs/I18nNavigation';
691
+ import Link from 'next/link';
369
692
  import { NAVIGATION_URLS } from '@/config/navigationUrls';
370
693
 
371
- // ✅ CORRECT - Using NAVIGATION_URLS
694
+ // ✅ CORRECT - Using Next.js Link with NAVIGATION_URLS
372
695
  <Link href={NAVIGATION_URLS.ABOUT}>About</Link>
373
696
 
374
697
  // ❌ WRONG - Hardcoded URL
375
698
  <Link href="/about">About</Link>
699
+
700
+ // ❌ WRONG - Using HeroUI Link for internal navigation
701
+ import { Link } from '@heroui/react';
702
+ <Link href={NAVIGATION_URLS.ABOUT}>About</Link>
703
+ ```
704
+
705
+ **Using Navigation Hooks**:
706
+ ```tsx
707
+ 'use client';
708
+
709
+ import { usePathname, useRouter } from 'next/navigation';
710
+
711
+ export function MyComponent() {
712
+ const pathname = usePathname();
713
+ const router = useRouter();
714
+
715
+ const handleNavigation = () => {
716
+ router.push(NAVIGATION_URLS.DASHBOARD.INDEX);
717
+ };
718
+
719
+ return <button onClick={handleNavigation}>Go to Dashboard</button>;
720
+ }
376
721
  ```
377
722
 
378
723
  ### Translations for ALL text
@@ -517,30 +862,51 @@ import { Footer, Navbar } from '@/components/layout';
517
862
  ## ⚠️ CRITICAL RULES
518
863
 
519
864
  ### ❌ DO NOT
520
- 1. ❌ Use non-HeroUI icons (Lucide, Font Awesome, etc.) - ONLY use HeroUI Figma Kit icons
521
- 2. ❌ Hardcode ANY text - ALL text MUST use i18n translation keys
522
- 3. ❌ Hardcode URLs - ALWAYS use `NAVIGATION_URLS` from config
523
- 4. ❌ Create custom components when HeroUI provides them - check HeroUI first, then project components
524
- 5. ❌ Use CSS modules or styled-components - ONLY Tailwind CSS
525
- 6. ❌ Import from `@heroui/react` directly (use `@/components/ui` wrappers)
526
- 7. ❌ Create duplicate utility functions (check `src/utils/helpers.ts` first)
527
- 8. ❌ Use `any` type in TypeScript
528
- 9. ❌ Ignore responsive design (always implement mobile-first)
529
- 10. ❌ Skip form validation (always use Zod schemas)
865
+ 1. ❌ **Icons**: Create manual icon components - MUST use `pnpm generate-icons` workflow
866
+ 2. ❌ **Icons**: Use non-project icons (Lucide, Font Awesome, etc.)
867
+ 3. ❌ **Logos**: Put logos/images in `src/` folder - MUST go in `public/`
868
+ 4. ❌ **Logos**: Import images as modules unless necessary
869
+ 5. ❌ **Logos**: Hardcode image paths in components - MUST use centralized constants from `@/config/images`
870
+ 6. ❌ **Tailwind**: Use arbitrary values when standard classes exist (e.g., `h-[40px]` use `h-10`)
871
+ 7. ❌ **Tailwind**: Use custom values like `w-[100%]` (use `w-full`)
872
+ 8. ❌ **Text**: Hardcode ANY text - ALL text MUST use i18n translation keys
873
+ 9. ❌ **URLs**: Hardcode URLs - ALWAYS use `NAVIGATION_URLS` from config
874
+ 10. ❌ **Data**: Hardcode menu items, dropdown options - MUST map from constants
875
+ 11. ❌ **Components**: Create custom components when HeroUI provides them
876
+ 12. ❌ **Components**: Use HTML elements when HeroUI component exists (e.g., `<button>` → use HeroUI `<Button>`)
877
+ 13. ❌ **Styling**: Apply component styles inline - MUST configure in component wrapper or theme
878
+ 14. ❌ **Styling**: Use CSS modules or styled-components - ONLY Tailwind CSS
879
+ 15. ❌ **Imports**: Import from `@heroui/react` directly (use `@/components/ui` wrappers)
880
+ 16. ❌ **Navigation**: Use HeroUI `Link` for internal navigation (use Next.js `Link` from `next/link`)
881
+ 17. ❌ **Navigation**: Import `usePathname`, `useRouter` from wrong source (MUST use `next/navigation`)
882
+ 18. ❌ **TypeScript**: Use `any` type
883
+ 19. ❌ **Design**: Ignore responsive design (always implement mobile-first)
884
+ 20. ❌ **Forms**: Skip form validation (always use Zod schemas)
530
885
 
531
886
  ### ✅ DO
532
- 1. ✅ Use HeroUI components first (check HeroUI library before creating custom components)
533
- 2. ✅ Use icons ONLY from HeroUI Figma Kit
534
- 3. ✅ Use i18n translation keys for ALL text (labels, placeholders, titles, errors, etc.)
535
- 4. ✅ Use `NAVIGATION_URLS` for ALL navigation links
536
- 5. ✅ Use existing UI components from `src/components/ui/`
537
- 6. ✅ Use Tailwind CSS ONLY for styling (no CSS modules, no styled-components)
538
- 7. ✅ Implement TypeScript strictly with proper types
539
- 8. ✅ Use `'use client'` directive for interactive components
540
- 9. ✅ Follow mobile-first responsive design
541
- 10. ✅ Use semantic color classes from HeroUI theme
542
- 11. ✅ Implement proper loading and error states
543
- 12. ✅ Follow existing code patterns and naming conventions
887
+ 1. ✅ **Icons**: Export SVG from Figma `src/assets/icons/` Run `pnpm generate-icons`
888
+ 2. ✅ **Icons**: Import from `@/components/icons` (auto-generated components)
889
+ 3. ✅ **Logos**: Export SVG/PNG from Figma Place in `public/images/` with organized folders
890
+ 4. ✅ **Logos**: Create centralized constants file `src/config/images.ts` with LOGOS, AUTH, WEBSITE, etc.
891
+ 5. ✅ **Logos**: Import from `@/config/images` and use `IMAGES.LOGOS.PRIMARY`
892
+ 6. ✅ **Logos**: Prefer SVG over PNG when source is vector
893
+ 7. ✅ **Tailwind**: Use standard classes (`h-10`, `p-6`, `text-sm` instead of arbitrary values)
894
+ 8. ✅ **Tailwind**: Use size utilities (`size-4`, `size-5`) for icons
895
+ 9. ✅ **Navigation**: Use Next.js `Link` from `next/link` for internal navigation
896
+ 10. ✅ **Navigation**: Import `usePathname`, `useRouter` from `next/navigation`
897
+ 11. ✅ **Text**: Use i18n translation keys for ALL text (`t('key')`)
898
+ 12. ✅ **URLs**: Use `NAVIGATION_URLS` for ALL navigation links
899
+ 13. ✅ **Data**: Map menu items, dropdown options from constants (never hardcode)
900
+ 14. ✅ **Components**: Use HeroUI components first (check library before custom)
901
+ 15. ✅ **Components**: Use existing wrappers from `src/components/ui/` (e.g., `<Button>` not `<button>`)
902
+ 16. ✅ **Components**: Configure styles in component wrappers, not inline
903
+ 17. ✅ **Styling**: Use Tailwind CSS ONLY (utility classes)
904
+ 18. ✅ **TypeScript**: Implement strict typing with proper types
905
+ 19. ✅ **React**: Use `'use client'` directive for interactive components
906
+ 20. ✅ **Design**: Follow mobile-first responsive design
907
+ 21. ✅ **Colors**: Use semantic color classes from HeroUI theme
908
+ 22. ✅ **States**: Implement proper loading and error states
909
+ 23. ✅ **Patterns**: Follow existing code patterns and naming conventions
544
910
 
545
911
  ---
546
912
 
@@ -548,12 +914,27 @@ import { Footer, Navbar } from '@/components/layout';
548
914
 
549
915
  When converting Figma to code, ensure:
550
916
 
917
+ ### Icons & Assets
918
+ - [ ] Exported icons as SVG from Figma
919
+ - [ ] Placed SVG files in `src/assets/icons/`
920
+ - [ ] Ran `pnpm generate-icons` to create React components
921
+ - [ ] Imported icons from `@/components/icons`
922
+ - [ ] Exported logos/images as SVG (preferred) or PNG
923
+ - [ ] Placed logos/images in `public/images/` with organized folders (logos/, auth/, website/, services/)
924
+ - [ ] Created centralized constants file `src/config/images.ts`
925
+ - [ ] Organized image paths by category (LOGOS, AUTH, WEBSITE, SERVICES, PRODUCTS)
926
+ - [ ] Used `as const` for type safety
927
+ - [ ] Referenced via `IMAGES.LOGOS.PRIMARY` (not hardcoded paths)
928
+
551
929
  ### Component & Styling
552
930
  - [ ] Checked HeroUI library first for component availability
553
- - [ ] Used HeroUI components via `src/components/ui/` wrappers
554
- - [ ] Used ONLY HeroUI Figma Kit icons (no Lucide, Font Awesome, etc.)
931
+ - [ ] Used HeroUI components via `src/components/ui/` wrappers (e.g., `<Button>` not `<button>`)
932
+ - [ ] Configured component styles in wrapper/theme (not inline)
933
+ - [ ] Used only layout utilities inline (`mt-4`, `hidden`, `lg:block`)
555
934
  - [ ] Applied Tailwind CSS classes only (no custom CSS, no CSS modules)
935
+ - [ ] Used standard Tailwind classes instead of arbitrary values (e.g., `h-10` not `h-[40px]`)
556
936
  - [ ] Followed HeroUI theme colors (bg-background, bg-primary, etc.)
937
+ - [ ] Mapped all data from constants (no hardcoded menu items/dropdowns)
557
938
 
558
939
  ### Content & Navigation
559
940
  - [ ] ALL text uses i18n translation keys (no hardcoded text)
@@ -587,11 +968,20 @@ When converting Figma to code, ensure:
587
968
 
588
969
  Before finalizing code, verify:
589
970
 
590
- ### Icons & Components
591
- 1. **Icons from HeroUI only** - Check all icons come from HeroUI Figma Kit
592
- 2. **HeroUI components first** - Verify HeroUI library was checked before custom implementation
593
- 3. **No direct HeroUI imports** - Only through `@/components/ui`
594
- 4. **Component reuse** - Don't duplicate existing components
971
+ ### Icons & Assets
972
+ 1. **Icons workflow** - All icons created via `pnpm generate-icons` (not manual)
973
+ 2. **Icons source** - SVG files exist in `src/assets/icons/`
974
+ 3. **Logos location** - All logos/images in `public/` directory (not `src/`)
975
+ 4. **Image format** - SVG used for logos when possible (not PNG)
976
+
977
+ ### Components & Styling
978
+ 1. **HeroUI components first** - Verify HeroUI library was checked before custom implementation
979
+ 2. **No direct HeroUI imports** - Only through `@/components/ui`
980
+ 3. **Component reuse** - Don't duplicate existing components
981
+ 4. **Use HeroUI components** - No HTML elements when HeroUI component exists (e.g., use `<Button>` not `<button>`)
982
+ 5. **Configure, don't inline** - Component styles in wrapper/theme, not inline classNames
983
+ 6. **Standard Tailwind classes** - No arbitrary values when standard class exists (e.g., `h-10` not `h-[40px]`)
984
+ 7. **Map from constants** - All menu items, dropdown options mapped from config files
595
985
 
596
986
  ### i18n & Navigation
597
987
  5. **Zero hardcoded text** - ALL text uses `t('key')`
@@ -621,4 +1011,109 @@ When in doubt, check these example files:
621
1011
 
622
1012
  ---
623
1013
 
1014
+ ## 🚀 Quick Reference Guide
1015
+
1016
+ ### Icons Workflow
1017
+ ```bash
1018
+ # 1. Export SVG from Figma
1019
+ # 2. Place in folder
1020
+ mv icon.svg src/assets/icons/
1021
+
1022
+ # 3. Generate components
1023
+ pnpm generate-icons
1024
+
1025
+ # 4. Use in code
1026
+ import { IconIcon } from '@/components/icons';
1027
+ <IconIcon className="size-5" />
1028
+ ```
1029
+
1030
+ ### Logos/Images Workflow
1031
+ ```bash
1032
+ # 1. Export SVG/PNG from Figma
1033
+ # 2. Place in public with organized folders
1034
+ mv logo.svg public/images/logos/
1035
+
1036
+ # 3. Create centralized constants file
1037
+ # src/config/images.ts
1038
+ const LOGOS = {
1039
+ PRIMARY: '/images/logos/logo-primary.svg',
1040
+ ICON: '/images/logos/logo-icon.svg',
1041
+ } as const;
1042
+
1043
+ const WEBSITE = {
1044
+ HOME_HERO: '/images/website/home-hero.webp',
1045
+ } as const;
1046
+
1047
+ export const IMAGES = {
1048
+ LOGOS,
1049
+ WEBSITE,
1050
+ } as const;
1051
+
1052
+ # 4. Use in code
1053
+ import { IMAGES } from '@/config/images';
1054
+ <img src={IMAGES.LOGOS.PRIMARY} alt="Logo" className="h-10 w-auto" />
1055
+ # OR
1056
+ <Image src={IMAGES.LOGOS.PRIMARY} alt="Logo" width={120} height={40} />
1057
+ ```
1058
+
1059
+ ### Tailwind Standard Classes
1060
+ ```tsx
1061
+ // Heights/Widths
1062
+ h-10 = 40px w-14 = 56px size-5 = 20px
1063
+ h-12 = 48px w-20 = 80px size-6 = 24px
1064
+
1065
+ // Spacing
1066
+ p-6 = 24px gap-3 = 12px m-4 = 16px
1067
+ p-8 = 32px gap-4 = 16px m-8 = 32px
1068
+
1069
+ // Text
1070
+ text-sm = 14px text-xl = 20px
1071
+ text-base = 16px text-2xl = 24px
1072
+ text-lg = 18px text-3xl = 30px
1073
+
1074
+ // Use standard class if within 2-4px of target
1075
+ // Only use arbitrary [value] for design tokens
1076
+ ```
1077
+
1078
+ ### Common Patterns
1079
+ ```tsx
1080
+ // Icons (auto-generated)
1081
+ import { MenuIcon, CloseIcon } from '@/components/icons';
1082
+ <MenuIcon className="size-6 text-white" />
1083
+
1084
+ // Logos (centralized constants)
1085
+ import { IMAGES } from '@/config/images';
1086
+ <img src={IMAGES.LOGOS.PRIMARY} alt="Logo" className="h-10 w-auto" />
1087
+
1088
+ // Navigation (Next.js Link + constants)
1089
+ import Link from 'next/link';
1090
+ import { NAVIGATION_URLS } from '@/config/navigationUrls';
1091
+ <Link href={NAVIGATION_URLS.ABOUT}>{t('about')}</Link>
1092
+
1093
+ // Navigation hooks (from next/navigation)
1094
+ import { usePathname, useRouter } from 'next/navigation';
1095
+ const pathname = usePathname();
1096
+ const router = useRouter();
1097
+
1098
+ // Translation (all text)
1099
+ const t = useTranslations('namespace');
1100
+ <h1>{t('title')}</h1>
1101
+
1102
+ // Components (use HeroUI, not HTML)
1103
+ import { Button } from '@/components/ui';
1104
+ <Button color="primary">Click</Button> // ✅
1105
+ <button>Click</button> // ❌
1106
+
1107
+ // Data mapping (from constants)
1108
+ const menuItems = [
1109
+ { key: 'home', labelKey: 'home', href: NAVIGATION_URLS.ROOT },
1110
+ ];
1111
+ {menuItems.map(item => <Item key={item.key}>{t(item.labelKey)}</Item>)}
1112
+
1113
+ // Responsive (mobile-first)
1114
+ <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3">
1115
+ ```
1116
+
1117
+ ---
1118
+
624
1119
  **Remember**: This project has a well-defined structure and component library. Your job is to use them correctly, not to reinvent them. Stay within the boundaries of the existing architecture.
@@ -51,7 +51,7 @@ cli-tool/
51
51
  │ │ ├── next.config.ts
52
52
  │ │ ├── tsconfig.json
53
53
  │ │ └── ... (other config files)
54
- │ └── docs/ # Documentation (CURRENTLY EMPTY)
54
+ │ └── docs/ # Documentation templates
55
55
  ├── package.json
56
56
  ├── tsconfig.json
57
57
  └── README.md
@@ -290,7 +290,14 @@ pnpm build
290
290
 
291
291
  ## Project History (Recent Changes)
292
292
 
293
- ### v1.0.41 (Latest)
293
+ ### v1.0.47 (Latest)
294
+ - **Removed documentation files from init**: No longer generates ARCHITECTURE_PATTERNS.md, AI_QUICK_REFERENCE.md, UI_COMPONENTS_GUIDE.md, IMPLEMENTATION_GUIDE.md
295
+ - **Simplified documentation**: Projects now only get PROJECT_OVERVIEW.md, FIGMA_TO_CODE_GUIDE.md, and DOCUMENTATION_INDEX.md
296
+ - **Updated FIGMA_TO_CODE_GUIDE.md**: Added comprehensive guidelines for icons, logos, images, Tailwind classes, component configuration, and data mapping
297
+ - **Updated update command**: Only updates FIGMA_TO_CODE_GUIDE.md (removed other docs from update list)
298
+ - **Updated project detection**: Changed from checking ARCHITECTURE_PATTERNS.md to PROJECT_OVERVIEW.md
299
+
300
+ ### v1.0.41
294
301
  - **CRITICAL FIX**: Fixed import spacing in generated `next.config.ts`
295
302
  - **CRITICAL FIX**: Fixed `import type` usage in generated `next-pwa.d.ts`
296
303
  - Generated projects now pass `pnpm lint` and `pnpm check:types` without errors
@@ -448,5 +455,5 @@ This series of releases focused on ensuring generated projects pass all quality
448
455
 
449
456
  ---
450
457
 
451
- **Last Updated**: December 23, 2025 (v1.0.41)
458
+ **Last Updated**: December 24, 2025 (v1.0.47)
452
459
  **Documentation Created For**: Claude AI continuation in different account