@compilr-dev/factory 0.1.3 → 0.1.6

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/LICENSE ADDED
@@ -0,0 +1,108 @@
1
+ Functional Source License, Version 1.1, MIT Future License
2
+
3
+ Abbreviation: FSL-1.1-MIT
4
+
5
+ Notice
6
+
7
+ Copyright 2026 Carmelo Scozzola
8
+
9
+ Terms and Conditions
10
+
11
+ Licensor ("We")
12
+
13
+ The party offering the Software under these Terms and Conditions.
14
+
15
+ The Software
16
+
17
+ The "Software" is each version of the software that we make available under
18
+ these Terms and Conditions, as indicated by our inclusion of these Terms and
19
+ Conditions with the Software.
20
+
21
+ License Grant
22
+
23
+ Subject to your compliance with this License Grant and the Patents,
24
+ Redistribution and Trademark clauses below, we hereby grant you the right to
25
+ use, copy, modify, create derivative works, publicly perform, publicly display
26
+ and redistribute the Software for any Permitted Purpose identified below.
27
+
28
+ Permitted Purpose
29
+
30
+ A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
31
+ means making the Software available to others in a commercial product or
32
+ service that:
33
+
34
+ 1. substitutes for the Software;
35
+
36
+ 2. substitutes for any other product or service we offer using the Software
37
+ that exists as of the date we make the Software available; or
38
+
39
+ 3. offers the same or substantially similar functionality as the Software.
40
+
41
+ Permitted Purposes specifically include using the Software:
42
+
43
+ 1. for your internal use and access;
44
+
45
+ 2. for non-commercial education;
46
+
47
+ 3. for non-commercial research; and
48
+
49
+ 4. in connection with professional services that you provide to a licensee
50
+ using the Software in accordance with these Terms and Conditions.
51
+
52
+ Patents
53
+
54
+ To the extent your use for a Permitted Purpose would necessarily infringe our
55
+ patents, the license grant above includes a license under our patents. If you
56
+ make a claim against any party that the Software infringes or contributes to
57
+ the infringement of any patent, then your patent license to the Software ends
58
+ immediately.
59
+
60
+ Redistribution
61
+
62
+ The Terms and Conditions apply to all copies, modifications and derivatives of
63
+ the Software.
64
+
65
+ If you redistribute any copies, modifications or derivatives of the Software,
66
+ you must include a copy of or a link to these Terms and Conditions and not
67
+ remove any copyright notices provided in or with the Software.
68
+
69
+ Disclaimer
70
+
71
+ THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
72
+ IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
73
+ PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
74
+
75
+ IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
76
+ SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
77
+ EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
78
+
79
+ Trademarks
80
+
81
+ Except for displaying the License Details and identifying us as the origin of
82
+ the Software, you have no right under these Terms and Conditions to use our
83
+ trademarks, trade names, service marks or product names.
84
+
85
+ Grant of Future License
86
+
87
+ We hereby irrevocably grant you an additional license to use the Software under
88
+ the MIT license that is effective on the second anniversary of the date we make
89
+ the Software available. On or after that date, you may use the Software under
90
+ the MIT license, in which case the following will apply:
91
+
92
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
93
+ this software and associated documentation files (the "Software"), to deal in
94
+ the Software without restriction, including without limitation the rights to
95
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
96
+ of the Software, and to permit persons to whom the Software is furnished to do
97
+ so, subject to the following conditions:
98
+
99
+ The above copyright notice and this permission notice shall be included in all
100
+ copies or substantial portions of the Software.
101
+
102
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
103
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
104
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
105
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
106
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
107
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
108
+ SOFTWARE.
package/README.md CHANGED
@@ -1,23 +1,40 @@
1
1
  # @compilr-dev/factory
2
2
 
3
- AI-driven application scaffolder for the compilr-dev ecosystem. Generates working full-stack MVPs from an Application Model — a declarative description of what an app is (entities, fields, relationships, layout, features).
4
-
5
- ## Architecture
6
-
7
3
  ```
8
- @compilr-dev/agents → @compilr-dev/sdk → @compilr-dev/factory → @compilr-dev/cli
9
- peer dep on SDK
4
+ \|/
5
+ ╭══════════╮ ___ ___ _ __ ___ _ __ (_) |_ __
6
+ ║' ▐▌ ▐▌ │ / __|/ _ \| '_ ` _ \| '_ \| | | '__|
7
+ ║ │ | (__| (_) | | | | | | |_) | | | |
8
+ ╰─═──────═─╯ \___|\___/|_| |_| |_| .__/|_|_|_|
9
+ \________\ | | .dev
10
+ |_| factory
10
11
  ```
11
12
 
12
- The factory provides **5 tools** (via MetaToolsRegistry) and **1 skill**:
13
+ > AI-driven application scaffolder from declarative model to working full-stack MVP
13
14
 
14
- | Tool | Purpose |
15
- |------|---------|
16
- | `app_model_get` | Scoped reads of the Application Model |
17
- | `app_model_update` | Semantic operations (addEntity, updateField, etc.) |
18
- | `app_model_validate` | Check model health |
19
- | `factory_scaffold` | Generate files from model + toolkit |
20
- | `factory_list_toolkits` | List available toolkits |
15
+ [![npm version](https://img.shields.io/npm/v/@compilr-dev/factory.svg)](https://www.npmjs.com/package/@compilr-dev/factory)
16
+ [![License: FSL-1.1-MIT](https://img.shields.io/badge/License-FSL--1.1--MIT-blue.svg)](https://fsl.software/)
17
+
18
+ > [!WARNING]
19
+ > This package is in beta. APIs may change between minor versions.
20
+
21
+ ## Overview
22
+
23
+ The factory takes an **Application Model** — a declarative description of what an app is (entities, fields, relationships, layout, features, theme) — and generates a complete, working full-stack project. It provides tools and skills that let AI agents design and scaffold applications through conversation.
24
+
25
+ ## Features
26
+
27
+ - **Application Model** — declarative schema for entities, fields, relationships, layout, theme
28
+ - **Semantic Operations** — type-safe mutations (addEntity, updateField, addRelationship, etc.)
29
+ - **Optimistic Locking** — revision counter prevents lost updates
30
+ - **Auto-Inverse Relationships** — adding `belongsTo` auto-creates `hasMany` on target
31
+ - **Cascading Operations** — renaming an entity updates all relationship targets
32
+ - **Validation** — comprehensive model health checks with actionable error messages
33
+ - **Toolkit Registry** — extensible generator system (React+Node built-in)
34
+ - **5 Agent Tools** — model CRUD, validation, scaffolding, toolkit listing
35
+ - **1 Skill** — guided scaffolding workflow for AI agents
36
+ - **Full Color Palette** — auto-generates 50–950 Tailwind shades from single hex
37
+ - **Implicit Timestamps** — `createdAt`/`updatedAt` on all entity records
21
38
 
22
39
  ## Installation
23
40
 
@@ -25,31 +42,28 @@ The factory provides **5 tools** (via MetaToolsRegistry) and **1 skill**:
25
42
  npm install @compilr-dev/factory
26
43
  ```
