@adlas/create-app 1.0.45 → 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.45",
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",
@@ -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