@adlas/create-app 1.0.44 → 1.0.46

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.44",
3
+ "version": "1.0.46",
4
4
  "description": "Adlas project initializer with Figma and Swagger integration",
5
5
  "type": "module",
6
6
  "main": "./dist/cli.js",
@@ -6,11 +6,52 @@ This document provides comprehensive guidelines for converting Figma designs to
6
6
 
7
7
  ## 🎯 Core Principles
8
8
 
9
- 1. **Use ONLY existing components** - Never create custom implementations when project components exist
10
- 2. **Follow project structure** - Place files in correct locations as defined below
11
- 3. **Match coding patterns** - Use the same patterns found in existing code
12
- 4. **Maintain consistency** - Follow naming conventions and code style
13
- 5. **Type safety first** - Use TypeScript strictly, no `any` types
9
+ 1. **Use HeroUI components first** - Always prefer HeroUI components. Only use Tailwind CSS for custom styling when HeroUI doesn't provide the component
10
+ 2. **Use ONLY existing components** - Never create custom implementations when project components exist
11
+ 3. **i18n for ALL text** - ALL labels, placeholders, titles, error messages MUST use translation keys
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
17
+
18
+ ---
19
+
20
+ ## 🎨 Component Priority & Usage Strategy
21
+
22
+ ### 1. Check HeroUI First
23
+ Before creating ANY component, check if HeroUI provides it:
24
+ - **HeroUI Documentation**: https://heroui.com/docs/components
25
+ - **HeroUI Figma Kit**: https://www.figma.com/design/kFGcjHsNKZx7zh2NxEJXYt/HeroUI-Figma-Kit--Community---Community-
26
+
27
+ ### 2. Component Selection Flow
28
+ ```
29
+ 1. Does HeroUI have this component?
30
+ → YES: Use HeroUI component (via @/components/ui wrapper if exists)
31
+ → NO: Go to step 2
32
+
33
+ 2. Does project have wrapper in src/components/ui/?
34
+ → YES: Use the wrapper
35
+ → NO: Go to step 3
36
+
37
+ 3. Build with Tailwind CSS utilities
38
+ → Use HeroUI theme colors and patterns
39
+ → Follow mobile-first responsive design
40
+ ```
41
+
42
+ ### 3. Example Decision Tree
43
+ ```tsx
44
+ // Need a Button?
45
+ import { Button } from '@/components/ui'; // ✅ Use HeroUI Button wrapper
46
+
47
+ // Need an Input?
48
+ import { Input } from '@/components/ui'; // ✅ Use HeroUI Input wrapper
49
+
50
+ // Need a Card?
51
+ // HeroUI has Card, but check if wrapper exists in project
52
+ // If not, use Tailwind utilities with HeroUI colors:
53
+ <div className="rounded-lg bg-white p-6 shadow-md"> // ✅ Custom with Tailwind
54
+ ```
14
55
 
15
56
  ---
16
57
 
@@ -172,18 +213,23 @@ import { Modal, Chip, Breadcrumbs, Tabs, Icon } from '@/components/ui';
172
213
  ```
173
214
 
174
215
  ### Icons
216
+
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
220
+
175
221
  ```tsx
176
222
  import { ChevronDownIcon, ChevronRightIcon, CloseIcon, EyeIcon, EyeSlashIcon } from '@/components/icons';
177
223
 
178
224
  <ChevronDownIcon className="h-4 w-4" />
179
225
  ```
180
226
 
181
- **For other icons**: Use `lucide-react` package:
182
- ```tsx
183
- import { Search, Menu, User } from 'lucide-react';
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`
184
231
 
185
- <Search className="h-5 w-5" />
186
- ```
232
+ **DO NOT use Lucide, Font Awesome, or other icon libraries**
187
233
 
188
234
  ---
189
235
 