27
44
 
28
- Peer dependency: `@compilr-dev/sdk ^0.1.11`
45
+ Peer dependency:
29
46
 
30
- ## Usage
31
-
32
- ```typescript
33
- import { createModelTools } from '@compilr-dev/factory';
34
- import type { PlatformContext } from '@compilr-dev/sdk';
47
+ ```bash
48
+ npm install @compilr-dev/sdk
49
+ ```
35
50
 
36
- // Create the 3 model tools (get, update, validate)
37
- const tools = createModelTools({
38
- context: platformContext, // PlatformContext with documents repo
39
- });
51
+ ## Quick Start
40
52
 
41
- // Or use individual utilities
53
+ ```typescript
42
54
  import {
43
55
  createDefaultModel,
44
- createDefaultEntity,
45
56
  applyOperation,
46
57
  validateModel,
47
58
  } from '@compilr-dev/factory';
48
59
 
60
+ // Define your application
49
61
  const model = createDefaultModel({
50
62
  identity: { name: 'Restaurant Manager', description: 'Manage reservations', version: '1.0.0' },
63
+ theme: { primaryColor: '#E65100' },
51
64
  });
52
65
 
66
+ // Add entities through semantic operations
53
67
  const updated = applyOperation(model, {
54
68
  op: 'addEntity',
55
69
  entity: {
@@ -66,10 +80,34 @@ const updated = applyOperation(model, {
66
80
  },
67
81
  });
68
82
 
83
+ // Validate
69
84
  const result = validateModel(updated);
70
85
  // { valid: true, errors: [] }
71
86
  ```
72
87
 
88
+ ### Agent Tools
89
+
90
+ ```typescript
91
+ import { createModelTools, createFactoryTools } from '@compilr-dev/factory';
92
+ import type { PlatformContext } from '@compilr-dev/sdk';
93
+
94
+ // 3 model tools (get, update, validate)
95
+ const modelTools = createModelTools({ context: platformContext });
96
+
97
+ // 2 factory tools (scaffold, list-toolkits)
98
+ const factoryTools = createFactoryTools({ context: platformContext });
99
+ ```
100
+
101
+ ## Agent Tools Reference
102
+
103
+ | Tool | Purpose |
104
+ |------|---------|
105
+ | `app_model_get` | Scoped reads of the Application Model (summary, entities, identity, etc.) |
106
+ | `app_model_update` | Semantic operations with optimistic locking |
107
+ | `app_model_validate` | Check model health and get actionable errors |
108
+ | `factory_scaffold` | Generate files from model + toolkit |
109
+ | `factory_list_toolkits` | List available toolkits with descriptions |
110
+
73
111
  ## Application Model
74
112
 
75
113
  The model describes **what** an application is, independently of how it's built:
@@ -87,45 +125,86 @@ ApplicationModel
87
125
 
88
126
  ### Semantic Operations
89
127
 
90
- The model is never edited as raw JSON. All changes go through typed operations:
128
+ All model changes go through typed operations never raw JSON editing:
91
129
 
92
- **Entity:** addEntity, updateEntity, removeEntity, renameEntity, reorderEntities
93
- **Field:** addField, updateField, removeField, renameField
94
- **Relationship:** addRelationship, removeRelationship (with auto-inverse management)
95
- **Section:** updateIdentity, updateLayout, updateFeatures, updateTheme, updateTechStack
130
+ | Category | Operations |
131
+ |----------|------------|
132
+ | **Entity** | addEntity, updateEntity, removeEntity, renameEntity, reorderEntities |
133
+ | **Field** | addField, updateField, removeField, renameField |
134
+ | **Relationship** | addRelationship, removeRelationship (with auto-inverse) |
135
+ | **Section** | updateIdentity, updateLayout, updateFeatures, updateTheme, updateTechStack |
96
136
 
97
137
  Every operation follows: **READ → CHECK → APPLY → VALIDATE → WRITE**.
98
138
 
99
- ### Key Features
139
+ ### Key Design Choices
100
140
 
101
141
  - **Name-based addressing** — `entity: "Reservation"`, not `entities[2]`
102
142
  - **Optimistic locking** — revision counter prevents lost updates
103
143
  - **Auto-inverse relationships** — adding `belongsTo` auto-adds `hasMany` on target
104
- - **Cascading operations** — renaming an entity updates all relationship targets
144
+ - **Cascading renames** — renaming an entity updates all FK references
105
145
  - **Scoped reads** — `app_model_get({ scope: "summary" })` for lightweight overview
106
146
 
147
+ ## Toolkits
148
+
149
+ ### React + Node (`react-node`)
150
+
151
+ Generates a complete full-stack application:
152
+
153
+ | Category | Generated Files |
154
+ |----------|----------------|
155
+ | **Config** | package.json, vite.config.ts, tailwind.config.js, tsconfig.json, postcss.config.js |
156
+ | **Server** | Express API with CRUD routes, in-memory data stores, seed data |
157
+ | **Pages** | List (card + table views), Detail, Dashboard |
158
+ | **Components** | Cards, Forms, SearchBar, ViewToggle, FilterBar, DarkModeToggle |
159
+ | **Routing** | React Router with nested layouts |
160
+ | **Shell** | Sidebar + header layout, responsive navigation |
161
+ | **Static** | index.html, global CSS, favicon |
162
+
163
+ **Highlights:**
164
+ - `@tailwindcss/forms` plugin included
165
+ - Full primary color palette (50–950 shades) auto-generated from theme
166
+ - Implicit `createdAt`/`updatedAt` timestamps on all entities
167
+ - Enum fields get filter bars on list pages
168
+ - `belongsTo` relationships get populated API responses and form dropdowns
169
+ - `hasMany` relationships shown as linked lists on detail pages
170
+ - Deterministic seed data (8 items per entity with realistic values)
171
+
107
172
  ## Development
108
173
 
109
174
  ```bash
110
175
  npm run build # Compile TypeScript
111
176
  npm run lint # ESLint (strict, 0 errors required)
112
177
  npm run format:check # Prettier check
113
- npm test -- --run # Run 143 tests
178
+ npm test -- --run # Run 290 tests
114
179
  npm run typecheck # Type-check without emitting
115
180
  ```
116
181
 
117
- ## Implementation Status
182
+ ## Requirements
183
+
184
+ - **Node.js** 18 or higher
185
+ - **@compilr-dev/sdk** ^0.1.12 (peer dependency)
118
186
 
119
- | Phase | Status | Description |
120
- |-------|--------|-------------|
121
- | 1 | | Types, validation, naming, defaults |
122
- | 2 | ✅ | Model operations, persistence, 3 tools |
123
- | 3 | 🔲 | Factory infrastructure (toolkit registry, scaffold tool) |
124
- | 4 | 🔲 | React+Node toolkit (~37 file generators) |
125
- | 5 | 🔲 | Skill prompt (factory-scaffold) |
126
- | 6 | 🔲 | SDK integration (DocumentType extension) |
127
- | 7 | 🔲 | CLI integration |
187
+ ## Related Packages
188
+
189
+ | Package | Description |
190
+ |---------|-------------|
191
+ | [@compilr-dev/sdk](https://www.npmjs.com/package/@compilr-dev/sdk) | Universal agent runtime |
192
+ | [@compilr-dev/agents](https://www.npmjs.com/package/@compilr-dev/agents) | Multi-LLM agent library |
193
+ | [@compilr-dev/agents-coding](https://www.npmjs.com/package/@compilr-dev/agents-coding) | Coding-specific tools and language analysis |
194
+ | [@compilr-dev/cli](https://www.npmjs.com/package/@compilr-dev/cli) | AI-powered coding assistant for your terminal |
195
+
196
+ ## Links
197
+
198
+ - [Website](https://compilr.dev)
199
+ - [npm Package](https://www.npmjs.com/package/@compilr-dev/factory)
200
+ - [Report Issues](https://github.com/compilr-dev/factory/issues)
128
201
 
129
202
  ## License
130
203
 
131
- MIT
204
+ [FSL-1.1-MIT](https://fsl.software/) - See [LICENSE](LICENSE) for details. Converts to MIT after 2 years per version.
205
+
206
+ ---
207
+
208
+ <p align="center">
209
+ <strong>Built with care by <a href="https://compilr.dev">compilr.dev</a></strong>
210
+ </p>
@@ -33,7 +33,7 @@ You have access to these tools:
33
33
  Before building the model, understand the project:
34
34
 
35
35
  1. Check for existing context:
36
- - Use \`project_document_get_by_type\` to look for PRD, architecture, and design docs
36
+ - Use \`project_document_get\` to look for PRD, architecture, and design docs
37
37
  - Read any existing Application Model with \`app_model_get\`
38
38
 
39
39
  2. If NO model exists, gather requirements from the user:
@@ -9,8 +9,9 @@ import { createListToolkitsTool } from './list-toolkits-tool.js';
9
9
  import { defaultRegistry } from './registry.js';
10
10
  export function createFactoryTools(config) {
11
11
  const registry = config.registry ?? defaultRegistry;
12
+ const validToolkitIds = registry.list().map((t) => t.id);
12
13
  return [
13
- ...createModelTools(config),
14
+ ...createModelTools({ ...config, validToolkitIds }),
14
15
  createScaffoldTool({ ...config, registry }),
15
16
  createListToolkitsTool(registry),
16
17
  ];
package/dist/index.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  */
6
6
  export type { ApplicationModel, Entity, Field, FieldType, View, Relationship, RelationshipType, Identity, Layout, ShellType, Features, Theme, TechStack, Meta, } from './model/types.js';
7
7
  export { validateModel } from './model/schema.js';
8
- export type { ValidationError, ValidationResult } from './model/schema.js';
8
+ export type { ValidationError, ValidationResult, ValidateModelOptions } from './model/schema.js';
9
9
  export { createDefaultModel, createDefaultEntity, createDefaultField } from './model/defaults.js';
10
10
  export { toPascalCase, toCamelCase, toKebabCase, toPlural, isPascalCase, isCamelCase, isValidHexColor, } from './model/naming.js';
11
11
  export type { FactoryFile, FactoryResult, FactoryToolkit } from './toolkits/types.js';
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * addEntity, updateEntity, removeEntity, renameEntity, reorderEntities
5
5
  */
6
- import { isPascalCase } from './naming.js';
6
+ import { isPascalCase, toCamelCase } from './naming.js';
7
7
  function findEntity(model, name) {
8
8
  const entity = model.entities.find((e) => e.name === name);
9
9
  if (!entity) {
@@ -72,15 +72,22 @@ export function renameEntity(model, op) {
72
72
  if (entity.name === op.entity) {
73
73
  entity = { ...entity, name: op.newName };
74
74
  }
75
- // Update relationship targets
75
+ // Update relationship targets and cascade fieldName
76
76
  const hasTargetRef = entity.relationships.some((r) => r.target === op.entity);
77
77
  if (hasTargetRef) {
78
+ const oldDefaultFieldName = toCamelCase(op.entity) + 'Id';
79
+ const newDefaultFieldName = toCamelCase(op.newName) + 'Id';
78
80
  entity = {
79
81
  ...entity,
80
82
  relationships: entity.relationships.map((r) => {
81
83
  if (r.target !== op.entity)
82
84
  return r;
83
- return { ...r, target: op.newName };
85
+ const updated = { ...r, target: op.newName };
86
+ // Cascade fieldName if it matches the old default pattern (or is undefined/implicit)
87
+ if (r.fieldName === undefined || r.fieldName === oldDefaultFieldName) {
88
+ updated.fieldName = newDefaultFieldName;
89
+ }
90
+ return updated;
84
91
  }),
85
92
  };
86
93
  }
@@ -12,4 +12,7 @@ export interface ValidationResult {
12
12
  readonly valid: boolean;
13
13
  readonly errors: readonly ValidationError[];
14
14
  }
15
- export declare function validateModel(model: ApplicationModel): ValidationResult;
15
+ export interface ValidateModelOptions {
16
+ readonly validToolkitIds?: readonly string[];
17
+ }
18
+ export declare function validateModel(model: ApplicationModel, options?: ValidateModelOptions): ValidationResult;
@@ -206,7 +206,7 @@ function validateTheme(model) {
206
206
  }
207
207
  return errors;
208
208
  }
209
- function validateTechStack(model) {
209
+ function validateTechStack(model, validToolkitIds) {
210
210
  const errors = [];
211
211
  if (model.techStack.toolkit.trim().length === 0) {
212
212
  errors.push({
@@ -214,6 +214,12 @@ function validateTechStack(model) {
214
214
  message: 'Toolkit is required',
215
215
  });
216
216
  }
217
+ else if (validToolkitIds && !validToolkitIds.includes(model.techStack.toolkit)) {
218
+ errors.push({
219
+ path: 'techStack.toolkit',
220
+ message: `Unknown toolkit "${model.techStack.toolkit}". Valid toolkits: ${validToolkitIds.join(', ')}`,
221
+ });
222
+ }
217
223
  return errors;
218
224
  }
219
225
  function validateMeta(model) {
@@ -235,10 +241,7 @@ function validateMeta(model) {
235
241
  }
236
242
  return errors;
237
243
  }
238
- // =============================================================================
239
- // Public API
240
- // =============================================================================
241
- export function validateModel(model) {
244
+ export function validateModel(model, options) {
242
245
  const errors = [];
243
246
  errors.push(...validateIdentity(model));
244
247
  // Entity uniqueness
@@ -260,7 +263,7 @@ export function validateModel(model) {
260
263
  errors.push(...validateLayout(model));
261
264
  errors.push(...validateFeatures(model));
262
265
  errors.push(...validateTheme(model));
263
- errors.push(...validateTechStack(model));
266
+ errors.push(...validateTechStack(model, options?.validToolkitIds));
264
267
  errors.push(...validateMeta(model));
265
268
  return {
266
269
  valid: errors.length === 0,
@@ -10,5 +10,6 @@ import type { PlatformContext } from '@compilr-dev/sdk';
10
10
  export interface ModelToolsConfig {
11
11
  readonly context: PlatformContext;
12
12
  readonly cwd?: string;
13
+ readonly validToolkitIds?: readonly string[];
13
14
  }
14
15
  export declare function createModelTools(config: ModelToolsConfig): Tool<never>[];
@@ -222,7 +222,9 @@ EXAMPLES:
222
222
  // Apply
223
223
  const updated = applyOperation(model, operation);
224
224
  // Validate result
225
- const validation = validateModel(updated);
225
+ const validation = validateModel(updated, {
226
+ validToolkitIds: config.validToolkitIds,
227
+ });
226
228
  if (!validation.valid) {
227
229
  const msgs = validation.errors.map((e) => `${e.path}: ${e.message}`).join('; ');
228
230
  return createErrorResult(`Operation would produce invalid model: ${msgs}`);
@@ -422,7 +424,7 @@ function createAppModelValidateTool(config) {
422
424
  errors: [{ path: '', message: 'No Application Model found' }],
423
425
  });
424
426
  }
425
- const result = validateModel(model);
427
+ const result = validateModel(model, { validToolkitIds: config.validToolkitIds });
426
428
  return createSuccessResult({
427
429
  valid: result.valid,
428
430
  errors: result.errors,
@@ -69,6 +69,8 @@ function generateDataStore(model, entity) {
69
69
  for (const rel of belongsToRels(entity)) {
70
70
  typeFields.push(` ${fkFieldName(rel)}: number;`);
71
71
  }
72
+ typeFields.push(' createdAt: string;');
73
+ typeFields.push(' updatedAt: string;');
72
74
  const seedData = generateSeedData(model, entity);
73
75
  return {
74
76
  path: `server/data/${fileName}.ts`,
@@ -91,8 +93,9 @@ export function getById(id: number): ${typeName}Record | undefined {
91
93
  return items.find((item) => item.id === id);
92
94
  }
93
95
 
94
- export function create(data: Omit<${typeName}Record, 'id'>): ${typeName}Record {
95
- const item = { ...data, id: nextId++ };
96
+ export function create(data: Omit<${typeName}Record, 'id' | 'createdAt' | 'updatedAt'>): ${typeName}Record {
97
+ const now = new Date().toISOString();
98
+ const item = { ...data, id: nextId++, createdAt: now, updatedAt: now };
96
99
  items.push(item);
97
100
  return item;
98
101
  }
@@ -100,7 +103,7 @@ export function create(data: Omit<${typeName}Record, 'id'>): ${typeName}Record {
100
103
  export function update(id: number, data: Partial<${typeName}Record>): ${typeName}Record | undefined {
101
104
  const index = items.findIndex((item) => item.id === id);
102
105
  if (index === -1) return undefined;
103
- items[index] = { ...items[index], ...data, id };
106
+ items[index] = { ...items[index], ...data, id, updatedAt: new Date().toISOString() };
104
107
  return items[index];
105
108
  }
106
109
 
@@ -7,3 +7,7 @@
7
7
  import type { ApplicationModel } from '../../model/types.js';
8
8
  import type { FactoryFile } from '../types.js';
9
9
  export declare function generateConfigFiles(model: ApplicationModel): FactoryFile[];
10
+ declare function hexToHsl(hex: string): [number, number, number];
11
+ declare function hslToHex(h: number, s: number, l: number): string;
12
+ declare function generateColorShades(hex: string): string;
13
+ export { hexToHsl, hslToHex, generateColorShades };
@@ -43,6 +43,7 @@ function generatePackageJson(appSlug) {
43
43
  cors: '^2.8.5',
44
44
  express: '^4.21.1',
45
45
  postcss: '^8.4.49',
46
+ '@tailwindcss/forms': '^0.5.9',
46
47
  tailwindcss: '^3.4.15',
47
48
  tsx: '^4.19.2',
48
49
  typescript: '^5.6.3',
@@ -71,18 +72,20 @@ export default defineConfig({
71
72
  function generateTailwindConfig(model) {
72
73
  return {
73
74
  path: 'tailwind.config.js',
74
- content: `/** @type {import('tailwindcss').Config} */
75
+ content: `import forms from '@tailwindcss/forms';
76
+
77
+ /** @type {import('tailwindcss').Config} */
75
78
  export default {
76
79
  content: ['./index.html', './src/**/*.{ts,tsx}'],
77
80
  darkMode: 'class',
78
81
  theme: {
79
82
  extend: {
80
83
  colors: {
81
- primary: '${model.theme.primaryColor}',
84
+ primary: ${generateColorShades(model.theme.primaryColor)},
82
85
  },
83
86
  },
84
87
  },
85
- plugins: [],
88
+ plugins: [forms],
86
89
  };
87
90
  `,
88
91
  };
@@ -106,6 +109,90 @@ function generateTsConfig() {
106
109
  };
107
110
  return { path: 'tsconfig.json', content: JSON.stringify(config, null, 2) + '\n' };
108
111
  }
