@adlas/create-app 1.0.0
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/README.md +476 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +39 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/figma.d.ts +16 -0
- package/dist/commands/figma.d.ts.map +1 -0
- package/dist/commands/figma.js +172 -0
- package/dist/commands/figma.js.map +1 -0
- package/dist/commands/index.d.ts +5 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/commands/index.js +5 -0
- package/dist/commands/index.js.map +1 -0
- package/dist/commands/init.d.ts +8 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +1471 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/swagger.d.ts +16 -0
- package/dist/commands/swagger.d.ts.map +1 -0
- package/dist/commands/swagger.js +404 -0
- package/dist/commands/swagger.js.map +1 -0
- package/dist/commands/update.d.ts +15 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +93 -0
- package/dist/commands/update.js.map +1 -0
- package/package.json +63 -0
- package/templates/.vscode/extensions.json +9 -0
- package/templates/.vscode/launch.json +26 -0
- package/templates/.vscode/settings.json +67 -0
- package/templates/.vscode/tasks.json +21 -0
- package/templates/boilerplate/config/fonts.ts +10 -0
- package/templates/boilerplate/config/navigationUrls.ts +47 -0
- package/templates/boilerplate/config/site.ts +96 -0
- package/templates/boilerplate/libs/I18n.ts +15 -0
- package/templates/boilerplate/libs/I18nNavigation.ts +5 -0
- package/templates/boilerplate/libs/I18nRouting.ts +9 -0
- package/templates/boilerplate/libs/env.ts +21 -0
- package/templates/boilerplate/libs/react-query/ReactQueryProvider.tsx +21 -0
- package/templates/boilerplate/libs/react-query/index.ts +2 -0
- package/templates/boilerplate/libs/react-query/queryClient.ts +62 -0
- package/templates/boilerplate/libs/react-query/queryKeys.ts +5 -0
- package/templates/boilerplate/public/images/index.ts +1 -0
- package/templates/boilerplate/reset.d.ts +2 -0
- package/templates/boilerplate/styles/globals.css +308 -0
- package/templates/boilerplate/types/i18n.ts +10 -0
- package/templates/boilerplate/types/locale.ts +8 -0
- package/templates/boilerplate/utils/file/fileConfig.ts +123 -0
- package/templates/boilerplate/utils/file/fileValidation.ts +78 -0
- package/templates/boilerplate/utils/file/imageCompression.ts +182 -0
- package/templates/boilerplate/utils/file/index.ts +3 -0
- package/templates/boilerplate/utils/helpers.ts +55 -0
- package/templates/boilerplate/validations/auth.validation.ts +92 -0
- package/templates/boilerplate/validations/commonValidations.ts +258 -0
- package/templates/boilerplate/validations/zodErrorMap.ts +101 -0
- package/templates/configs/.env.example +8 -0
- package/templates/configs/.prettierignore +23 -0
- package/templates/configs/.prettierrc.cjs +26 -0
- package/templates/configs/.prettierrc.icons.cjs +11 -0
- package/templates/configs/Dockerfile +6 -0
- package/templates/configs/commitlint.config.ts +8 -0
- package/templates/configs/eslint.config.mjs +119 -0
- package/templates/configs/knip.config.ts +32 -0
- package/templates/configs/lefthook.yml +42 -0
- package/templates/configs/lint-staged.config.js +8 -0
- package/templates/configs/next.config.template.ts +77 -0
- package/templates/configs/next.config.ts +43 -0
- package/templates/configs/package.json +75 -0
- package/templates/configs/postcss.config.mjs +15 -0
- package/templates/configs/svgr.config.mjs +129 -0
- package/templates/configs/tsconfig.json +75 -0
- package/templates/docs/AI_QUICK_REFERENCE.md +379 -0
- package/templates/docs/ARCHITECTURE_PATTERNS.md +927 -0
- package/templates/docs/DOCUMENTATION_INDEX.md +411 -0
- package/templates/docs/FIGMA_TO_CODE_GUIDE.md +768 -0
- package/templates/docs/IMPLEMENTATION_GUIDE.md +892 -0
- package/templates/docs/PROJECT_OVERVIEW.md +302 -0
- package/templates/docs/REFACTOR_PROGRESS.md +1113 -0
- package/templates/docs/SHADCN_TO_HEROUI_MIGRATION.md +1375 -0
- package/templates/docs/UI_COMPONENTS_GUIDE.md +893 -0
package/README.md
ADDED
|
@@ -0,0 +1,476 @@
|
|
|
1
|
+
# @adlas/create-app
|
|
2
|
+
|
|
3
|
+
Professional project initializer for Adlas with AI-powered development tools.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- 🚀 **Quick Setup** - Initialize Next.js projects with best practices
|
|
8
|
+
- 🎨 **Figma Integration** - Generate UI from Figma designs using Claude + Figma MCP
|
|
9
|
+
- 📡 **Swagger Integration** - Auto-generate API layer from Swagger/OpenAPI specs
|
|
10
|
+
- 📚 **Documentation** - Auto-generated project documentation
|
|
11
|
+
- 🎯 **HeroUI** - Pre-configured with HeroUI components
|
|
12
|
+
- 🏗️ **Architecture** - Clean service module pattern
|
|
13
|
+
- 🔄 **Updatable** - Keep configs and docs up to date
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
### Global Installation (Recommended)
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install -g @adlas/create-app
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Use with NPX (No Installation)
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npx @adlas/create-app init my-project
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Local Development
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
cd cli-tool
|
|
33
|
+
pnpm install
|
|
34
|
+
pnpm link
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Now you can use `create-adlas-app` or `adlas` commands globally.
|
|
38
|
+
|
|
39
|
+
## Commands
|
|
40
|
+
|
|
41
|
+
### 1. Initialize New Project
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
adlas init [project-name]
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
**Interactive Mode:**
|
|
48
|
+
```bash
|
|
49
|
+
adlas init
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Prompts you for:
|
|
53
|
+
- Project name
|
|
54
|
+
- Template (e-commerce, dashboard, landing, blank)
|
|
55
|
+
- Features (auth, i18n, dark mode, PWA, analytics)
|
|
56
|
+
- Figma integration (optional)
|
|
57
|
+
- Swagger integration (optional)
|
|
58
|
+
|
|
59
|
+
**With Options:**
|
|
60
|
+
```bash
|
|
61
|
+
adlas init my-store --template ecommerce
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**Options:**
|
|
65
|
+
- `-t, --template <template>` - Project template
|
|
66
|
+
- `--skip-install` - Skip package installation
|
|
67
|
+
- `--skip-git` - Skip git initialization
|
|
68
|
+
|
|
69
|
+
**What it does:**
|
|
70
|
+
1. ✅ Creates Next.js 15 project with TypeScript
|
|
71
|
+
2. ✅ Installs HeroUI + dependencies (Zustand, React Query, Zod, etc.)
|
|
72
|
+
3. ✅ Copies configuration files (.npmrc, prettier, svgr, postcss, etc.)
|
|
73
|
+
4. ✅ Generates project-specific documentation
|
|
74
|
+
5. ✅ Sets up folder structure (services, components, etc.)
|
|
75
|
+
6. ✅ Copies boilerplate code (utils, providers, etc.)
|
|
76
|
+
7. ✅ Initializes git with proper commit
|
|
77
|
+
|
|
78
|
+
### 2. Generate UI from Figma
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
adlas figma <figma-url>
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**Example:**
|
|
85
|
+
```bash
|
|
86
|
+
adlas figma https://www.figma.com/file/abc123/My-Design
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**With Options:**
|
|
90
|
+
```bash
|
|
91
|
+
adlas figma <figma-url> --output src/components/features --pages "Home, Products"
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**Options:**
|
|
95
|
+
- `-o, --output <path>` - Output directory (default: `./src/components/features`)
|
|
96
|
+
- `-p, --pages <pages...>` - Specific pages to generate
|
|
97
|
+
|
|
98
|
+
**What it does:**
|
|
99
|
+
1. ✅ Validates Figma URL
|
|
100
|
+
2. ✅ Creates instruction file for Claude
|
|
101
|
+
3. ✅ Guides you to use Claude with Figma MCP
|
|
102
|
+
4. ✅ Claude analyzes Figma design
|
|
103
|
+
5. ✅ Generates React components with HeroUI
|
|
104
|
+
6. ✅ Creates service modules if needed
|
|
105
|
+
7. ✅ Follows architecture patterns
|
|
106
|
+
|
|
107
|
+
**Workflow:**
|
|
108
|
+
1. Run the command
|
|
109
|
+
2. Copy the generated prompt
|
|
110
|
+
3. Give it to Claude in your IDE
|
|
111
|
+
4. Claude fetches Figma design and generates components automatically
|
|
112
|
+
|
|
113
|
+
### 3. Generate API Layer from Swagger
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
adlas swagger <swagger-url>
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
**Example:**
|
|
120
|
+
```bash
|
|
121
|
+
adlas swagger https://api.example.com/swagger.json
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
**With Options:**
|
|
125
|
+
```bash
|
|
126
|
+
adlas swagger <swagger-url> --output src/services --module products
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
**Options:**
|
|
130
|
+
- `-o, --output <path>` - Output directory (default: `./src/services`)
|
|
131
|
+
- `-m, --module <module>` - Specific module/tag to generate
|
|
132
|
+
|
|
133
|
+
**What it does:**
|
|
134
|
+
1. ✅ Fetches Swagger/OpenAPI spec
|
|
135
|
+
2. ✅ Analyzes all endpoints
|
|
136
|
+
3. ✅ Creates instruction file for Claude
|
|
137
|
+
4. ✅ Saves spec locally
|
|
138
|
+
5. ✅ Claude generates:
|
|
139
|
+
- TypeScript types from schemas
|
|
140
|
+
- API client functions
|
|
141
|
+
- React Query hooks (queries & mutations)
|
|
142
|
+
- Query keys
|
|
143
|
+
- Service modules
|
|
144
|
+
|
|
145
|
+
**Generated Structure:**
|
|
146
|
+
```
|
|
147
|
+
src/services/
|
|
148
|
+
├── product/
|
|
149
|
+
│ ├── product.types.ts # TypeScript types
|
|
150
|
+
│ ├── product.keys.ts # Query keys
|
|
151
|
+
│ ├── product.api.ts # API functions
|
|
152
|
+
│ └── product.queries.ts # React Query hooks
|
|
153
|
+
├── user/
|
|
154
|
+
│ └── ...
|
|
155
|
+
└── client.ts # Shared Axios client
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### 4. Update Project
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
adlas update
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
**Update only configs:**
|
|
165
|
+
```bash
|
|
166
|
+
adlas update --configs
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
**Update only docs:**
|
|
170
|
+
```bash
|
|
171
|
+
adlas update --docs
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
**What it does:**
|
|
175
|
+
1. ✅ Updates configuration files to latest version
|
|
176
|
+
2. ✅ Updates documentation to latest patterns
|
|
177
|
+
3. ✅ Creates backups of existing files (.backup)
|
|
178
|
+
|
|
179
|
+
## Project Structure
|
|
180
|
+
|
|
181
|
+
After initialization, your project will have:
|
|
182
|
+
|
|
183
|
+
```
|
|
184
|
+
my-project/
|
|
185
|
+
├── src/
|
|
186
|
+
│ ├── app/ # Next.js App Router pages
|
|
187
|
+
│ │ └── [locale]/
|
|
188
|
+
│ │ ├── (website)/ # Public pages
|
|
189
|
+
│ │ └── (dashboard)/ # Protected pages
|
|
190
|
+
│ ├── components/
|
|
191
|
+
│ │ ├── ui/ # Shared UI components
|
|
192
|
+
│ │ └── features/ # Feature-specific components
|
|
193
|
+
│ ├── services/ # Service modules (API layer)
|
|
194
|
+
│ │ └── [module]/
|
|
195
|
+
│ │ ├── [module].types.ts
|
|
196
|
+
│ │ ├── [module].queries.ts
|
|
197
|
+
│ │ └── [module].store.ts
|
|
198
|
+
│ ├── hooks/ # Custom React hooks
|
|
199
|
+
│ ├── lib/ # Utilities
|
|
200
|
+
│ ├── utils/ # Helper functions (cn, etc.)
|
|
201
|
+
│ ├── types/ # Global TypeScript types
|
|
202
|
+
│ ├── locales/ # i18n translations
|
|
203
|
+
│ └── providers.tsx # React Query, HeroUI providers
|
|
204
|
+
├── public/
|
|
205
|
+
│ └── icons/ # SVG icons
|
|
206
|
+
├── docs/ # Project documentation
|
|
207
|
+
│ ├── PROJECT_OVERVIEW.md
|
|
208
|
+
│ ├── ARCHITECTURE_PATTERNS.md
|
|
209
|
+
│ ├── UI_COMPONENTS_GUIDE.md
|
|
210
|
+
│ ├── IMPLEMENTATION_GUIDE.md
|
|
211
|
+
│ ├── AI_QUICK_REFERENCE.md
|
|
212
|
+
│ └── DOCUMENTATION_INDEX.md
|
|
213
|
+
├── scripts/ # Build/deployment scripts
|
|
214
|
+
├── .npmrc # Package manager config
|
|
215
|
+
├── prettier.config.mjs # Code formatting
|
|
216
|
+
├── svgr.config.mjs # SVG import config
|
|
217
|
+
├── postcss.config.mjs # PostCSS config
|
|
218
|
+
├── tailwind.config.ts # Tailwind + HeroUI config
|
|
219
|
+
└── tsconfig.json # TypeScript config
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
## Templates
|
|
223
|
+
|
|
224
|
+
### E-commerce
|
|
225
|
+
- Product listing & detail pages
|
|
226
|
+
- Shopping cart
|
|
227
|
+
- Checkout flow
|
|
228
|
+
- User authentication
|
|
229
|
+
- Order management
|
|
230
|
+
|
|
231
|
+
### Dashboard
|
|
232
|
+
- Admin layout
|
|
233
|
+
- Data tables
|
|
234
|
+
- Forms
|
|
235
|
+
- Charts
|
|
236
|
+
- User management
|
|
237
|
+
|
|
238
|
+
### Landing Page
|
|
239
|
+
- Hero section
|
|
240
|
+
- Features
|
|
241
|
+
- Pricing
|
|
242
|
+
- Contact form
|
|
243
|
+
- Responsive design
|
|
244
|
+
|
|
245
|
+
### Blank
|
|
246
|
+
- Minimal setup
|
|
247
|
+
- Just the structure
|
|
248
|
+
- Build anything from scratch
|
|
249
|
+
|
|
250
|
+
## Complete Workflow Example
|
|
251
|
+
|
|
252
|
+
### 1. Create New E-commerce Project
|
|
253
|
+
|
|
254
|
+
```bash
|
|
255
|
+
adlas init my-store
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
Select:
|
|
259
|
+
- Template: E-commerce
|
|
260
|
+
- Features: Authentication, i18n, Dark Mode
|
|
261
|
+
- Figma: Yes → `https://figma.com/file/abc123`
|
|
262
|
+
- Swagger: Yes → `https://api.mystore.com/swagger.json`
|
|
263
|
+
|
|
264
|
+
### 2. Project Created
|
|
265
|
+
|
|
266
|
+
```bash
|
|
267
|
+
cd my-store
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
Files generated:
|
|
271
|
+
- ✅ Complete Next.js setup
|
|
272
|
+
- ✅ HeroUI configured
|
|
273
|
+
- ✅ Documentation ready
|
|
274
|
+
- ✅ Project structure created
|
|
275
|
+
|
|
276
|
+
### 3. Generate API Layer
|
|
277
|
+
|
|
278
|
+
The CLI already prepared instructions. Open Claude and say:
|
|
279
|
+
|
|
280
|
+
```
|
|
281
|
+
Read .adlas-swagger-instructions.md and generate the API layer.
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
Claude will:
|
|
285
|
+
- Read Swagger spec
|
|
286
|
+
- Generate all types
|
|
287
|
+
- Create React Query hooks
|
|
288
|
+
- Set up service modules
|
|
289
|
+
|
|
290
|
+
### 4. Generate UI from Figma
|
|
291
|
+
|
|
292
|
+
Open Claude and say:
|
|
293
|
+
|
|
294
|
+
```
|
|
295
|
+
Read .adlas-figma-instructions.md and implement the UI from Figma.
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
Claude will:
|
|
299
|
+
- Fetch Figma designs
|
|
300
|
+
- Generate components with HeroUI
|
|
301
|
+
- Create proper structure
|
|
302
|
+
- Connect to API layer
|
|
303
|
+
|
|
304
|
+
### 5. Start Development
|
|
305
|
+
|
|
306
|
+
```bash
|
|
307
|
+
pnpm dev
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
Your app is ready with:
|
|
311
|
+
- ✅ Full type-safe API layer
|
|
312
|
+
- ✅ UI components from Figma
|
|
313
|
+
- ✅ Clean architecture
|
|
314
|
+
- ✅ Best practices
|
|
315
|
+
|
|
316
|
+
### 6. Update Later
|
|
317
|
+
|
|
318
|
+
When new configs or patterns are available:
|
|
319
|
+
|
|
320
|
+
```bash
|
|
321
|
+
adlas update
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
## Tech Stack
|
|
325
|
+
|
|
326
|
+
Projects created with this CLI include:
|
|
327
|
+
|
|
328
|
+
### Core
|
|
329
|
+
- **Next.js 15** - React framework with App Router
|
|
330
|
+
- **TypeScript** - Type safety
|
|
331
|
+
- **Tailwind CSS** - Styling
|
|
332
|
+
- **HeroUI** - UI component library
|
|
333
|
+
|
|
334
|
+
### State & Data
|
|
335
|
+
- **Zustand** - State management
|
|
336
|
+
- **TanStack Query (React Query)** - Server state
|
|
337
|
+
- **React Hook Form** - Form handling
|
|
338
|
+
- **Zod** - Schema validation
|
|
339
|
+
|
|
340
|
+
### Features
|
|
341
|
+
- **next-intl** - Internationalization (optional)
|
|
342
|
+
- **Framer Motion** - Animations (via HeroUI)
|
|
343
|
+
- **Lucide React** - Icons
|
|
344
|
+
|
|
345
|
+
### Developer Experience
|
|
346
|
+
- **SVGR** - SVG to React components
|
|
347
|
+
- **Prettier** - Code formatting
|
|
348
|
+
- **ESLint** - Code linting
|
|
349
|
+
- **TypeScript** - Full type safety
|
|
350
|
+
|
|
351
|
+
## Configuration Files
|
|
352
|
+
|
|
353
|
+
All projects include pre-configured:
|
|
354
|
+
|
|
355
|
+
- **`.npmrc`** - Package manager settings (auto-install peers, etc.)
|
|
356
|
+
- **`prettier.config.mjs`** - Code formatting rules
|
|
357
|
+
- **`svgr.config.mjs`** - SVG import configuration
|
|
358
|
+
- **`postcss.config.mjs`** - PostCSS plugins
|
|
359
|
+
- **`tailwind.config.ts`** - Tailwind + HeroUI theme
|
|
360
|
+
- **`tsconfig.json`** - TypeScript compiler options
|
|
361
|
+
- **`next.config.mjs`** - Next.js with SVGR support
|
|
362
|
+
|
|
363
|
+
## Documentation
|
|
364
|
+
|
|
365
|
+
Every project includes comprehensive documentation:
|
|
366
|
+
|
|
367
|
+
1. **PROJECT_OVERVIEW.md** - Project-specific overview
|
|
368
|
+
2. **ARCHITECTURE_PATTERNS.md** - Code structure and patterns
|
|
369
|
+
3. **UI_COMPONENTS_GUIDE.md** - HeroUI component usage
|
|
370
|
+
4. **IMPLEMENTATION_GUIDE.md** - Step-by-step workflows
|
|
371
|
+
5. **AI_QUICK_REFERENCE.md** - DO/DON'T rules for AI
|
|
372
|
+
6. **DOCUMENTATION_INDEX.md** - Navigation hub
|
|
373
|
+
|
|
374
|
+
## Working with Claude
|
|
375
|
+
|
|
376
|
+
This CLI is designed to work seamlessly with Claude AI:
|
|
377
|
+
|
|
378
|
+
### After Init
|
|
379
|
+
```
|
|
380
|
+
I created a new project with @adlas/create-app.
|
|
381
|
+
Read docs/DOCUMENTATION_INDEX.md to understand the project.
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
### For Figma
|
|
385
|
+
```
|
|
386
|
+
Read .adlas-figma-instructions.md and implement the UI.
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
### For Swagger
|
|
390
|
+
```
|
|
391
|
+
Read .adlas-swagger-instructions.md and generate the API layer.
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
Claude will:
|
|
395
|
+
- ✅ Understand your architecture
|
|
396
|
+
- ✅ Follow your patterns
|
|
397
|
+
- ✅ Generate proper code
|
|
398
|
+
- ✅ Use correct components
|
|
399
|
+
- ✅ Create type-safe APIs
|
|
400
|
+
|
|
401
|
+
## Requirements
|
|
402
|
+
|
|
403
|
+
- **Node.js** 18+
|
|
404
|
+
- **pnpm** (recommended) or npm
|
|
405
|
+
- **Claude** with Figma MCP (for Figma integration)
|
|
406
|
+
|
|
407
|
+
## Publishing
|
|
408
|
+
|
|
409
|
+
### To NPM (for company use)
|
|
410
|
+
|
|
411
|
+
```bash
|
|
412
|
+
# Update version
|
|
413
|
+
npm version patch|minor|major
|
|
414
|
+
|
|
415
|
+
# Build
|
|
416
|
+
pnpm build
|
|
417
|
+
|
|
418
|
+
# Publish to private registry
|
|
419
|
+
npm publish --access restricted
|
|
420
|
+
|
|
421
|
+
# Or public
|
|
422
|
+
npm publish --access public
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
### Private Registry
|
|
426
|
+
|
|
427
|
+
Update `package.json`:
|
|
428
|
+
|
|
429
|
+
```json
|
|
430
|
+
{
|
|
431
|
+
"name": "@yourcompany/create-app",
|
|
432
|
+
"publishConfig": {
|
|
433
|
+
"registry": "https://npm.yourcompany.com"
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
## Development
|
|
439
|
+
|
|
440
|
+
```bash
|
|
441
|
+
# Install dependencies
|
|
442
|
+
pnpm install
|
|
443
|
+
|
|
444
|
+
# Link for local development
|
|
445
|
+
pnpm link
|
|
446
|
+
|
|
447
|
+
# Test
|
|
448
|
+
adlas init test-project
|
|
449
|
+
|
|
450
|
+
# Unlink
|
|
451
|
+
pnpm unlink
|
|
452
|
+
```
|
|
453
|
+
|
|
454
|
+
## Roadmap
|
|
455
|
+
|
|
456
|
+
- [ ] More templates (Blog, SaaS, Portfolio)
|
|
457
|
+
- [ ] Component generator (`adlas generate component`)
|
|
458
|
+
- [ ] Page generator (`adlas generate page`)
|
|
459
|
+
- [ ] Tests generator
|
|
460
|
+
- [ ] Storybook integration
|
|
461
|
+
- [ ] Docker setup
|
|
462
|
+
- [ ] CI/CD templates
|
|
463
|
+
|
|
464
|
+
## Support
|
|
465
|
+
|
|
466
|
+
- Documentation: `docs/` folder in every project
|
|
467
|
+
- Issues: Create issue in repository
|
|
468
|
+
- Updates: Run `adlas update` regularly
|
|
469
|
+
|
|
470
|
+
## License
|
|
471
|
+
|
|
472
|
+
MIT
|
|
473
|
+
|
|
474
|
+
---
|
|
475
|
+
|
|
476
|
+
**Built with ❤️ for Adlas**
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { Command } from 'commander';
|
|
3
|
+
import { initCommand, figmaCommand, swaggerCommand, updateCommand } from './commands/index.js';
|
|
4
|
+
const program = new Command();
|
|
5
|
+
program
|
|
6
|
+
.name('create-adlas-app')
|
|
7
|
+
.description('Adlas project initializer with AI-powered development tools')
|
|
8
|
+
.version('1.0.0');
|
|
9
|
+
// Init command - Create new project
|
|
10
|
+
program
|
|
11
|
+
.command('init [project-name]')
|
|
12
|
+
.description('Initialize a new Adlas project')
|
|
13
|
+
.option('-t, --template <template>', 'Project template (e-commerce, dashboard, landing)')
|
|
14
|
+
.option('--skip-install', 'Skip package installation')
|
|
15
|
+
.option('--skip-git', 'Skip git initialization')
|
|
16
|
+
.action(initCommand);
|
|
17
|
+
// Figma command - Generate UI from Figma
|
|
18
|
+
program
|
|
19
|
+
.command('figma <figma-url>')
|
|
20
|
+
.description('Generate UI components from Figma design')
|
|
21
|
+
.option('-o, --output <path>', 'Output directory', './src/components/features')
|
|
22
|
+
.option('-p, --pages <pages...>', 'Specific pages to generate')
|
|
23
|
+
.action(figmaCommand);
|
|
24
|
+
// Swagger command - Generate API layer from Swagger/OpenAPI
|
|
25
|
+
program
|
|
26
|
+
.command('swagger <swagger-url>')
|
|
27
|
+
.description('Generate API layer (types, queries, mutations) from Swagger/OpenAPI spec')
|
|
28
|
+
.option('-o, --output <path>', 'Output directory', './src/services')
|
|
29
|
+
.option('-m, --module <module>', 'Service module name')
|
|
30
|
+
.action(swaggerCommand);
|
|
31
|
+
// Update command - Update configs and docs
|
|
32
|
+
program
|
|
33
|
+
.command('update')
|
|
34
|
+
.description('Update project configs and documentation to latest version')
|
|
35
|
+
.option('--configs', 'Update only config files')
|
|
36
|
+
.option('--docs', 'Update only documentation')
|
|
37
|
+
.action(updateCommand);
|
|
38
|
+
program.parse();
|
|
39
|
+
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAE/F,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,kBAAkB,CAAC;KACxB,WAAW,CAAC,6DAA6D,CAAC;KAC1E,OAAO,CAAC,OAAO,CAAC,CAAC;AAEpB,oCAAoC;AACpC,OAAO;KACJ,OAAO,CAAC,qBAAqB,CAAC;KAC9B,WAAW,CAAC,gCAAgC,CAAC;KAC7C,MAAM,CAAC,2BAA2B,EAAE,mDAAmD,CAAC;KACxF,MAAM,CAAC,gBAAgB,EAAE,2BAA2B,CAAC;KACrD,MAAM,CAAC,YAAY,EAAE,yBAAyB,CAAC;KAC/C,MAAM,CAAC,WAAW,CAAC,CAAC;AAEvB,yCAAyC;AACzC,OAAO;KACJ,OAAO,CAAC,mBAAmB,CAAC;KAC5B,WAAW,CAAC,0CAA0C,CAAC;KACvD,MAAM,CAAC,qBAAqB,EAAE,kBAAkB,EAAE,2BAA2B,CAAC;KAC9E,MAAM,CAAC,wBAAwB,EAAE,4BAA4B,CAAC;KAC9D,MAAM,CAAC,YAAY,CAAC,CAAC;AAExB,4DAA4D;AAC5D,OAAO;KACJ,OAAO,CAAC,uBAAuB,CAAC;KAChC,WAAW,CAAC,0EAA0E,CAAC;KACvF,MAAM,CAAC,qBAAqB,EAAE,kBAAkB,EAAE,gBAAgB,CAAC;KACnE,MAAM,CAAC,uBAAuB,EAAE,qBAAqB,CAAC;KACtD,MAAM,CAAC,cAAc,CAAC,CAAC;AAE1B,2CAA2C;AAC3C,OAAO;KACJ,OAAO,CAAC,QAAQ,CAAC;KACjB,WAAW,CAAC,4DAA4D,CAAC;KACzE,MAAM,CAAC,WAAW,EAAE,0BAA0B,CAAC;KAC/C,MAAM,CAAC,QAAQ,EAAE,2BAA2B,CAAC;KAC7C,MAAM,CAAC,aAAa,CAAC,CAAC;AAEzB,OAAO,CAAC,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
interface FigmaOptions {
|
|
2
|
+
output: string;
|
|
3
|
+
pages?: string[];
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Figma Command - Generate UI components from Figma design
|
|
7
|
+
*
|
|
8
|
+
* This uses Claude with Figma MCP to:
|
|
9
|
+
* 1. Fetch Figma design
|
|
10
|
+
* 2. Analyze components and screens
|
|
11
|
+
* 3. Generate React components using HeroUI
|
|
12
|
+
* 4. Follow architecture patterns from docs/
|
|
13
|
+
*/
|
|
14
|
+
export declare function figmaCommand(figmaUrl: string, options: FigmaOptions): Promise<void>;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=figma.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"figma.d.ts","sourceRoot":"","sources":["../../src/commands/figma.ts"],"names":[],"mappings":"AAIA,UAAU,YAAY;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB;AAED;;;;;;;;GAQG;AACH,wBAAsB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA0DzF"}
|