Skip to content

Commit 75f59df

Browse files
committed
split backend and frontend code generate
1 parent 3a71d30 commit 75f59df

File tree

4 files changed

+3
-17
lines changed

4 files changed

+3
-17
lines changed

backend/src/build-system/handlers/backend/requirements-document/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ type BackendRequirementResult = {
3030
*/
3131

3232
@BuildNode()
33-
@BuildNodeRequire([DBRequirementHandler, UXDMDHandler, DBSchemaHandler])
33+
@BuildNodeRequire([DBRequirementHandler, DBSchemaHandler])
3434
export class BackendRequirementHandler implements BuildHandler<string> {
3535
private readonly logger: Logger = new Logger('BackendRequirementHandler');
3636

backend/src/build-system/handlers/database/schemas/schemas.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ export class DBSchemaHandler implements BuildHandler {
145145
const validationResponse = await chatSyncWithClocker(
146146
context,
147147
{
148-
model: 'o3-mini-high',
148+
model: 'gpt-4o-mini',
149149
messages: [
150150
{ content: validationPrompt, role: 'system' },
151151
{

backend/src/build-system/handlers/frontend-code-generate/index.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -323,16 +323,6 @@ export class FrontendCodeHandler implements BuildHandler<string> {
323323
324324
`,
325325
},
326-
{
327-
role: 'assistant',
328-
content:
329-
"Good, now provider your API Documentation, it's okay API Documentation are empty, which means I don't need use API",
330-
},
331-
{
332-
role: 'user' as const,
333-
content: `This is the API Documentation:
334-
${backendRequirementDoc}`,
335-
},
336326
{
337327
role: 'assistant',
338328
content:

backend/src/build-system/handlers/frontend-code-generate/prompt.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,7 @@ ${theme}
2323
7. Before using an external variable/module, make sure you import it first.
2424
8. Error Handling: Implement proper error handling in API calls and interactions with external modules.
2525
9. Code Standards: Adhere to styling guidelines (e.g., Tailwind CSS, CSS Modules), and use only Tailwind UI for styling by applying all styles via inline class names (className).
26-
10. API Documentation:
27-
Mock the response if the API returns an empty or undefined value, and you don't need to explicitly show that it is mock data.
28-
If user provided, read carfully details in Api Document remeber to use correct request format then use the api.
29-
Use the correct method (GET, POST, PUT, DELETE) and endpoint. Do not use Options.
30-
The backend address is "localhost:3000". Use this address to make API calls.
26+
10. Mock the response if the API returns an empty or undefined value, and you don't need to explicitly show that it is mock data.
3127
11. Write EVERY CODE DETAIL, DON'T LEAVE TODO.
3228
12. Image Assets: If your implementation requires any images except some button logo, you can use placeholder image URLs from https://picsum.photos/<width>/<height>. Note that the width and height values (e.g., 500/300) are adjustable as needed.
3329
13. RESPONSIVE DESIGN: Ensure all components are fully responsive:

0 commit comments

Comments
 (0)