@@ -315,30 +361,85 @@ export default function LoginForm() {
315
361
 
316
362
  ## 🌐 Internationalization (i18n)
317
363
 
318
- ### Navigation
364
+ **CRITICAL**: ALL text content MUST use i18n translation keys
365
+
366
+ ### Navigation with i18n
319
367
  ```tsx
320
368
  import { Link } from '@/libs/I18nNavigation';
369
+ import { NAVIGATION_URLS } from '@/config/navigationUrls';
370
+
371
+ // ✅ CORRECT - Using NAVIGATION_URLS
372
+ <Link href={NAVIGATION_URLS.ABOUT}>About</Link>
321
373
 
374
+ // ❌ WRONG - Hardcoded URL
322
375
  <Link href="/about">About</Link>
323
376
  ```
324
377
 
325
- ### Translations
378
+ ### Translations for ALL text
326
379
  ```tsx
327
380
  import { useTranslations } from 'next-intl';
328
381
 
329
382
  function MyComponent() {
330
383
  const t = useTranslations();
331
384
 
332
- return <h1>{t('welcome')}</h1>;
385
+ return (
386
+ <div>
387
+ {/* ✅ CORRECT - Using translation key */}
388
+ <h1>{t('welcome')}</h1>
389
+ <p>{t('description')}</p>
390
+
391
+ {/* ❌ WRONG - Hardcoded text */}
392
+ <h1>Welcome</h1>
393
+ </div>
394
+ );
395
+ }
396
+ ```
397
+
398
+ ### Form labels, placeholders, errors - ALL must use i18n
399
+ ```tsx
400
+ import { useTranslations } from 'next-intl';
401
+
402
+ function LoginForm() {
403
+ const t = useTranslations();
404
+
405
+ return (
406
+ <form>
407
+ {/* ✅ CORRECT */}
408
+ <Input
409
+ label={t('email')}
410
+ placeholder={t('enterEmail')}
411
+ errorMessage={errors.email?.message ? t(errors.email.message) : undefined}
412
+ />
413
+
414
+ {/* ❌ WRONG - Hardcoded text */}
415
+ <Input
416
+ label="Email"
417
+ placeholder="Enter your email"
418
+ errorMessage="Invalid email"
419
+ />
420
+ </form>
421
+ );
333
422
  }
334
423
  ```
335
424
 
336
- ### Navigation URLs
425
+ ### Navigation URLs Reference
337
426
  ```tsx
338
427
  import { NAVIGATION_URLS } from '@/config/navigationUrls';
339
428
 
429
+ // Available URLs (based on project type):
430
+ NAVIGATION_URLS.ROOT // '/'
431
+ NAVIGATION_URLS.ABOUT // '/about'
432
+ NAVIGATION_URLS.CONTACT // '/contact'
433
+ NAVIGATION_URLS.PRODUCTS.INDEX // '/products'
434
+ NAVIGATION_URLS.PRODUCTS.DETAIL('123') // '/products/123'
435
+ NAVIGATION_URLS.AUTH.LOGIN // '/auth/login'
436
+ NAVIGATION_URLS.DASHBOARD.INDEX // '/dashboard'
437
+
438
+ // ✅ ALWAYS use NAVIGATION_URLS
340
439
  <Link href={NAVIGATION_URLS.PRODUCTS.INDEX}>Products</Link>
341
- <Link href={NAVIGATION_URLS.PRODUCTS.DETAIL('123')}>Product Detail</Link>
440
+
441
+ // ❌ NEVER hardcode URLs
442
+ <Link href="/products">Products</Link>
342
443
  ```
343
444
 
344
445
  ---
@@ -416,24 +517,30 @@ import { Footer, Navbar } from '@/components/layout';
416
517
  ## ⚠️ CRITICAL RULES
417
518
 
418
519
  ### ❌ DO NOT
419
- 1. ❌ Create custom input components when `Input`, `Select`, etc. exist
420
- 2. ❌ Use CSS modules or styled-components
421
- 3. ❌ Import from `@heroui/react` directly (use `@/components/ui` wrappers)
422
- 4. ❌ Create duplicate utility functions (check `src/utils/helpers.ts` first)
423
- 5. ❌ Use `any` type in TypeScript
424
- 6. ❌ Hardcode URLs (use `NAVIGATION_URLS` from config)
425
- 7. ❌ Ignore responsive design (always implement mobile-first)
426
- 8. ❌ Skip form validation (always use Zod schemas)
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)
427
530
 
428
531
  ### ✅ DO