112
+ // =============================================================================
113
+ // Color Shade Utilities
114
+ // =============================================================================
115
+ const SHADE_LIGHTNESS = {
116
+ '50': 97,
117
+ '100': 94,
118
+ '200': 86,
119
+ '300': 77,
120
+ '400': 66,
121
+ '500': 55,
122
+ '600': 44,
123
+ '700': 36,
124
+ '800': 27,
125
+ '900': 20,
126
+ '950': 14,
127
+ };
128
+ function hexToHsl(hex) {
129
+ const raw = hex.replace('#', '');
130
+ const r = parseInt(raw.substring(0, 2), 16) / 255;
131
+ const g = parseInt(raw.substring(2, 4), 16) / 255;
132
+ const b = parseInt(raw.substring(4, 6), 16) / 255;
133
+ const max = Math.max(r, g, b);
134
+ const min = Math.min(r, g, b);
135
+ const l = (max + min) / 2;
136
+ if (max === min)
137
+ return [0, 0, Math.round(l * 100)];
138
+ const d = max - min;
139
+ const s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
140
+ let h = 0;
141
+ if (max === r)
142
+ h = ((g - b) / d + (g < b ? 6 : 0)) / 6;
143
+ else if (max === g)
144
+ h = ((b - r) / d + 2) / 6;
145
+ else
146
+ h = ((r - g) / d + 4) / 6;
147
+ return [Math.round(h * 360), Math.round(s * 100), Math.round(l * 100)];
148
+ }
149
+ function hslToHex(h, s, l) {
150
+ const sN = s / 100;
151
+ const lN = l / 100;
152
+ const c = (1 - Math.abs(2 * lN - 1)) * sN;
153
+ const x = c * (1 - Math.abs(((h / 60) % 2) - 1));
154
+ const m = lN - c / 2;
155
+ let r = 0, g = 0, b = 0;
156
+ if (h < 60)
157
+ [r, g, b] = [c, x, 0];
158
+ else if (h < 120)
159
+ [r, g, b] = [x, c, 0];
160
+ else if (h < 180)
161
+ [r, g, b] = [0, c, x];
162
+ else if (h < 240)
163
+ [r, g, b] = [0, x, c];
164
+ else if (h < 300)
165
+ [r, g, b] = [x, 0, c];
166
+ else
167
+ [r, g, b] = [c, 0, x];
168
+ const toHex = (v) => Math.round((v + m) * 255)
169
+ .toString(16)
170
+ .padStart(2, '0');
171
+ return `#${toHex(r)}${toHex(g)}${toHex(b)}`;
172
+ }
173
+ function generateColorShades(hex) {
174
+ const [h, s] = hexToHsl(hex);
175
+ const entries = [];
176
+ for (const [shade, lightness] of Object.entries(SHADE_LIGHTNESS)) {
177
+ entries.push(` ${shade}: '${hslToHex(h, s, lightness)}',`);
178
+ }
179
+ // Find the shade closest to the original for DEFAULT
180
+ const [, , originalL] = hexToHsl(hex);
181
+ let closestShade = '500';
182
+ let closestDiff = Infinity;
183
+ for (const [shade, lightness] of Object.entries(SHADE_LIGHTNESS)) {
184
+ const diff = Math.abs(lightness - originalL);
185
+ if (diff < closestDiff) {
186
+ closestDiff = diff;
187
+ closestShade = shade;
188
+ }
189
+ }
190
+ const defaultHex = hslToHex(h, s, SHADE_LIGHTNESS[closestShade]);
191
+ entries.push(` DEFAULT: '${defaultHex}',`);
192
+ return `{\n${entries.join('\n')}\n }`;
193
+ }
194
+ // Export for testing
195
+ export { hexToHsl, hslToHex, generateColorShades };
109
196
  function generatePostCssConfig() {
110
197
  return {
111
198
  path: 'postcss.config.js',
@@ -7,16 +7,21 @@ import { toKebabCase, toCamelCase } from '../../model/naming.js';
7
7
  export function generateDashboard(model) {
8
8
  if (!model.features.dashboard)
9
9
  return [];
10
+ const typeImports = model.entities.map((e) => e.name).join(', ');
11
+ // State: counts + recent items
12
+ const stateLines = model.entities
13
+ .map((e) => {
14
+ const camel = toCamelCase(e.name);
15
+ return ` const [${camel}Count, set${e.name}Count] = useState(0);\n const [recent${e.name}s, setRecent${e.name}s] = useState<${e.name}[]>([]);`;
16
+ })
17
+ .join('\n');
18
+ // Fetch: counts + recent items
10
19
  const fetchCalls = model.entities
11
20
  .map((e) => {
12
21
  const apiUrl = '/api/' + toKebabCase(e.pluralName).toLowerCase();
13
- return ` fetch('${apiUrl}').then(r => r.json()).then((d: ${e.name}[]) => set${e.name}Count(d.length)),`;
22
+ return ` fetch('${apiUrl}').then(r => r.json()).then((d: ${e.name}[]) => { set${e.name}Count(d.length); setRecent${e.name}s(d.slice(-5).reverse()); }),`;
14
23
  })
15
24
  .join('\n');
16
- const stateLines = model.entities
17
- .map((e) => ` const [${toCamelCase(e.name)}Count, set${e.name}Count] = useState(0);`)
18
- .join('\n');
19
- const typeImports = model.entities.map((e) => e.name).join(', ');
20
25
  const cards = model.entities
21
26
  .map((e) => {
22
27
  const path = '/' + toKebabCase(e.pluralName).toLowerCase();
@@ -27,6 +32,21 @@ export function generateDashboard(model) {
27
32
  </Link>`;
28
33
  })
29
34
  .join('\n');
35
+ // Find first string field per entity for display name
36
+ const recentRows = model.entities
37
+ .map((e) => {
38
+ const firstStringField = e.fields.find((f) => f.type === 'string');
39
+ const displayExpr = firstStringField ? `item.${firstStringField.name}` : `String(item.id)`;
40
+ const path = '/' + toKebabCase(e.pluralName).toLowerCase();
41
+ return ` {recent${e.name}s.map((item) => (
42
+ <tr key={item.id}>
43
+ <td className="px-4 py-2 text-sm">${e.icon} ${e.name}</td>
44
+ <td className="px-4 py-2 text-sm"><Link to={\`${path}/\${String(item.id)}\`} className="text-primary hover:underline">{${displayExpr}}</Link></td>
45
+ <td className="px-4 py-2 text-sm text-gray-500">{String(item.id)}</td>
46
+ </tr>
47
+ ))}`;
48
+ })
49
+ .join('\n');
30
50
  return [
31
51
  {
32
52
  path: 'src/pages/Dashboard.tsx',
@@ -51,6 +71,22 @@ ${fetchCalls}
51
71
  <div className="grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-${String(Math.min(model.entities.length, 4))}">
52
72
  ${cards}
53
73
  </div>
74
+
75
+ <h2 className="mb-4 mt-8 text-xl font-bold text-gray-900 dark:text-white">Recent Activity</h2>
76
+ <div className="overflow-x-auto rounded-lg border border-gray-200 dark:border-gray-700">
77
+ <table className="w-full text-left">
78
+ <thead className="bg-gray-50 dark:bg-gray-800">
79
+ <tr>
80
+ <th className="px-4 py-2 text-sm font-medium text-gray-500 dark:text-gray-400">Type</th>
81
+ <th className="px-4 py-2 text-sm font-medium text-gray-500 dark:text-gray-400">Name</th>
82
+ <th className="px-4 py-2 text-sm font-medium text-gray-500 dark:text-gray-400">ID</th>
83
+ </tr>
84
+ </thead>
85
+ <tbody className="divide-y divide-gray-200 dark:divide-gray-700">
86
+ ${recentRows}
87
+ </tbody>
88
+ </table>
89
+ </div>
54
90
  </div>
55
91
  );
56
92
  }
@@ -253,6 +253,14 @@ export default function ${entity.name}Detail() {
253
253
 
254
254
  <dl className="grid grid-cols-1 gap-4 sm:grid-cols-2">
255
255
  ${fieldRows}
256
+ <div>
257
+ <dt className="text-sm font-medium text-gray-500 dark:text-gray-400">Created</dt>
258
+ <dd className="mt-1 text-gray-900 dark:text-white">{new Date(item.createdAt).toLocaleString()}</dd>
259
+ </div>
260
+ <div>
261
+ <dt className="text-sm font-medium text-gray-500 dark:text-gray-400">Last Updated</dt>
262
+ <dd className="mt-1 text-gray-900 dark:text-white">{new Date(item.updatedAt).toLocaleString()}</dd>
263
+ </div>
256
264
  ${relLinks}
257
265
  </dl>${hasManyRender}
258
266
  </div>
@@ -7,6 +7,7 @@ import { toKebabCase } from '../../model/naming.js';
7
7
  export function generateRouter(model) {
8
8
  const imports = [];
9
9
  const routes = [];
10
+ const topLevelRoutes = [];
10
11
  // Layout import
11
12
  imports.push("import Layout from './components/layout/Layout';");
12
13
  // Dashboard
@@ -28,6 +29,24 @@ export function generateRouter(model) {
28
29
  routes.push(` { path: '${routeBase}/:id', element: <${entity.name}Detail /> },`);
29
30
  routes.push(` { path: '${routeBase}/:id/edit', element: <${entity.name}Form /> },`);
30
31
  }
32
+ // Settings route (inside Layout)
33
+ if (model.features.settings) {
34
+ imports.push("import Settings from './pages/Settings';");
35
+ routes.push(" { path: 'settings', element: <Settings /> },");
36
+ }
37
+ // Profile route (inside Layout)
38
+ if (model.features.userProfiles) {
39
+ imports.push("import Profile from './pages/Profile';");
40
+ routes.push(" { path: 'profile', element: <Profile /> },");
41
+ }
42
+ // Auth routes (top-level, outside Layout)
43
+ if (model.features.auth) {
44
+ imports.push("import Login from './pages/Login';");
45
+ imports.push("import Register from './pages/Register';");
46
+ topLevelRoutes.push(" { path: '/login', element: <Login /> },");
47
+ topLevelRoutes.push(" { path: '/register', element: <Register /> },");
48
+ }
49
+ const topLevelSection = topLevelRoutes.length > 0 ? '\n' + topLevelRoutes.join('\n') : '';
31
50
  return [
32
51
  {
33
52
  path: 'src/router.tsx',
@@ -41,7 +60,7 @@ export const router = createBrowserRouter([
41
60
  children: [
42
61
  ${routes.join('\n')}
43
62
  ],
44
- },
63
+ },${topLevelSection}
45
64
  ]);
46
65
  `,
47
66
  },
@@ -136,6 +136,13 @@ export function generateSeedData(model, entity) {
136
136
  const targetCount = targetEntity ? SEED_COUNT : SEED_COUNT;
137
137
  lines.push(` ${fk}: ${String((i % targetCount) + 1)},`);
138
138
  }
139
+ // Implicit timestamps (deterministic)
140
+ const createdDate = new Date('2025-06-01T10:00:00Z');
141
+ createdDate.setDate(createdDate.getDate() + i * 2);
142
+ const updatedDate = new Date(createdDate);
143
+ updatedDate.setDate(updatedDate.getDate() + i);
144
+ lines.push(` createdAt: '${createdDate.toISOString()}',`);
145
+ lines.push(` updatedAt: '${updatedDate.toISOString()}',`);
139
146
  lines.push(' },');
140
147
  }
141
148
  lines.push('];');
@@ -5,7 +5,22 @@
5
5
  */
6
6
  import { toKebabCase } from '../../model/naming.js';
7
7
  export function generateShellFiles(model) {
8
- return [generateApp(model), generateLayout(model), generateSidebar(model), generateHeader(model)];
8
+ const files = [
9
+ generateApp(model),
10
+ generateLayout(model),
11
+ generateSidebar(model),
12
+ generateHeader(model),
13
+ ];
14
+ if (model.features.settings) {
15
+ files.push(generateSettingsPage());
16
+ }
17
+ if (model.features.auth) {
18
+ files.push(...generateAuthPages());
19
+ }
20
+ if (model.features.userProfiles) {
21
+ files.push(generateProfilePage());
22
+ }
23
+ return files;
9
24
  }
10
25
  function generateApp(_model) {
11
26
  return {
@@ -63,15 +78,21 @@ export default function Layout() {
63
78
  };
64
79
  }
65
80
  function generateSidebar(model) {
66
- const navItems = model.entities
67
- .map((e) => {
81
+ const items = [];
82
+ if (model.features.dashboard) {
83
+ items.push(" { label: '\u{1F4CA} Dashboard', path: '/' },");
84
+ }
85
+ for (const e of model.entities) {
68
86
  const path = '/' + toKebabCase(e.pluralName).toLowerCase();
69
- return ` { label: '${e.icon} ${e.pluralName}', path: '${path}' },`;
70
- })
71
- .join('\n');
87
+ items.push(` { label: '${e.icon} ${e.pluralName}', path: '${path}' },`);
88
+ }
89
+ if (model.features.settings) {
90
+ items.push(" { label: '\u2699\uFE0F Settings', path: '/settings' },");
91
+ }
92
+ const navItems = items.join('\n');
72
93
  return {
73
94
  path: 'src/components/layout/Sidebar.tsx',
74
- content: `import { useState } from 'react';
95
+ content: `import { useState, useEffect } from 'react';
75
96
  import { Link, useLocation } from 'react-router-dom';
76
97
 
77
98
  const navItems = [
@@ -79,9 +100,15 @@ ${navItems}
79
100
  ];
80
101
 
81
102
  export default function Sidebar() {
82
- const [collapsed, setCollapsed] = useState(false);
103
+ const [collapsed, setCollapsed] = useState(window.innerWidth < 1024);
83
104
  const location = useLocation();
84
105
 
106
+ useEffect(() => {
107
+ const onResize = () => setCollapsed(window.innerWidth < 1024);
108
+ window.addEventListener('resize', onResize);
109
+ return () => window.removeEventListener('resize', onResize);
110
+ }, []);
111
+
85
112
  return (
86
113
  <aside
87
114
  className={\`\${collapsed ? 'w-16' : 'w-64'} flex flex-col border-r border-gray-200 bg-white transition-all dark:border-gray-700 dark:bg-gray-800\`}
@@ -121,6 +148,7 @@ export default function Sidebar() {
121
148
  };
122
149
  }
123
150
  function generateHeader(model) {
151
+ const hasSidebar = model.layout.shell === 'sidebar-header';
124
152
  const darkModeToggle = model.features.darkMode
125
153
  ? `
126
154
  <button
@@ -130,6 +158,10 @@ function generateHeader(model) {
130
158
  🌓
131
159
  </button>`
132
160
  : '';
161
+ const appNameSection = !hasSidebar
162
+ ? `
163
+ <span className="text-lg font-bold text-gray-900 dark:text-white">${model.identity.name}</span>`
164
+ : '';
133
165
  return {
134
166
  path: 'src/components/layout/Header.tsx',
135
167
  content: `import { useLocation } from 'react-router-dom';
@@ -141,7 +173,9 @@ export default function Header() {
141
173
 
142
174
  return (
143
175
  <header className="flex h-14 items-center justify-between border-b border-gray-200 bg-white px-6 dark:border-gray-700 dark:bg-gray-800">
144
- <span className="text-sm text-gray-500 dark:text-gray-400">{breadcrumb}</span>
176
+ <div className="flex items-center gap-4">${appNameSection}
177
+ <span className="text-sm text-gray-500 dark:text-gray-400">{breadcrumb}</span>
178
+ </div>
145
179
  <div className="flex items-center gap-2">${darkModeToggle}
146
180
  </div>
147
181
  </header>
@@ -150,3 +184,105 @@ export default function Header() {
150
184
  `,
151
185
  };
152
186
  }
187
+ function generateSettingsPage() {
188
+ return {
189
+ path: 'src/pages/Settings.tsx',
190
+ content: `export default function Settings() {
191
+ return (
192
+ <div>
193
+ <h1 className="mb-6 text-2xl font-bold text-gray-900 dark:text-white">Settings</h1>
194
+ <p className="text-gray-500 dark:text-gray-400">
195
+ Application settings will be configured here.
196
+ </p>
197
+ </div>
198
+ );
199
+ }
200
+ `,
201
+ };
202
+ }
203
+ function generateAuthPages() {
204
+ return [
205
+ {
206
+ path: 'src/pages/Login.tsx',
207
+ content: `import { Link } from 'react-router-dom';
208
+
209
+ export default function Login() {
210
+ return (
211
+ <div className="flex min-h-screen items-center justify-center bg-gray-50 dark:bg-gray-900">
212
+ <div className="w-full max-w-md rounded-lg border border-gray-200 bg-white p-8 shadow-sm dark:border-gray-700 dark:bg-gray-800">
213
+ <h1 className="mb-6 text-2xl font-bold text-gray-900 dark:text-white">Login</h1>
214
+ <form className="space-y-4">
215
+ <div>
216
+ <label className="block text-sm font-medium text-gray-700 dark:text-gray-300">Email</label>
217
+ <input type="email" className="mt-1 block w-full rounded border border-gray-300 px-3 py-2 dark:border-gray-600 dark:bg-gray-700 dark:text-white" />
218
+ </div>
219
+ <div>
220
+ <label className="block text-sm font-medium text-gray-700 dark:text-gray-300">Password</label>
221
+ <input type="password" className="mt-1 block w-full rounded border border-gray-300 px-3 py-2 dark:border-gray-600 dark:bg-gray-700 dark:text-white" />
222
+ </div>
223
+ <button type="submit" className="w-full rounded bg-primary px-4 py-2 text-white hover:bg-primary/90">
224
+ Sign In
225
+ </button>
226
+ </form>
227
+ <p className="mt-4 text-center text-sm text-gray-500 dark:text-gray-400">
228
+ Don&apos;t have an account? <Link to="/register" className="text-primary hover:underline">Register</Link>
229
+ </p>
230
+ </div>
231
+ </div>
232
+ );
233
+ }
234
+ `,
235
+ },
236
+ {
237
+ path: 'src/pages/Register.tsx',
238
+ content: `import { Link } from 'react-router-dom';
239
+
240
+ export default function Register() {
241
+ return (
242
+ <div className="flex min-h-screen items-center justify-center bg-gray-50 dark:bg-gray-900">
243
+ <div className="w-full max-w-md rounded-lg border border-gray-200 bg-white p-8 shadow-sm dark:border-gray-700 dark:bg-gray-800">
244
+ <h1 className="mb-6 text-2xl font-bold text-gray-900 dark:text-white">Register</h1>
245
+ <form className="space-y-4">
246
+ <div>
247
+ <label className="block text-sm font-medium text-gray-700 dark:text-gray-300">Name</label>
248
+ <input type="text" className="mt-1 block w-full rounded border border-gray-300 px-3 py-2 dark:border-gray-600 dark:bg-gray-700 dark:text-white" />
249
+ </div>
250
+ <div>
251
+ <label className="block text-sm font-medium text-gray-700 dark:text-gray-300">Email</label>
252
+ <input type="email" className="mt-1 block w-full rounded border border-gray-300 px-3 py-2 dark:border-gray-600 dark:bg-gray-700 dark:text-white" />
253
+ </div>
254
+ <div>
255
+ <label className="block text-sm font-medium text-gray-700 dark:text-gray-300">Password</label>
256
+ <input type="password" className="mt-1 block w-full rounded border border-gray-300 px-3 py-2 dark:border-gray-600 dark:bg-gray-700 dark:text-white" />
257
+ </div>
258
+ <button type="submit" className="w-full rounded bg-primary px-4 py-2 text-white hover:bg-primary/90">
259
+ Create Account
260
+ </button>
261
+ </form>
262
+ <p className="mt-4 text-center text-sm text-gray-500 dark:text-gray-400">
263
+ Already have an account? <Link to="/login" className="text-primary hover:underline">Login</Link>
264
+ </p>
265
+ </div>
266
+ </div>
267
+ );
268
+ }
269
+ `,
270
+ },
271
+ ];
272
+ }
273
+ function generateProfilePage() {
274
+ return {
275
+ path: 'src/pages/Profile.tsx',
276
+ content: `export default function Profile() {
277
+ return (
278
+ <div>
279
+ <h1 className="mb-6 text-2xl font-bold text-gray-900 dark:text-white">Profile</h1>
280
+ <p className="text-gray-500 dark:text-gray-400">
281
+ User profile information will be displayed here.
282
+ </p>
283
+ </div>
284
+ );
285
+ }
286
+ `,
287
+ };
288
+ }
@@ -32,12 +32,26 @@ VITE_API_URL=http://localhost:3001
32
32
  };
33
33
  }
34
34
  function generateReadme(model) {
35
+ let entitiesSection = '';
36
+ if (model.entities.length > 0) {
37
+ const entityLines = model.entities
38
+ .map((e) => {
39
+ const relCount = e.relationships.length;
40
+ const parts = [`${String(e.fields.length)} fields`];
41
+ if (relCount > 0) {
42
+ parts.push(`${String(relCount)} relationship${relCount > 1 ? 's' : ''}`);
43
+ }
44
+ return `- **${e.name}** (${e.icon}) — ${parts.join(', ')}`;
45
+ })
46
+ .join('\n');
47
+ entitiesSection = `\n## Entities\n\n${entityLines}\n`;
48
+ }
35
49
  return {
36
50
  path: 'README.md',
37
51
  content: `# ${model.identity.name}
38
52
 
39
53
  ${model.identity.description}
40
-
54
+ ${entitiesSection}
41
55
  ## Getting Started
42
56
 
43
57
  \`\`\`bash
@@ -26,6 +26,9 @@ function generateInterface(entity) {
26
26
  lines.push(` ${fk}: number;`);
27
27
  lines.push(` ${rel.target.charAt(0).toLowerCase() + rel.target.slice(1)}?: ${rel.target};`);
28
28
  }
29
+ // Implicit timestamps
30
+ lines.push(' createdAt: string;');
31
+ lines.push(' updatedAt: string;');
29
32
  lines.push('}');
30
33
  return lines.join('\n');
31
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compilr-dev/factory",
3
- "version": "0.1.3",
3
+ "version": "0.1.6",
4
4
  "description": "AI-driven application scaffolder for the compilr-dev ecosystem",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -37,7 +37,7 @@
37
37
  "typescript-eslint": "^8.18.1",
38
38
  "vitest": "^2.1.8"
39
39
  },
40
- "license": "MIT",
40
+ "license": "FSL-1.1-MIT",
41
41
  "repository": {
42
42
  "type": "git",
43
43
  "url": "https://github.com/scozzola/compilr-dev-factory"