create-auto-app 0.9.11 → 0.9.13
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/dist/index.d.ts +12 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +98 -19
- package/dist/index.js.map +1 -1
- package/dist/index.specs.d.ts +2 -0
- package/dist/index.specs.d.ts.map +1 -0
- package/dist/index.specs.js +267 -0
- package/dist/index.specs.js.map +1 -0
- package/package.json +7 -4
- package/templates/finance-app/.context/design-system.md +142 -0
- package/templates/finance-app/.context/figma-variables.json +13759 -0
- package/templates/finance-app/.context/shadcn-filter.ts +29 -0
- package/templates/finance-app/auto.config.ts +180 -0
- package/templates/finance-app/flows/app-homepage.flow.ts +84 -0
- package/templates/finance-app/flows/landing-page.flow.ts +34 -0
- package/templates/finance-app/package.json +30 -0
- package/templates/finance-app/pnpm-lock.yaml +12518 -0
- package/templates/finance-app/pnpm-workspace.yaml +2 -0
- package/templates/finance-app/tsconfig.base.json +17 -0
- package/templates/finance-app/tsconfig.json +17 -0
- package/templates/finance-app/turbo.json +19 -0
- package/templates/questionnaires/auto.config.ts +158 -0
- package/templates/questionnaires/flows/questionnaires.flow.ts +359 -0
- package/templates/questionnaires/package.json +30 -0
- package/templates/questionnaires/template.json +7 -0
- package/templates/questionnaires/tsconfig.json +15 -0
- package/templates/shopping-app/auto.config.ts +2 -0
- package/templates/shopping-app/template.json +7 -0
- package/templates/.gitkeep +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export function filter(components) {
|
|
2
|
+
const seen = new Set<string>();
|
|
3
|
+
|
|
4
|
+
return components
|
|
5
|
+
.map((comp) => {
|
|
6
|
+
if (!comp?.name) return null;
|
|
7
|
+
|
|
8
|
+
let str = comp.name.trim();
|
|
9
|
+
|
|
10
|
+
// Normalize the name
|
|
11
|
+
str = str.includes('/') ? str.split('/')[0].trim() : str.split(' ')[0].trim();
|
|
12
|
+
|
|
13
|
+
if (!str) return null;
|
|
14
|
+
|
|
15
|
+
// Capitalize first letter
|
|
16
|
+
str = str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
|
|
17
|
+
|
|
18
|
+
return {
|
|
19
|
+
...comp,
|
|
20
|
+
name: str.toLowerCase(),
|
|
21
|
+
};
|
|
22
|
+
})
|
|
23
|
+
.filter((c) => {
|
|
24
|
+
if (!c) return false;
|
|
25
|
+
if (seen.has(c.name)) return false;
|
|
26
|
+
seen.add(c.name);
|
|
27
|
+
return true;
|
|
28
|
+
});
|
|
29
|
+
}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { autoConfig, on, dispatch, fold } from '@auto-engineer/cli';
|
|
2
|
+
import type { ExportSchemaCommand, ExportSchemaEvents } from '@auto-engineer/flow';
|
|
3
|
+
import type { GenerateServerCommand, GenerateServerEvents } from '@auto-engineer/server-generator-apollo-emmett';
|
|
4
|
+
import type { ImplementServerCommand, ImplementServerEvents } from '@auto-engineer/server-implementer';
|
|
5
|
+
import type {
|
|
6
|
+
CheckTestsCommand,
|
|
7
|
+
CheckTestsEvents,
|
|
8
|
+
CheckTypesCommand,
|
|
9
|
+
CheckTypesEvents,
|
|
10
|
+
CheckLintCommand,
|
|
11
|
+
CheckLintEvents,
|
|
12
|
+
TestsCheckFailedEvent,
|
|
13
|
+
} from '@auto-engineer/server-checks';
|
|
14
|
+
import type { GenerateIACommand, GenerateIAEvents } from '@auto-engineer/information-architect';
|
|
15
|
+
import type { ImplementClientCommand, ImplementClientEvents } from '@auto-engineer/frontend-implementer';
|
|
16
|
+
import type { GenerateClientCommand, GenerateClientEvents } from '@auto-engineer/frontend-generator-react-graphql';
|
|
17
|
+
|
|
18
|
+
export default autoConfig({
|
|
19
|
+
fileId: 'test33333', // unique 9-character base62 canvas file id where all flows in this project will be shown
|
|
20
|
+
|
|
21
|
+
plugins: [
|
|
22
|
+
'@auto-engineer/server-checks',
|
|
23
|
+
'@auto-engineer/design-system-importer',
|
|
24
|
+
'@auto-engineer/server-generator-apollo-emmett',
|
|
25
|
+
'@auto-engineer/flow',
|
|
26
|
+
'@auto-engineer/frontend-checks',
|
|
27
|
+
'@auto-engineer/frontend-implementer',
|
|
28
|
+
'@auto-engineer/information-architect',
|
|
29
|
+
'@auto-engineer/frontend-generator-react-graphql',
|
|
30
|
+
'@auto-engineer/server-implementer',
|
|
31
|
+
],
|
|
32
|
+
aliases: {
|
|
33
|
+
// Resolve command name conflicts between packages
|
|
34
|
+
// 'test:types': checkTypesCommandHandler,
|
|
35
|
+
},
|
|
36
|
+
pipeline: () => {
|
|
37
|
+
on<ExportSchemaEvents>('SchemaExported', () =>
|
|
38
|
+
dispatch<GenerateIACommand>({
|
|
39
|
+
type: 'GenerateIA',
|
|
40
|
+
data: {
|
|
41
|
+
outputDir: './.context',
|
|
42
|
+
flowFiles: ['./flows/finance-app.flow.ts', './flows/finance-app-landing.flow.ts'],
|
|
43
|
+
},
|
|
44
|
+
}),
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
// on<GenerateServerEvents>('ServerGenerated', () =>
|
|
48
|
+
// dispatch<GenerateIACommand>({
|
|
49
|
+
// type: 'GenerateIA',
|
|
50
|
+
// data: {
|
|
51
|
+
// outputDir: './.context',
|
|
52
|
+
// flowFiles: ['./flows/finance-app.flow.ts', './flows/finance-app-landing.flow.ts'],
|
|
53
|
+
// },
|
|
54
|
+
// }),
|
|
55
|
+
// );
|
|
56
|
+
|
|
57
|
+
on<GenerateIAEvents>('IAGenerated', () =>
|
|
58
|
+
dispatch<GenerateClientCommand>({
|
|
59
|
+
type: 'GenerateClient',
|
|
60
|
+
data: {
|
|
61
|
+
starterDir: '../../packages/frontend-generator-react-graphql/shadcn-starter',
|
|
62
|
+
targetDir: './client',
|
|
63
|
+
iaSchemaPath: './.context/auto-ia-scheme.json',
|
|
64
|
+
gqlSchemaPath: './.context/schema.graphql',
|
|
65
|
+
figmaVariablesPath: './.context/figma-variables.json',
|
|
66
|
+
},
|
|
67
|
+
}),
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
on<GenerateClientEvents>('ClientGenerated', () =>
|
|
71
|
+
dispatch<ImplementClientCommand>({
|
|
72
|
+
type: 'ImplementClient',
|
|
73
|
+
data: {
|
|
74
|
+
projectDir: './client',
|
|
75
|
+
iaSchemeDir: './.context',
|
|
76
|
+
designSystemPath: './.context/design-system.md',
|
|
77
|
+
},
|
|
78
|
+
}),
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
// on<ImplementServerEvents>('SliceImplemented', () => {
|
|
82
|
+
// dispatch<CheckTestsCommand>({
|
|
83
|
+
// type: 'CheckTests',
|
|
84
|
+
// data: {
|
|
85
|
+
// targetDirectory: 'sds',
|
|
86
|
+
// scope: 'slice',
|
|
87
|
+
// },
|
|
88
|
+
// });
|
|
89
|
+
// });
|
|
90
|
+
|
|
91
|
+
// on<ImplementServerEvents>('SliceImplemented', () => {
|
|
92
|
+
// dispatch<CheckTypesCommand>({
|
|
93
|
+
// type: 'CheckTypes',
|
|
94
|
+
// data: {
|
|
95
|
+
// targetDirectory: 'sds',
|
|
96
|
+
// scope: 'slice',
|
|
97
|
+
// },
|
|
98
|
+
// });
|
|
99
|
+
// });
|
|
100
|
+
|
|
101
|
+
// on<ImplementServerEvents>('SliceImplemented', () => {
|
|
102
|
+
// dispatch<CheckLintCommand>({
|
|
103
|
+
// type: 'CheckLint',
|
|
104
|
+
// data: {
|
|
105
|
+
// targetDirectory: 'sds',
|
|
106
|
+
// scope: 'slice',
|
|
107
|
+
// fix: true,
|
|
108
|
+
// },
|
|
109
|
+
// });
|
|
110
|
+
// });
|
|
111
|
+
|
|
112
|
+
// on.settled<CheckTestsCommand, CheckTypesCommand, CheckLintCommand>(
|
|
113
|
+
// ['CheckTests', 'CheckTypes', 'CheckLint'],
|
|
114
|
+
// (events) => {
|
|
115
|
+
// const hasFailures =
|
|
116
|
+
// events.CheckTests.some((e: CheckTestsEvents) => e.type === 'TestsCheckFailed') ||
|
|
117
|
+
// events.CheckTypes.some((e: CheckTypesEvents) => e.type === 'TypeCheckFailed') ||
|
|
118
|
+
// events.CheckLint.some((e: CheckLintEvents) => e.type === 'LintCheckFailed');
|
|
119
|
+
|
|
120
|
+
// if (hasFailures) {
|
|
121
|
+
// dispatch<ImplementClientCommand>({
|
|
122
|
+
// type: 'ImplementClient',
|
|
123
|
+
// data: {
|
|
124
|
+
// projectDir: 'some/where',
|
|
125
|
+
// iaSchemeDir: '/',
|
|
126
|
+
// designSystemPath: '',
|
|
127
|
+
// failures: [],
|
|
128
|
+
// },
|
|
129
|
+
// });
|
|
130
|
+
// }
|
|
131
|
+
// },
|
|
132
|
+
// );
|
|
133
|
+
},
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
/*
|
|
137
|
+
|
|
138
|
+
rm -rf server client .context/schema.json .context/schema.graphql .context/auto-ia-scheme.json
|
|
139
|
+
pnpm auto export:schema
|
|
140
|
+
pnpm auto generate:ia --output-dir=./.context --flow-files=./flows/questionnaires.flow.ts
|
|
141
|
+
pnpm auto generate:server --schema-path=./.context/schema.json --destination=.
|
|
142
|
+
pnpm auto generate:client --starter-dir=../../packages/frontend-generator-react-graphql/shadcn-starter --target-dir=./client --ia-schema-path=./.context/auto-ia-scheme.json --gql-schema-path=./.context/schema.graphql --figma-variables-path=./.context/figma-variables.json
|
|
143
|
+
pnpm auto implement:client --project-dir=./questionnaires/client --ia-scheme-dir=./questionnaires/.context --design-system-path=./questionnaires/.context/design-system.md
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
// make this emit one slice at a time
|
|
147
|
+
pnpm auto generate:server --schema-path=./.context/schema.json --destination=.
|
|
148
|
+
|
|
149
|
+
// TODO remove the AI part and make it mathematical
|
|
150
|
+
pnpm auto generate:client --starter-dir=/Users/sam/WebstormProjects/top/auto-engineer/packages/frontend-generator-react-graphql/shadcn-starter --target-dir=./client --ia-schema-path=./.context/auto-ia-scheme.json --gql-schema-path=./.context/schema.graphql --figma-variables-path=./.context/figma-variables.json
|
|
151
|
+
|
|
152
|
+
// run this per slice in parallel
|
|
153
|
+
pnpm auto implement:slice --slice-path=./questionnaires/server/src/domain/flows/questionnaires/submits-the-questionnaire
|
|
154
|
+
// add checks
|
|
155
|
+
// add retry logic tore-implement failed slices with a retry count
|
|
156
|
+
|
|
157
|
+
// slice these up
|
|
158
|
+
pnpm auto implement:client --project-dir=./questionnaires/client --ia-scheme-dir=./questionnaires/.context --design-system-path=./questionnaires/.context/design-system.md
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
// implement atoms in parallel - how do I know all atoms are done?
|
|
162
|
+
// implement molecules in parallel - how do I know all molecules are done?
|
|
163
|
+
// implement organisms in parallel - how do I know all organisms are done?
|
|
164
|
+
// implement pages in parallel - how do I know all pages are done?
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
// generate slice > implement slice > check slice > retry failure 3 times >
|
|
168
|
+
// generate slice > implement slice > check slice > retry failure 3 times >
|
|
169
|
+
// generate slice > implement slice > check slice > retry failure 3 times >
|
|
170
|
+
|
|
171
|
+
cd ~/WebstormProjects/top/auto-engineer/examples/questionnaires &&\
|
|
172
|
+
pnpm -w build &&\
|
|
173
|
+
rm -rf server client .context/schema.json .context/schema.graphql .context/auto-ia-scheme.json &&\
|
|
174
|
+
DEBUG=* pnpm auto export:schema &&\
|
|
175
|
+
DEBUG=* pnpm auto generate:server --schema-path=./.context/schema.json --destination=. &&\
|
|
176
|
+
DEBUG=* pnpm auto generate:ia --output-dir=./.context --flow-files=./flows/questionnaires.flow.ts &&\
|
|
177
|
+
DEBUG=* pnpm auto generate:client --starter-dir=../../packages/frontend-generator-react-graphql/shadcn-starter --target-dir=./client --ia-schema-path=./.context/auto-ia-scheme.json --gql-schema-path=./.context/schema.graphql --figma-variables-path=./.context/figma-variables.json
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
*/
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { experience, flow, specs, should } from '@auto-engineer/flow';
|
|
2
|
+
|
|
3
|
+
flow('Micro Personal Finance App', () => {
|
|
4
|
+
// Main App Shell with sidebar layout
|
|
5
|
+
experience('App Structure').client(() => {
|
|
6
|
+
specs(() => {
|
|
7
|
+
should('display persistent sidebar on left for navigation');
|
|
8
|
+
should('sidebar includes links: Home, Add Expense, Charts, Subscriptions, Savings Jar, Budget, Expense History');
|
|
9
|
+
should('highlight current active link in sidebar');
|
|
10
|
+
should('sidebar collapsible for smaller screens');
|
|
11
|
+
should('top bar includes app logo, profile menu, and notifications icon');
|
|
12
|
+
should(
|
|
13
|
+
'bottom or top persistent bar shows global widgets: total spending, remaining budget, savings jar progress',
|
|
14
|
+
);
|
|
15
|
+
should('content area changes dynamically based on selected navigation link');
|
|
16
|
+
should('maintain layout consistency across all screens');
|
|
17
|
+
should('support responsive design with sidebar collapsing into hamburger menu on mobile');
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
// Experiences under App Shell
|
|
22
|
+
experience('Home Screen').client(() => {
|
|
23
|
+
specs(() => {
|
|
24
|
+
should('show today’s spending summary and remaining budget');
|
|
25
|
+
should('display recent expenses list');
|
|
26
|
+
should('show visual progress of savings jar goal');
|
|
27
|
+
should('quick access buttons for Add Expense, Charts, Subscriptions');
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
experience('Add Expense').client(() => {
|
|
32
|
+
specs(() => {
|
|
33
|
+
should('allow entering expense amount, category, and note');
|
|
34
|
+
should('show recent/frequent categories for quick selection');
|
|
35
|
+
should('display confirmation toast after adding expense');
|
|
36
|
+
should('update budget bar and charts in real-time');
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
experience('Spending Charts').client(() => {
|
|
41
|
+
specs(() => {
|
|
42
|
+
should('show daily and weekly spending charts');
|
|
43
|
+
should('highlight categories with highest spend');
|
|
44
|
+
should('allow filtering by category or date range');
|
|
45
|
+
should('update dynamically when new expenses are added');
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
experience('Manage Subscriptions').client(() => {
|
|
50
|
+
specs(() => {
|
|
51
|
+
should('list all active subscriptions with amount and renewal date');
|
|
52
|
+
should('allow adding, editing, and removing subscriptions');
|
|
53
|
+
should('show monthly summary of subscription spending');
|
|
54
|
+
should('highlight upcoming renewals');
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
experience('Round-Up Savings Jar').client(() => {
|
|
59
|
+
specs(() => {
|
|
60
|
+
should('show current total and goal progress');
|
|
61
|
+
should('allow changing the savings goal');
|
|
62
|
+
should('automatically round up new expenses');
|
|
63
|
+
should('display visual progress bar consistently in shell');
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
experience('Budget Tracker').client(() => {
|
|
68
|
+
specs(() => {
|
|
69
|
+
should('allow setting monthly/weekly budget');
|
|
70
|
+
should('show remaining budget as a progress bar');
|
|
71
|
+
should('highlight overspending');
|
|
72
|
+
should('update in real-time when expenses are added');
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
experience('Expense Detail').client(() => {
|
|
77
|
+
specs(() => {
|
|
78
|
+
should('allow viewing full expense history');
|
|
79
|
+
should('filter by category, date, or amount');
|
|
80
|
+
should('edit or delete individual expenses');
|
|
81
|
+
should('show contribution of each expense to daily/weekly/monthly totals');
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { experience, flow, should, specs } from '@auto-engineer/flow';
|
|
2
|
+
flow('Micro Personal Finance App - Landing', 'AUTO-z8hpgv8UU', () => {
|
|
3
|
+
experience('Landing Page', 'AUTO-Ke1xAjRsI').client(() => {
|
|
4
|
+
specs('', () => {
|
|
5
|
+
should('display app name and tagline prominently at top of page');
|
|
6
|
+
should('show a hero image or illustration representing personal finance');
|
|
7
|
+
should('include a primary call-to-action button to "Get Started" or "Sign Up"');
|
|
8
|
+
should('include a secondary CTA to "Learn More"');
|
|
9
|
+
should(
|
|
10
|
+
'list core features with icons: expense tracking, subscriptions, round-up savings, budget tracking, charts',
|
|
11
|
+
);
|
|
12
|
+
should('display brief descriptions under each feature');
|
|
13
|
+
should('support horizontal scrolling or 3-column layout for desktop, stacked for mobile');
|
|
14
|
+
should('show 2-3 user testimonials with names, photos, and quotes');
|
|
15
|
+
should('highlight real benefits users have gained using the app');
|
|
16
|
+
should('display simple pricing plans: Free, Premium');
|
|
17
|
+
should('show plan features in a table or card layout');
|
|
18
|
+
should('include CTA buttons for each plan: "Start Free" or "Upgrade"');
|
|
19
|
+
should('include links to About, FAQ, Terms of Service, Privacy Policy, and Contact');
|
|
20
|
+
should('display social media icons for Twitter, LinkedIn, etc.');
|
|
21
|
+
should('support smooth scrolling to sections when clicking navigation links');
|
|
22
|
+
should('be fully responsive for desktop, tablet, and mobile');
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
experience('Onboarding', 'AUTO-krmQIPP30').client(() => {
|
|
26
|
+
specs('', () => {
|
|
27
|
+
should('allow user to set initial monthly budget');
|
|
28
|
+
should('allow adding first expense');
|
|
29
|
+
should('allow setting initial savings jar goal');
|
|
30
|
+
should('show visual progress indicators as steps are completed');
|
|
31
|
+
should('allow skipping onboarding to go directly to main app');
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "personal-finance-app",
|
|
3
|
+
"private": true,
|
|
4
|
+
"type": "module",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"auto": "node ../../packages/cli/dist/bin/auto.js",
|
|
7
|
+
"auto:debug": "DEBUG=flow:*,cli:*,auto*,ai*,-*file-syncer,-*flow* node ../../packages/cli/dist/bin/auto.js",
|
|
8
|
+
"start": "dotenv -e .env -- pnpm --parallel start"
|
|
9
|
+
},
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"@auto-engineer/cli": "workspace:*",
|
|
12
|
+
"@auto-engineer/design-system-importer": "workspace:*",
|
|
13
|
+
"@auto-engineer/flow": "workspace:*",
|
|
14
|
+
"@auto-engineer/frontend-checks": "workspace:*",
|
|
15
|
+
"@auto-engineer/frontend-generator-react-graphql": "workspace:*",
|
|
16
|
+
"@auto-engineer/frontend-implementer": "workspace:*",
|
|
17
|
+
"@auto-engineer/information-architect": "workspace:*",
|
|
18
|
+
"@auto-engineer/message-bus": "workspace:*",
|
|
19
|
+
"@auto-engineer/server-checks": "workspace:*",
|
|
20
|
+
"@auto-engineer/server-generator-apollo-emmett": "workspace:*",
|
|
21
|
+
"@auto-engineer/server-implementer": "workspace:*"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@types/node": "^24.3.1",
|
|
25
|
+
"chokidar": "^3.6.0",
|
|
26
|
+
"dotenv": "^16.4.5",
|
|
27
|
+
"dotenv-cli": "^9.0.0",
|
|
28
|
+
"tsx": "^3.12.7"
|
|
29
|
+
}
|
|
30
|
+
}
|