429
- 1. ✅ Use existing UI components from `src/components/ui/`
430
- 2. ✅ Follow Tailwind CSS utility-first approach
431
- 3. ✅ Implement TypeScript strictly with proper types
432
- 4. ✅ Use `'use client'` directive for interactive components
433
- 5. ✅ Follow mobile-first responsive design
434
- 6. ✅ Use semantic color classes from HeroUI theme
435
- 7. ✅ Implement proper loading and error states
436
- 8. ✅ Follow existing code patterns and naming conventions
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
437
544
 
438
545
  ---
439
546
 
@@ -441,18 +548,38 @@ import { Footer, Navbar } from '@/components/layout';
441
548
 
442
549
  When converting Figma to code, ensure:
443
550
 
551
+ ### Component & Styling
552
+ - [ ] 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.)
555
+ - [ ] Applied Tailwind CSS classes only (no custom CSS, no CSS modules)
556
+ - [ ] Followed HeroUI theme colors (bg-background, bg-primary, etc.)
557
+
558
+ ### Content & Navigation
559
+ - [ ] ALL text uses i18n translation keys (no hardcoded text)
560
+ - [ ] ALL labels use `t('labelKey')`
561
+ - [ ] ALL placeholders use `t('placeholderKey')`
562
+ - [ ] ALL error messages use `t('errorKey')`
563
+ - [ ] ALL titles and headings use `t('titleKey')`
564
+ - [ ] ALL URLs use `NAVIGATION_URLS` from config (no hardcoded URLs)
565
+
566
+ ### Structure & Types
444
567
  - [ ] Page created in correct location (`src/app/[locale]/...`)
445
- - [ ] Used existing UI components from `src/components/ui/`
446
- - [ ] Applied Tailwind CSS classes only (no custom CSS)
447
- - [ ] Implemented responsive design (mobile-first)
448
568
  - [ ] Added TypeScript types for all data structures
449
569
  - [ ] Used `'use client'` for interactive components
450
- - [ ] Implemented forms with Zod validation if needed
451
- - [ ] Used i18n for all text content
452
- - [ ] Added proper loading and error states
453
- - [ ] Followed semantic color system
454
- - [ ] Used navigation URLs from config
455
- - [ ] Tested on multiple breakpoints
570
+ - [ ] No `any` types used
571
+
572
+ ### Forms & Validation
573
+ - [ ] Implemented forms with Zod validation schemas
574
+ - [ ] Form labels use i18n
575
+ - [ ] Form placeholders use i18n
576
+ - [ ] Form errors use i18n
577
+
578
+ ### Responsive & States
579
+ - [ ] Implemented responsive design (mobile-first)
580
+ - [ ] Added proper loading states
581
+ - [ ] Added proper error states
582
+ - [ ] Tested on multiple breakpoints (mobile, tablet, desktop)
456
583
 
457
584
  ---
458
585
 
@@ -460,14 +587,26 @@ When converting Figma to code, ensure:
460
587
 
461
588
  Before finalizing code, verify:
462
589
 
463
- 1. **No direct HeroUI imports** - Only through `@/components/ui`
464
- 2. **Consistent spacing** - Use `space-y-*` and `space-x-*` utilities
465
- 3. **Proper TypeScript** - No `any`, all props typed
466
- 4. **Mobile-first** - Base styles for mobile, then `md:`, `lg:`, etc.
467
- 5. **Color usage** - Use theme colors, not arbitrary values
468
- 6. **Component reuse** - Don't duplicate existing components
469
- 7. **Form validation** - Zod schemas for all forms
470
- 8. **i18n ready** - All text uses translation keys
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
595
+
596
+ ### i18n & Navigation
597
+ 5. **Zero hardcoded text** - ALL text uses `t('key')`
598
+ 6. **Zero hardcoded URLs** - ALL links use `NAVIGATION_URLS`
599
+ 7. **Form fields i18n** - Labels, placeholders, errors all use translation keys
600
+
601
+ ### Styling & Layout
602
+ 8. **Tailwind only** - No CSS modules, no styled-components
603
+ 9. **HeroUI theme colors** - Use semantic colors, not arbitrary values
604
+ 10. **Consistent spacing** - Use `space-y-*` and `space-x-*` utilities
605
+ 11. **Mobile-first** - Base styles for mobile, then `md:`, `lg:`, etc.
606
+
607
+ ### TypeScript & Validation
608
+ 12. **Proper TypeScript** - No `any`, all props typed
609
+ 13. **Form validation** - Zod schemas for all forms
471
610
 
472
611
  ---
473
612
 
@@ -0,0 +1,452 @@
1
+ # @adlas/create-app - Complete Project Documentation
2
+
3
+ ## Project Overview
4
+
5
+ **Package Name**: `@adlas/create-app`
6
+ **Current Version**: `1.0.41`
7
+ **NPM Registry**: https://www.npmjs.com/package/@adlas/create-app
8
+ **Type**: CLI Tool for scaffolding Next.js projects with HeroUI, Tailwind CSS 4, and TypeScript
9
+
10
+ ## Project Purpose
11
+
12
+ This is a CLI tool that generates production-ready Next.js 15 projects with:
13
+ - **HeroUI v2** (React UI component library)
14
+ - **Tailwind CSS v4** (Latest version with new @theme syntax)
15
+ - **TypeScript** (Strict mode enabled)
16
+ - **Next.js 15** with App Router
17
+ - **Internationalization** (next-intl)
18
+ - **React Query** (TanStack Query v5)
19
+ - **Form Management** (React Hook Form + Zod)
20
+ - **PWA Support** (Always enabled)
21
+ - **ESLint + Prettier** (With strict formatting rules)
22
+
23
+ ## Project Structure
24
+
25
+ ```
26
+ cli-tool/
27
+ ├── src/
28
+ │ └── commands/
29
+ │ ├── init.ts # Main project scaffolding command
30
+ │ ├── figma.ts # Figma integration (not actively used)
31
+ │ └── swagger.ts # Swagger integration (not actively used)
32
+ ├── templates/
33
+ │ ├── boilerplate/ # Template files copied to new projects
34
+ │ │ ├── assets/ # SVG icons
35
+ │ │ ├── components/ # Reusable UI components
36
+ │ │ │ ├── icons/ # Generated icon components
37
+ │ │ │ └── ui/ # HeroUI wrapper components
38
+ │ │ ├── config/ # App configuration
39
+ │ │ ├── libs/ # Library configurations
40
+ │ │ ├── locales/ # Translation files
41
+ │ │ ├── providers.tsx # React providers wrapper
42
+ │ │ ├── styles/ # Global styles and theme
43
+ │ │ │ ├── globals.css # Tailwind CSS 4 with custom breakpoints
44
+ │ │ │ └── hero.ts # HeroUI theme configuration
45
+ │ │ ├── types/ # TypeScript type definitions
46
+ │ │ ├── utils/ # Helper functions
47
+ │ │ └── validations/ # Zod schemas and validation logic
48
+ │ ├── configs/ # Configuration files
49
+ │ │ ├── .gitignore
50
+ │ │ ├── eslint.config.mjs
51
+ │ │ ├── next.config.ts
52
+ │ │ ├── tsconfig.json
53
+ │ │ └── ... (other config files)
54
+ │ └── docs/ # Documentation (CURRENTLY EMPTY)
55
+ ├── package.json
56
+ ├── tsconfig.json
57
+ └── README.md
58
+ ```
59
+
60
+ ## Key Technical Decisions
61
+
62
+ ### 1. Font Configuration
63
+ **Default Font**: `ibx` (IBM Plex Sans)
64
+ - Configured in `templates/boilerplate/styles/globals.css`
65
+ - CSS Variable: `--font-sans: var(--font-ibx), system-ui, sans-serif`
66
+
67
+ ### 2. Responsive Breakpoints (Mobile-First)
68
+ Custom breakpoints based on real device sizes:
69
+
70
+ ```css
71
+ /* Mobile */
72
+ --breakpoint-4xs: 320px; /* iPhone SE */
73
+ --breakpoint-3xs: 375px; /* iPhone 13 mini */
74
+ --breakpoint-2xs: 390px; /* iPhone 13/14/16, 14/15 Pro, 16 Pro */
75
+ --breakpoint-xs: 440px; /* iPhone 14/16 Plus, 14/15 Pro Max, 16 Pro Max */
76
+
77
+ /* Tablet */
78
+ --breakpoint-sm: 744px; /* iPad mini 8.3" */
79
+ --breakpoint-md: 834px; /* iPad Pro 11" */
80
+ --breakpoint-lg: 1024px; /* iPad Pro 12.9" - REFERENCE POINT */
81
+
82
+ /* Desktop */
83
+ --breakpoint-xl: 1280px; /* MacBook Air, TV, Android Expanded */
84
+ --breakpoint-2xl: 1440px; /* Desktop, Surface Pro 8, Wireframes */
85
+ --breakpoint-3xl: 1512px; /* MacBook Pro 14" */
86
+ --breakpoint-4xl: 1728px; /* MacBook Pro 16" */
87
+ ```
88
+
89
+ **Important**: `lg` (1024px) is the reference breakpoint.
90
+
91
+ ### 3. HeroUI Theme Configuration
92
+ Located in `templates/boilerplate/styles/hero.ts`:
93
+
94
+ ```typescript
95
+ export default heroui(); // Minimal config, uses HeroUI defaults
96
+ ```
97
+
98
+ **Note**: The theme file was recently simplified. If you need custom colors, refer to the berndorf project at `/Users/amir/Desktop/Projects/adlas/berndorf/src/styles/hero.ts` for a complete example with all color definitions.
99
+
100
+ ### 4. Dependencies Management
101
+ **Critical Change**: Automatic `pnpm install` is **DISABLED**.
102
+
103
+ **Why**: To prevent long installation times and allow users to review dependencies first.
104
+
105
+ **Implementation**:
106
+ - In `src/commands/init.ts` line 214, `--skip-install` flag is added to `pnpm create next-app` command
107
+ - The `installDependencies()` function call has been removed from the initialization flow
108
+ - Users must manually run `pnpm install` after project creation
109
+ - No `node_modules` folder is created during project initialization
110
+
111
+ ### 5. Ignored Files
112
+ Added to `.gitignore`:
113
+ - `pnpm-lock.yaml`
114
+ - `pnpm-workspace.yaml`
115
+
116
+ **Reason**: These files should not be in version control for CLI-generated projects.
117
+
118
+ ### 6. ESLint Configuration
119
+ **Issue**: `eslint-plugin-tailwindcss` has compatibility issues with Tailwind CSS v4 and HeroUI custom classes.
120
+
121
+ **Solution**: The plugin is included but configured properly with settings pointing to `globals.css`.
122
+
123
+ **Reference Project**: `/Users/amir/Desktop/Projects/adlas/berndorf` - This project has a working eslint config that we copied.
124
+
125
+ ### 7. Removed Features
126
+ - **Figma Integration Prompt**: Removed from init wizard
127
+ - **Swagger Integration Prompt**: Removed from init wizard
128
+
129
+ These features are still in the codebase but not exposed to users during project creation.
130
+
131
+ ## Important File Locations
132
+
133
+ ### Critical Boilerplate Files
134
+ 1. **`templates/boilerplate/styles/globals.css`**
135
+ - Tailwind CSS 4 configuration
136
+ - Custom breakpoints
137
+ - HeroUI integration
138
+ - Toast styles (Sonner)
139
+
140
+ 2. **`templates/boilerplate/styles/hero.ts`**
141
+ - HeroUI theme configuration
142
+ - Currently minimal setup
143
+
144
+ 3. **`templates/configs/eslint.config.mjs`**
145
+ - ESLint configuration
146
+ - Includes tailwindcss plugin
147
+ - Import sorting rules
148
+
149
+ 4. **`src/commands/init.ts`**
150
+ - Main scaffolding logic
151
+ - Dependency versions (line 453-505)
152
+ - Project generation flow
153
+
154
+ ### Key Package Versions
155
+ ```json
156
+ {
157
+ "@heroui/react": "^2.8.5",
158
+ "@internationalized/date": "3.10.1", // IMPORTANT: Must be exactly 3.10.1
159
+ "next": "15.5.4",
160
+ "react": "19.2.0",
161
+ "tailwindcss": "4.1.17",
162
+ "eslint-plugin-tailwindcss": "^4.0.0-beta.0"
163
+ }
164
+ ```
165
+
166
+ **Critical**: `@internationalized/date` must be `3.10.1` to match HeroUI's internal version and avoid type conflicts.
167
+
168
+ ## Development Workflow
169
+
170
+ ### Building the CLI
171
+ ```bash
172
+ cd /Users/amir/Desktop/Projects/cli-tool
173
+ pnpm build
174
+ ```
175
+
176
+ ### Testing Locally
177
+ ```bash
178
+ # Build first
179
+ pnpm build
180
+
181
+ # Test in a new directory
182
+ cd /Users/amir/Desktop
183
+ npx /Users/amir/Desktop/Projects/cli-tool init test-project
184
+ ```
185
+
186
+ ### Publishing to NPM
187
+
188
+ **Prerequisites**:
189
+ 1. Git working directory must be clean
190
+ 2. You must be logged into npm (`npm whoami` to check)
191
+
192
+ **Commands**:
193
+ ```bash
194
+ # Option 1: Automatic version bump + build + publish
195
+ pnpm release # Bumps patch version (1.0.32 → 1.0.33)
196
+
197
+ # Option 2: Manual version control
198
+ pnpm release:minor # Bumps minor version (1.0.32 → 1.1.0)
199
+ pnpm release:major # Bumps major version (1.0.32 → 2.0.0)
200
+
201
+ # Option 3: Force publish without version bump
202
+ pnpm publish:force # Use with caution
203
+ ```
204
+
205
+ **Publishing Flow**:
206
+ 1. Commit all changes: `git add . && git commit -m "your message"`
207
+ 2. Run `pnpm release`
208
+ 3. Script automatically:
209
+ - Bumps version in package.json
210
+ - Builds the project
211
+ - Publishes to npm
212
+ - Creates a git tag
213
+
214
+ ## Common Issues and Solutions
215
+
216
+ ### Issue 1: TypeScript Errors with DatePicker
217
+ **Error**: Type mismatch with `@internationalized/date`
218
+
219
+ **Solution**:
220
+ - Ensure version is exactly `3.10.1` in `src/commands/init.ts` line 459
221
+ - Run `pnpm add @internationalized/date@3.10.1` in generated project
222
+
223
+ ### Issue 2: ESLint Errors with Tailwind Classes
224
+ **Error**: `Cannot apply unknown utility class 'bg-background'`
225
+
226
+ **Solution**:
227
+ - This was fixed by defining minimal HeroUI theme
228
+ - If it happens again, check that `hero.ts` exports `heroui()` properly
229
+ - Verify `eslint.config.mjs` has correct Tailwind settings
230
+
231
+ ### Issue 3: Lint Errors in Generated Projects
232
+ **Status**: RESOLVED in v1.0.41
233
+
234
+ **Previous Issue**: Generated projects had lint errors:
235
+ - `next.config.ts`: Missing spacing between import groups
236
+ - `src/types/next-pwa.d.ts`: Using `import` instead of `import type`
237
+
238
+ **Solution**:
239
+ - Fixed in `src/commands/init.ts` line 300: Added extra newline after `import type { NextConfig } from 'next';`
240
+ - Fixed in `src/commands/init.ts` line 576: Changed to `import type { NextConfig } from 'next';`
241
+ - All generated projects now pass `pnpm lint` and `pnpm check:types` without errors
242
+
243
+ ## Reference Projects
244
+
245
+ ### Berndorf Project
246
+ **Location**: `/Users/amir/Desktop/Projects/adlas/berndorf`
247
+
248
+ **Why it matters**:
249
+ - Has working HeroUI theme with all colors defined
250
+ - Has working eslint-plugin-tailwindcss configuration
251
+ - Used as reference for:
252
+ - `hero.ts` color definitions
253
+ - ESLint configuration
254
+ - Tailwind CSS setup
255
+
256
+ **Key files to reference**:
257
+ - `/Users/amir/Desktop/Projects/adlas/berndorf/src/styles/hero.ts` - Complete color palette
258
+ - `/Users/amir/Desktop/Projects/adlas/berndorf/eslint.config.mjs` - Working ESLint config
259
+
260
+ ## Testing Checklist
261
+
262
+ Before publishing a new version, test these commands in a generated project:
263
+
264
+ ```bash
265
+ # 1. Create new project
266
+ npx @adlas/create-app@latest init test-project
267
+ cd test-project
268
+
269
+ # 2. Install dependencies
270
+ pnpm install
271
+
272
+ # 3. Run type check (should pass with 0 errors)
273
+ pnpm check:types
274
+
275
+ # 4. Run linter (may have errors, should be fixable)
276
+ pnpm lint
277
+
278
+ # 5. Fix lint errors
279
+ pnpm lint --fix
280
+
281
+ # 6. Verify lint passes
282
+ pnpm lint
283
+
284
+ # 7. Start dev server (should work without errors)
285
+ pnpm dev
286
+
287
+ # 8. Build project (should complete successfully)
288
+ pnpm build
289
+ ```
290
+
291
+ ## Project History (Recent Changes)
292
+
293
+ ### v1.0.41 (Latest)
294
+ - **CRITICAL FIX**: Fixed import spacing in generated `next.config.ts`
295
+ - **CRITICAL FIX**: Fixed `import type` usage in generated `next-pwa.d.ts`
296
+ - Generated projects now pass `pnpm lint` and `pnpm check:types` without errors
297
+ - Modified `generateNextConfig()` function to add proper spacing after 'next' import
298
+ - Modified `createTypeDeclarations()` function to use `import type` instead of `import`
299
+
300
+ ### v1.0.40
301
+ - Added `check:types` script to package.json template
302
+ - Script: `"check:types": "tsc --noEmit --pretty"`
303
+
304
+ ### v1.0.39
305
+ - Fixed import spacing in next.config.ts template
306
+ - Removed extra spacing between next-intl/plugin and next-pwa imports
307
+
308
+ ### v1.0.38
309
+ - Resolved remaining lint errors in boilerplate files
310
+ - Fixed import spacing in next.config.ts
311
+ - Fixed Tailwind class ordering in Navbar component
312
+ - Ensured import type is used correctly in next-pwa.d.ts
313
+
314
+ ### v1.0.37
315
+ - Fixed Tailwind class ordering in Navbar component (text-xl font-bold)
316
+
317
+ ### v1.0.36
318
+ - Removed duplicate types folder copy to resolve TypeScript compilation error
319
+
320
+ ### v1.0.35
321
+ - Fixed package.json dependencies alphabetical ordering
322
+ - Added layout components (Navbar, Footer) to boilerplate copy
323
+
324
+ ### v1.0.33
325
+ - Fixed package.json dependencies sorting
326
+ - Added layout components to boilerplate
327
+
328
+ ### v1.0.32
329
+ - Fixed lint errors in boilerplate files
330
+ - Added `next-pwa.d.ts` type definitions
331
+ - Applied lint fixes to DatePicker, queryClient, and other files
332
+
333
+ ### v1.0.28-31
334
+ - Removed Figma and Swagger prompts from init wizard
335
+ - Disabled automatic `pnpm install` with `--skip-install` flag
336
+ - Added pnpm-lock.yaml and pnpm-workspace.yaml to gitignore
337
+ - Updated eslint.config.mjs with Tailwind plugin configuration
338
+ - Changed default font to `ibx`
339
+ - Changed hero.ts to minimal configuration `heroui()`
340
+
341
+ ## Environment Setup
342
+
343
+ ### Required Software
344
+ - **Node.js**: >= 18.0.0
345
+ - **pnpm**: Latest version recommended
346
+ - **npm**: For publishing (comes with Node.js)
347
+ - **Git**: For version control
348
+
349
+ ### NPM Authentication
350
+ ```bash
351
+ # Check if logged in
352
+ npm whoami
353
+
354
+ # Login if needed
355
+ npm login
356
+
357
+ # Verify access to @adlas scope
358
+ npm access list packages @adlas
359
+ ```
360
+
361
+ ## File Modifications Not in Git
362
+
363
+ The following files are modified during the build/publish process and may not match what's in the repository:
364
+
365
+ 1. **package.json** - Version number changes with each release
366
+ 2. **dist/** - Generated TypeScript output (gitignored)
367
+ 3. **node_modules/** - Dependencies (gitignored)
368
+
369
+ ## Critical Notes for Future Sessions
370
+
371
+ 1. **Never revert hero.ts to complex configuration** unless specifically needed. The minimal `heroui()` export is intentional.
372
+
373
+ 2. **Don't remove eslint-plugin-tailwindcss** even if it seems unused. It's required for Tailwind class ordering.
374
+
375
+ 3. **Always test with a fresh project** before publishing. The boilerplate may have lint errors that only appear after generation.
376
+
377
+ 4. **Reference berndorf project** for working examples of HeroUI + Tailwind CSS v4 + ESLint configuration.
378
+
379
+ 5. **pnpm-lock.yaml should NOT be in generated projects** - it's in gitignore for a reason.
380
+
381
+ 6. **Font is ibx, not inter** - Check globals.css if font-related issues arise.
382
+
383
+ 7. **@internationalized/date version is critical** - Must be 3.10.1 to avoid type errors.
384
+
385
+ 8. **Breakpoint reference is 1024px (lg)** - All other breakpoints are relative to this.
386
+
387
+ ## Useful Commands Reference
388
+
389
+ ```bash
390
+ # Build the CLI
391
+ pnpm build
392
+
393
+ # Publish new version
394
+ pnpm release
395
+
396
+ # Test locally without publishing
397
+ pnpm link
398
+ cd /some/test/directory
399
+ npx @adlas/create-app init my-test
400
+
401
+ # Clear npm cache (if users report old version)
402
+ npm cache clean --force
403
+
404
+ # Check what's included in published package
405
+ npm pack --dry-run
406
+ ```
407
+
408
+ ## Contact & Repository
409
+
410
+ - **NPM Package**: https://www.npmjs.com/package/@adlas/create-app
411
+ - **Repository**: https://github.com/adlas/create-app (configured in package.json)
412
+ - **License**: UNLICENSED (private/proprietary)
413
+
414
+ ## Final Notes
415
+
416
+ This project is a **production CLI tool** that generates real projects for end users. Any changes should be:
417
+ 1. Tested thoroughly
418
+ 2. Documented
419
+ 3. Version controlled
420
+ 4. Published with appropriate version bumps
421
+
422
+ The quality of generated projects reflects directly on the CLI tool, so maintain high standards for code quality, linting, and TypeScript safety.
423
+
424
+ ## Key Fixes Summary
425
+
426
+ ### Lint and Type Checking (v1.0.36 - v1.0.41)
427
+ This series of releases focused on ensuring generated projects pass all quality checks:
428
+
429
+ 1. **Import Spacing**: ESLint rule `perfectionist/sort-imports` requires proper spacing between import groups
430
+ - Fixed by adding `\n\n` after the first import in `generateNextConfig()`
431
+
432
+ 2. **Type Imports**: ESLint rule `ts/consistent-type-imports` requires `import type` for type-only imports
433
+ - Fixed in `createTypeDeclarations()` for next-pwa.d.ts generation
434
+
435
+ 3. **Tailwind Class Ordering**: ESLint rule `tailwindcss/classnames-order` enforces specific class order
436
+ - Fixed in Navbar component template
437
+
438
+ 4. **Duplicate File Copy**: TypeScript compilation error from duplicate variable names
439
+ - Removed duplicate types folder copy in copyBoilerplate function
440
+
441
+ 5. **Missing Components**: Layout components weren't being copied to generated projects
442
+ - Added layout folder copy to copyBoilerplate function
443
+
444
+ 6. **Package.json Ordering**: Dependencies must be alphabetically sorted
445
+ - Fixed dependency ordering in init.ts
446
+
447
+ **Result**: Generated projects now pass `pnpm lint` and `pnpm check:types` without any errors.
448
+
449
+ ---
450
+
451
+ **Last Updated**: December 23, 2025 (v1.0.41)
452
+ **Documentation Created For**: Claude AI continuation in different account