@autobe/compiler 0.29.0 → 0.29.2
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/lib/AutoBeCompiler.d.ts +2 -1
- package/lib/AutoBeCompiler.js +40 -0
- package/lib/AutoBeCompiler.js.map +1 -1
- package/lib/interface/AutoBeInterfaceCompiler.d.ts +1 -2
- package/lib/interface/AutoBeInterfaceCompiler.js +2 -9
- package/lib/interface/AutoBeInterfaceCompiler.js.map +1 -1
- package/lib/raw/AutoBeCompilerCommonTemplate.d.ts +1 -0
- package/lib/raw/AutoBeCompilerCommonTemplate.js +11 -0
- package/lib/raw/AutoBeCompilerCommonTemplate.js.map +1 -0
- package/lib/raw/AutoBeCompilerInterfaceTemplate.js +1 -6
- package/lib/raw/AutoBeCompilerInterfaceTemplate.js.map +1 -1
- package/lib/realize/AutoBeRealizeCompiler.d.ts +1 -2
- package/lib/realize/AutoBeRealizeCompiler.js +0 -13
- package/lib/realize/AutoBeRealizeCompiler.js.map +1 -1
- package/lib/test/AutoBeTestCompiler.d.ts +0 -1
- package/lib/test/AutoBeTestCompiler.js +0 -7
- package/lib/test/AutoBeTestCompiler.js.map +1 -1
- package/package.json +4 -4
- package/src/AutoBeCompiler.ts +40 -0
- package/src/interface/AutoBeInterfaceCompiler.ts +4 -7
- package/src/raw/AutoBeCompilerCommonTemplate.ts +7 -0
- package/src/raw/AutoBeCompilerInterfaceTemplate.ts +1 -6
- package/src/realize/AutoBeRealizeCompiler.ts +0 -21
- package/src/test/AutoBeTestCompiler.ts +0 -9
package/lib/AutoBeCompiler.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IAutoBeCompiler, IAutoBeCompilerListener, IAutoBeInterfaceCompiler, IAutoBePrismaCompiler, IAutoBeRealizeCompiler, IAutoBeTestCompiler, IAutoBeTypeScriptCompiler } from "@autobe/interface";
|
|
1
|
+
import { IAutoBeCompiler, IAutoBeCompilerListener, IAutoBeGetFilesOptions, IAutoBeInterfaceCompiler, IAutoBePrismaCompiler, IAutoBeRealizeCompiler, IAutoBeTestCompiler, IAutoBeTypeScriptCompiler } from "@autobe/interface";
|
|
2
2
|
/**
|
|
3
3
|
* Comprehensive compilation infrastructure for the vibe coding pipeline.
|
|
4
4
|
*
|
|
@@ -29,4 +29,5 @@ export declare class AutoBeCompiler implements IAutoBeCompiler {
|
|
|
29
29
|
test: IAutoBeTestCompiler;
|
|
30
30
|
realize: IAutoBeRealizeCompiler;
|
|
31
31
|
constructor(listener: IAutoBeCompilerListener);
|
|
32
|
+
getTemplate(options: Required<IAutoBeGetFilesOptions>): Promise<Record<string, string>>;
|
|
32
33
|
}
|
package/lib/AutoBeCompiler.js
CHANGED
|
@@ -1,9 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
2
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
12
|
exports.AutoBeCompiler = void 0;
|
|
4
13
|
const AutoBeTypeScriptCompiler_1 = require("./AutoBeTypeScriptCompiler");
|
|
5
14
|
const AutoBeInterfaceCompiler_1 = require("./interface/AutoBeInterfaceCompiler");
|
|
6
15
|
const AutoBePrismaCompiler_1 = require("./prisma/AutoBePrismaCompiler");
|
|
16
|
+
const AutoBeCompilerCommonTemplate_1 = require("./raw/AutoBeCompilerCommonTemplate");
|
|
17
|
+
const AutoBeCompilerInterfaceTemplate_1 = require("./raw/AutoBeCompilerInterfaceTemplate");
|
|
18
|
+
const AutoBeCompilerRealizeTemplate_1 = require("./raw/AutoBeCompilerRealizeTemplate");
|
|
19
|
+
const AutoBeCompilerRealizeTemplateOfPostgres_1 = require("./raw/AutoBeCompilerRealizeTemplateOfPostgres");
|
|
20
|
+
const AutoBeCompilerRealizeTemplateOfSQLite_1 = require("./raw/AutoBeCompilerRealizeTemplateOfSQLite");
|
|
21
|
+
const AutoBeCompilerTestTemplate_1 = require("./raw/AutoBeCompilerTestTemplate");
|
|
7
22
|
const AutoBeRealizeCompiler_1 = require("./realize/AutoBeRealizeCompiler");
|
|
8
23
|
const AutoBeTestCompiler_1 = require("./test/AutoBeTestCompiler");
|
|
9
24
|
/**
|
|
@@ -37,6 +52,31 @@ class AutoBeCompiler {
|
|
|
37
52
|
this.test = new AutoBeTestCompiler_1.AutoBeTestCompiler();
|
|
38
53
|
this.realize = new AutoBeRealizeCompiler_1.AutoBeRealizeCompiler(this.listener.realize);
|
|
39
54
|
}
|
|
55
|
+
getTemplate(options) {
|
|
56
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
+
const result = Object.assign({}, AutoBeCompilerCommonTemplate_1.AutoBeCompilerCommonTemplate);
|
|
58
|
+
const index = PHASES.indexOf(options.phase);
|
|
59
|
+
if (index >= OF_INTERFACE)
|
|
60
|
+
Object.assign(result, AutoBeCompilerInterfaceTemplate_1.AutoBeCompilerInterfaceTemplate);
|
|
61
|
+
if (index >= OF_TEST)
|
|
62
|
+
Object.assign(result, AutoBeCompilerTestTemplate_1.AutoBeCompilerTestTemplate);
|
|
63
|
+
if (index >= OF_REALIZE)
|
|
64
|
+
Object.assign(result, AutoBeCompilerRealizeTemplate_1.AutoBeCompilerRealizeTemplate, options.dbms === "postgres"
|
|
65
|
+
? AutoBeCompilerRealizeTemplateOfPostgres_1.AutoBeCompilerRealizeTemplateOfPostgres
|
|
66
|
+
: AutoBeCompilerRealizeTemplateOfSQLite_1.AutoBeCompilerRealizeTemplateOfSQLite);
|
|
67
|
+
return result;
|
|
68
|
+
});
|
|
69
|
+
}
|
|
40
70
|
}
|
|
41
71
|
exports.AutoBeCompiler = AutoBeCompiler;
|
|
72
|
+
const PHASES = [
|
|
73
|
+
"analyze",
|
|
74
|
+
"prisma",
|
|
75
|
+
"interface",
|
|
76
|
+
"test",
|
|
77
|
+
"realize",
|
|
78
|
+
];
|
|
79
|
+
const OF_INTERFACE = PHASES.indexOf("interface");
|
|
80
|
+
const OF_TEST = PHASES.indexOf("test");
|
|
81
|
+
const OF_REALIZE = PHASES.indexOf("realize");
|
|
42
82
|
//# sourceMappingURL=AutoBeCompiler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutoBeCompiler.js","sourceRoot":"","sources":["../src/AutoBeCompiler.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AutoBeCompiler.js","sourceRoot":"","sources":["../src/AutoBeCompiler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAYA,yEAAsE;AACtE,iFAA8E;AAC9E,wEAAqE;AACrE,qFAAkF;AAClF,2FAAwF;AACxF,uFAAoF;AACpF,2GAAwG;AACxG,uGAAoG;AACpG,iFAA8E;AAC9E,2EAAwE;AACxE,kEAA+D;AAE/D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAa,cAAc;IAOzB,YAAoC,QAAiC;QAAjC,aAAQ,GAAR,QAAQ,CAAyB;QACnE,IAAI,CAAC,MAAM,GAAG,IAAI,2CAAoB,EAAE,CAAC;QACzC,IAAI,CAAC,SAAS,GAAG,IAAI,iDAAuB,EAAE,CAAC;QAC/C,IAAI,CAAC,UAAU,GAAG,IAAI,mDAAwB,EAAE,CAAC;QACjD,IAAI,CAAC,IAAI,GAAG,IAAI,uCAAkB,EAAE,CAAC;QACrC,IAAI,CAAC,OAAO,GAAG,IAAI,6CAAqB,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAClE,CAAC;IAEY,WAAW,CACtB,OAAyC;;YAEzC,MAAM,MAAM,qBACP,2DAA4B,CAChC,CAAC;YACF,MAAM,KAAK,GAAW,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YACpD,IAAI,KAAK,IAAI,YAAY;gBACvB,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,iEAA+B,CAAC,CAAC;YACzD,IAAI,KAAK,IAAI,OAAO;gBAAE,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,uDAA0B,CAAC,CAAC;YACxE,IAAI,KAAK,IAAI,UAAU;gBACrB,MAAM,CAAC,MAAM,CACX,MAAM,EACN,6DAA6B,EAC7B,OAAO,CAAC,IAAI,KAAK,UAAU;oBACzB,CAAC,CAAC,iFAAuC;oBACzC,CAAC,CAAC,6EAAqC,CAC1C,CAAC;YACJ,OAAO,MAAM,CAAC;QAChB,CAAC;KAAA;CACF;AAnCD,wCAmCC;AAED,MAAM,MAAM,GAAkB;IAC5B,SAAS;IACT,QAAQ;IACR,WAAW;IACX,MAAM;IACN,SAAS;CACV,CAAC;AACF,MAAM,YAAY,GAAW,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;AACzD,MAAM,OAAO,GAAW,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;AAC/C,MAAM,UAAU,GAAW,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC"}
|
|
@@ -24,8 +24,7 @@ import { OpenApi } from "@samchon/openapi";
|
|
|
24
24
|
* @author Samchon
|
|
25
25
|
*/
|
|
26
26
|
export declare class AutoBeInterfaceCompiler implements IAutoBeInterfaceCompiler {
|
|
27
|
-
write(document: AutoBeOpenApi.IDocument): Promise<Record<string, string>>;
|
|
27
|
+
write(document: AutoBeOpenApi.IDocument, exclude: string[]): Promise<Record<string, string>>;
|
|
28
28
|
transform(document: AutoBeOpenApi.IDocument): Promise<OpenApi.IDocument>;
|
|
29
29
|
invert(document: OpenApi.IDocument): Promise<AutoBeOpenApi.IDocument>;
|
|
30
|
-
getTemplate(): Promise<Record<string, string>>;
|
|
31
30
|
}
|
|
@@ -12,7 +12,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.AutoBeInterfaceCompiler = void 0;
|
|
13
13
|
const utils_1 = require("@autobe/utils");
|
|
14
14
|
const migrate_1 = require("@nestia/migrate");
|
|
15
|
-
const AutoBeCompilerInterfaceTemplate_1 = require("../raw/AutoBeCompilerInterfaceTemplate");
|
|
16
15
|
const ArrayUtil_1 = require("../utils/ArrayUtil");
|
|
17
16
|
const FilePrinter_1 = require("../utils/FilePrinter");
|
|
18
17
|
/**
|
|
@@ -39,7 +38,7 @@ const FilePrinter_1 = require("../utils/FilePrinter");
|
|
|
39
38
|
* @author Samchon
|
|
40
39
|
*/
|
|
41
40
|
class AutoBeInterfaceCompiler {
|
|
42
|
-
write(document) {
|
|
41
|
+
write(document, exclude) {
|
|
43
42
|
return __awaiter(this, void 0, void 0, function* () {
|
|
44
43
|
const migrate = new migrate_1.NestiaMigrateApplication((0, utils_1.transformOpenApiDocument)(document));
|
|
45
44
|
const files = migrate.nest({
|
|
@@ -52,7 +51,7 @@ class AutoBeInterfaceCompiler {
|
|
|
52
51
|
},
|
|
53
52
|
});
|
|
54
53
|
return Object.fromEntries([
|
|
55
|
-
...(yield ArrayUtil_1.ArrayUtil.asyncMap(Object.entries(files), (_a) => __awaiter(this, [_a], void 0, function* ([key, value]) {
|
|
54
|
+
...(yield ArrayUtil_1.ArrayUtil.asyncMap(Object.entries(files).filter(([key, _]) => exclude.includes(key) === false), (_a) => __awaiter(this, [_a], void 0, function* ([key, value]) {
|
|
56
55
|
return [
|
|
57
56
|
key,
|
|
58
57
|
key.endsWith(".ts") && key.endsWith(".d.ts") === false
|
|
@@ -64,7 +63,6 @@ class AutoBeInterfaceCompiler {
|
|
|
64
63
|
"packages/api/swagger.json",
|
|
65
64
|
JSON.stringify(migrate.getData().document(), null, 2),
|
|
66
65
|
],
|
|
67
|
-
...Object.entries(AutoBeCompilerInterfaceTemplate_1.AutoBeCompilerInterfaceTemplate),
|
|
68
66
|
]);
|
|
69
67
|
});
|
|
70
68
|
}
|
|
@@ -78,11 +76,6 @@ class AutoBeInterfaceCompiler {
|
|
|
78
76
|
return (0, utils_1.invertOpenApiDocument)(document);
|
|
79
77
|
});
|
|
80
78
|
}
|
|
81
|
-
getTemplate() {
|
|
82
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
83
|
-
return AutoBeCompilerInterfaceTemplate_1.AutoBeCompilerInterfaceTemplate;
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
79
|
}
|
|
87
80
|
exports.AutoBeInterfaceCompiler = AutoBeInterfaceCompiler;
|
|
88
81
|
//# sourceMappingURL=AutoBeInterfaceCompiler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutoBeInterfaceCompiler.js","sourceRoot":"","sources":["../../src/interface/AutoBeInterfaceCompiler.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,yCAAgF;AAChF,6CAA2D;AAG3D,
|
|
1
|
+
{"version":3,"file":"AutoBeInterfaceCompiler.js","sourceRoot":"","sources":["../../src/interface/AutoBeInterfaceCompiler.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,yCAAgF;AAChF,6CAA2D;AAG3D,kDAA+C;AAC/C,sDAAmD;AAEnD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAa,uBAAuB;IACrB,KAAK,CAChB,QAAiC,EACjC,OAAiB;;YAEjB,MAAM,OAAO,GAA6B,IAAI,kCAAwB,CACpE,IAAA,gCAAwB,EAAC,QAAQ,CAAC,CACnC,CAAC;YACF,MAAM,KAAK,GAA2B,OAAO,CAAC,IAAI,CAAC;gBACjD,OAAO,EAAE,IAAI;gBACb,QAAQ,EAAE,IAAI;gBACd,GAAG,EAAE,IAAI;gBACT,MAAM,EAAE;oBACN,GAAG,EAAE,QAAQ;oBACb,KAAK,EAAE,0DAA0D;iBAClE;aACF,CAAC,CAAC;YACH,OAAO,MAAM,CAAC,WAAW,CAAC;gBACxB,GAAG,CAAC,MAAM,qBAAS,CAAC,QAAQ,CAC1B,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,CAC1B,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,KAAK,CAC9C,EACD,KAAqB,EAAE,0CAAhB,CAAC,GAAG,EAAE,KAAK,CAAC;oBAAK,OAAA;wBACtB,GAAG;wBACH,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,KAAK;4BACpD,CAAC,CAAC,MAAM,yBAAW,CAAC,QAAQ,CAAC,KAAK,CAAC;4BACnC,CAAC,CAAC,KAAK;qBACV,CAAA;kBAAA,CACF,CAAC;gBACF;oBACE,2BAA2B;oBAC3B,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;iBACtD;aACF,CAAC,CAAC;QACL,CAAC;KAAA;IAEY,SAAS,CACpB,QAAiC;;YAEjC,OAAO,IAAA,gCAAwB,EAAC,QAAQ,CAAC,CAAC;QAC5C,CAAC;KAAA;IAEY,MAAM,CACjB,QAA2B;;YAE3B,OAAO,IAAA,6BAAqB,EAAC,QAAQ,CAAC,CAAC;QACzC,CAAC;KAAA;CACF;AA/CD,0DA+CC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const AutoBeCompilerCommonTemplate: Record<string, string>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AutoBeCompilerCommonTemplate = void 0;
|
|
4
|
+
exports.AutoBeCompilerCommonTemplate = {
|
|
5
|
+
".eslintrc.cjs": "module.exports = {\n root: true,\n plugins: [\"@typescript-eslint\", \"deprecation\"],\n extends: [\"plugin:@typescript-eslint/recommended\"],\n parser: \"@typescript-eslint/parser\",\n parserOptions: {\n project: [\"tsconfig.json\", \"test/tsconfig.json\"],\n },\n overrides: [\n {\n files: [\"src/**/*.ts\", \"test/**/*.ts\"],\n rules: {\n \"@typescript-eslint/consistent-type-definitions\": \"off\",\n \"@typescript-eslint/no-empty-function\": \"off\",\n \"@typescript-eslint/no-empty-interface\": \"off\",\n \"@typescript-eslint/no-explicit-any\": \"off\",\n \"@typescript-eslint/no-inferrable-types\": \"off\",\n \"@typescript-eslint/no-namespace\": \"off\",\n \"@typescript-eslint/no-non-null-assertion\": \"off\",\n \"@typescript-eslint/no-unused-expressions\": \"off\",\n \"@typescript-eslint/no-unused-vars\": \"off\",\n \"@typescript-eslint/no-var-requires\": \"off\",\n \"@typescript-eslint/no-floating-promises\": \"error\",\n \"@typescript-eslint/no-require-imports\": \"off\",\n \"@typescript-eslint/no-empty-object-type\": \"off\",\n \"@typescript-eslint/prefer-as-const\": \"off\",\n \"prefer-as-const\": \"off\",\n },\n },\n ],\n};\n",
|
|
6
|
+
".gitignore": "./autobe/\nbin/\ndist/\nlib/\nnode_modules/\n\nprisma/migrations\nprisma/schema/migrations\nprisma/bbs.db\n\n*.DS_Store\n.env\n.npmrc\npackage-lock.json\npnpm-lock.yaml",
|
|
7
|
+
"LICENSE": "MIT License\n\nCopyright (c) 2025 Wrtn Technologies\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.",
|
|
8
|
+
"README.md": "# AutoBE Generated Backend Server\n\n\n\nA backend repository generated by [`@autobe`](https://github.com/wrtnlabs/autobe).\n\nThis backend program was automatically generated using [`@autobe`](https://github.com/wrtnlabs/autobe), the AI vibe coding agent for backend servers of below stack.\n\n- TypeScript\n- NestJS / Nestia\n- Prisma\n- Postgres\n\n```mermaid\nflowchart\nsubgraph \"Backend Coding Agent\"\n coder(\"Facade Controller\")\nend\nsubgraph \"Functional Agents\"\n coder --\"Requirements Analysis\"--> analyze(\"{{ANALYSIS_EMOJI}} Analyze\")\n coder --\"ERD\"--> prisma(\"{{PRISMA_EMOJI}} Prisma\")\n coder --\"API Design\"--> interface(\"{{INTERFACE_EMOJI}} Interface\")\n coder --\"Test Codes\" --> test(\"{{TEST_EMOJI}} Test\")\n coder --\"Main Program\" --> realize(\"{{REALIZE_EMOJI}} Realize\")\nend\nsubgraph \"Compiler Feedback\"\n prisma --\"validates\" --> prismaCompiler(\"Prisma Compiler\")\n interface --\"validates\" --> openapiValidator(\"OpenAPI Validator\")\n interface --\"generates\" --> tsCompiler(\"TypeScript Compiler\")\n test --\"validates\" --> tsCompiler(\"TypeScript Compiler\")\n realize --\"validates\" --> tsCompiler(\"TypeScript Compiler\")\nend\n```\n\nAlso, this backend application was built following [`@autobe`](https://github.com/wrtnlabs/autobe)'s waterfall development model, where each specialized AI agent handles a specific phase of development. The process ensures 100% working code through continuous compiler feedback and validation at every stage.\n\nEach agent receives input from previous phases and produces validated output that becomes the foundation for the next development stage. The **Facade Controller** orchestrates the entire process, while **Functional Agents** handle specialized tasks with built-in **Compiler Feedback** ensuring code quality and correctness.\n\nBelow table shows the mapping between waterfall phases, corresponding [`@autobe`](https://github.com/wrtnlabs/autobe) agents, and the actual deliverables you can find in this repository:\n\nWaterfall Model | AutoBe Agent | Result\n----------------|--------------|----------------------------------------------\nRequirements | ✅ Facade | Conversation History\nAnalysis | {{ANALYSIS_EMOJI}} Analyze | [Requirement Analysis Report](docs/analysis)\nDesign | {{PRISMA_EMOJI}} Prisma | [Entity Relationship Diagram](docs/ERD.md) / [Prisma Schema](prisma/schema)\nDesign | {{INTERFACE_EMOJI}} Interface | [API Controllers](src/controllers) / [DTO Structures](src/api/structures)\nDevelopment | {{REALIZE_EMOJI}} Realize | [API Provider Functions](src/providers)\nTesting | {{TEST_EMOJI}} Test | [E2E Test Functions](test/features/api)\nMaintenance | - | Use Claude Code like AI coding tool please\n\n## Project Structure\n\nThis template project has categorized directories like below.\n\nAs you can see from the below, all of the Backend source files are placed into the [src](src/) directory. When you build the TypeScript source files, compiled files would be placed into the `lib` directory following the [`tsconfig.json`](tsconfig.json) configuration. Otherwise you build client [SDK library](https://nestia.io/docs/sdk/) for npm publishing and their compiled files would be placed into the [`packages`](packages) directory.\n\n - [`packages/api/`](packages/api): SDK module built by `npm run build:api`\n - [`docs/`](docs/): Documentation directory\n - [`docs/analysis`](docs/analysis/): Requirement Analysis report\n - [`docs/ERD.md`](docs/ERD.md): Entity Relationship Diagram and detailed descriptions\n - [`prisma/schema`](prisma/schema): Prisma ORM schema files\n - [`src/`](src): Backend source directory\n - [`src/api/`](src/api/): Client SDK that would be published to the `@ORGANIZATION/PROJECT-api`\n - [`src/api/functional/`](src/api/functional/): API functions generated by the [`nestia`](https://github.com/samchon/nestia)\n - [`src/api/structures/`](src/api/structures/): DTO structures\n - [`src/controllers/`](src/controllers/): Controller classes of the Main Program\n - [`src/providers/`](src/providers/): Implementations of the API functions\n - [`test/`](test): Test Automation Program\n - [`test/features`](test/features): List of test functions\n - [`nestia.config.ts`](nestia.config.ts): Configuration file of [`nestia`](https://github.com/samchon/nestia)\n - [`package.json`](package.json): NPM configuration\n - [`tsconfig.json`](tsconfig.json): TypeScript configuration for the main program\n\n## NPM Run Commands\n\nList of the run commands defined in the [package.json](package.json) are like below:\n\n - Test\n - **`test`**: Run test automation program\n - `benchmark`: Run performance benchmark program\n - Build\n - `build`: Build everything\n - `build:main`: Build main program (`src` directory)\n - `build:test` Build test automation program (`test` directory)\n - `build:sdk`: Build SDK into main program only\n - `build:swagger`: Build Swagger Documents\n - **`dev`**: Incremental build for development (test program)\n - Deploy\n - `package:api`: Build and deploy the SDK library to the NPM\n - `start`: Start the backend server\n - `start:dev`: Start the backend server with incremental build and reload\n - Webpack\n - `webpack`: Run webpack bundler\n - `webpack:start`: Start the backend server built by webpack\n - `webpack:test`: Run test program to the webpack built\n\n## Specialization\n\nTransform this template project to be yours.\n\nWhen you've created a new backend project through this template project, you can specialize it to be suitable for you by changing some words. Replace below words through IDE specific function like `Edit > Replace in Files` (*Ctrl + Shift + H*), who've been supported by the VSCode.\n\n| Before | After\n|--------------|----------------------------------------\n| ORGANIZATION | Your account or corporation name\n| PROJECT | Your own project name\n| AUTHOR | Author name\n| https://github.com/samchon/nestia-start | Your repository URL\n\n## Benchmark\n\n### Aggregate\n\nPhase | Generated | FCSR | Token Consumption | Elapsed Time\n------|-----------|------|-------------------|--------------\n{{BENCHMARK_AGGREGATE}}\n\nThis table shows the comprehensive metrics for each phase of the AutoBE generation pipeline. For each phase (Analyze, Prisma, Interface, Test, Realize), it tracks:\n\n- **Phase**: The pipeline phase with success (✅) or failure (❌) indicator\n- **Generated**: Count of artifacts produced (e.g., actors, documents, namespaces, models, operations, schemas, functions)\n- **FCSR**: Function calling success rate\n- **Token Consumption**: Total number of LLM tokens consumed during the phase\n- **Elapsed Time**: Wall-clock time taken to complete the phase, including all AI agent operations and compiler feedback loops\n\nThese aggregate metrics provide visibility into the computational cost and time requirements of the entire generation process, helping identify resource-intensive phases and overall pipeline efficiency.\n\n### Function Calling\n\nType | Trial | Validation Failure | JSON Parse Error | Success | Success Rate\n:----|------:|-------------------:|-----------------:|---------:|-------------:\n{{BENCHMARK_FUNCTION_CALLING}}\n\nThis table shows the reliability and quality metrics for AI agent function calling operations across all phases. Each row represents a specific operation type (e.g., `analyzeScenario`, `prismaSchema`, `realizeWrite`), tracking:\n\n- **Type**: The AI agent operation name\n- **Trial**: Total number of function calling attempts made by the agent\n- **Validation Failure**: Calls that produced valid JSON but failed type validation\n- **JSON Parse Error**: Calls that produced malformed JSON that couldn't be parsed\n- **Success**: Calls that completed successfully with valid, validated responses\n- **Success Rate**: Percentage of successful calls out of total attempts\n\nThese metrics reveal the effectiveness of AutoBE's validation feedback strategy powered by [`typia.llm.application<Class, Model>()`](https://typia.io/docs/llm/application/). When function calls fail type validation, detailed error messages are fed back to the AI agent, enabling iterative correction through self-healing spiral loops.\n\nSuccess rates vary based on model size and capability - smaller models may have lower initial success rates. However, validation feedback enables even weaker models to achieve high success rates through automatic correction cycles, demonstrating the power of compiler-driven development.\n\n## License\n\nAutoBE is licensed under the [GNU Affero General Public License v3.0 (AGPL-3.0)](https://github.com/wrtnlabs/autobe/?tab=AGPL-3.0-1-ov-file#readme). If you modify AutoBE itself or offer it as a network service, you must make your source code available under the same license.\n\nHowever, backend applications generated by AutoBE can be relicensed under any license you choose, such as MIT. This means you can freely use AutoBE-generated code in commercial projects without open source obligations, similar to how other code generation tools work.\n",
|
|
9
|
+
"typos.toml": "[default]\nlocale = 'en-us'\nextend-ignore-re = [\n \"(?Rm)^.*(<!--|#|//)\\\\s*spellchecker:disable-line(-->|\\n)?$\",\n \".*(?:spellchecker|typos):\\\\s?ignore-next-line[^\\\\n]*\\\\n[^\\\\n]*\",\n \"(?s)(<!--|#|//)\\\\s*spellchecker:off\\\\s*(-->|\\n).*?(<!--|#|//)\\\\s*spellchecker:on\",\n]\n\n[default.extend-words]\nJeongho = \"Jeongho\"\nNam = \"Nam\"\ntypia = \"typia\"\n\n[files]\nextend-exclude = [\"*.json\"]"
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=AutoBeCompilerCommonTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutoBeCompilerCommonTemplate.js","sourceRoot":"","sources":["../../src/raw/AutoBeCompilerCommonTemplate.ts"],"names":[],"mappings":";;;AAAa,QAAA,4BAA4B,GAA2B;IAClE,eAAe,EAAE,ywCAAywC;IAC1xC,YAAY,EAAE,0KAA0K;IACxL,SAAS,EAAE,2kCAA2kC;IACtlC,WAAW,EAAE,4nSAA4nS;IACzoS,YAAY,EAAE,waAAwa;CACvb,CAAC"}
|
|
@@ -2,12 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AutoBeCompilerInterfaceTemplate = void 0;
|
|
4
4
|
exports.AutoBeCompilerInterfaceTemplate = {
|
|
5
|
-
".eslintrc.cjs": "module.exports = {\n root: true,\n plugins: [\"@typescript-eslint\", \"deprecation\"],\n extends: [\"plugin:@typescript-eslint/recommended\"],\n parser: \"@typescript-eslint/parser\",\n parserOptions: {\n project: [\"tsconfig.json\", \"test/tsconfig.json\"],\n },\n overrides: [\n {\n files: [\"src/**/*.ts\", \"test/**/*.ts\"],\n rules: {\n \"@typescript-eslint/consistent-type-definitions\": \"off\",\n \"@typescript-eslint/no-empty-function\": \"off\",\n \"@typescript-eslint/no-empty-interface\": \"off\",\n \"@typescript-eslint/no-explicit-any\": \"off\",\n \"@typescript-eslint/no-inferrable-types\": \"off\",\n \"@typescript-eslint/no-namespace\": \"off\",\n \"@typescript-eslint/no-non-null-assertion\": \"off\",\n \"@typescript-eslint/no-unused-expressions\": \"off\",\n \"@typescript-eslint/no-unused-vars\": \"off\",\n \"@typescript-eslint/no-var-requires\": \"off\",\n \"@typescript-eslint/no-floating-promises\": \"error\",\n \"@typescript-eslint/no-require-imports\": \"off\",\n \"@typescript-eslint/no-empty-object-type\": \"off\",\n \"@typescript-eslint/prefer-as-const\": \"off\",\n \"prefer-as-const\": \"off\",\n },\n },\n ],\n};\n",
|
|
6
5
|
".github/workflows/build.yml": "name: build\non:\n pull_request:\n paths:\n - 'src/**'\n - 'test/**'\n - 'package.json'\njobs:\n Ubuntu:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v4\n - uses: actions/setup-node@v4\n with:\n node-version: 20.x\n - uses: pnpm/action-setup@v4\n with:\n version: 8\n \n - name: Install Backend-Server\n run: pnpm install\n\n - name: Build Swagger\n run: pnpm run build:swagger\n\n - name: Build SDK\n run: pnpm run build:sdk\n\n - name: Compile Backend-Server\n run: pnpm run build\n\n # - name: Run Test Program\n # run: pnpm run test -- --reset true --simultaneous 16\n\n - name: EsLint\n run: pnpm run eslint\n",
|
|
7
|
-
".
|
|
8
|
-
"LICENSE": "MIT License\n\nCopyright (c) 2025 Wrtn Technologies\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.",
|
|
9
|
-
"README.md": "# AutoBE Generated Backend Server\n\n\n\nA backend repository generated by [`@autobe`](https://github.com/wrtnlabs/autobe).\n\nThis backend program was automatically generated using [`@autobe`](https://github.com/wrtnlabs/autobe), the AI vibe coding agent for backend servers of below stack.\n\n- TypeScript\n- NestJS / Nestia\n- Prisma\n- Postgres\n\n```mermaid\nflowchart\nsubgraph \"Backend Coding Agent\"\n coder(\"Facade Controller\")\nend\nsubgraph \"Functional Agents\"\n coder --\"Requirements Analysis\"--> analyze(\"Analyze\")\n coder --\"ERD\"--> prisma(\"Prisma\")\n coder --\"API Design\"--> interface(\"Interface\")\n coder --\"Test Codes\" --> test(\"Test\")\n coder --\"Main Program\" --> realize(\"Realize\")\nend\nsubgraph \"Compiler Feedback\"\n prisma --\"validates\" --> prismaCompiler(\"Prisma Compiler\")\n interface --\"validates\" --> openapiValidator(\"OpenAPI Validator\")\n interface --\"generates\" --> tsCompiler(\"TypeScript Compiler\")\n test --\"validates\" --> tsCompiler(\"TypeScript Compiler\")\n realize --\"validates\" --> tsCompiler(\"TypeScript Compiler\")\nend\n```\n\nAlso, this backend application was built following [`@autobe`](https://github.com/wrtnlabs/autobe)'s waterfall development model, where each specialized AI agent handles a specific phase of development. The process ensures 100% working code through continuous compiler feedback and validation at every stage.\n\nEach agent receives input from previous phases and produces validated output that becomes the foundation for the next development stage. The **Facade Controller** orchestrates the entire process, while **Functional Agents** handle specialized tasks with built-in **Compiler Feedback** ensuring code quality and correctness.\n\nBelow table shows the mapping between waterfall phases, corresponding [`@autobe`](https://github.com/wrtnlabs/autobe) agents, and the actual deliverables you can find in this repository:\n\nWaterfall Model | AutoBe Agent | Result\n----------------|--------------|----------------------------------------------\nRequirements | Facade | Conversation History\nAnalysis | Analyze | [Requirement Analysis Report](docs/analysis)\nDesign | Prisma | [Entity Relationship Diagram](docs/ERD.md) / [Prisma Schema](prisma/schema)\nDesign | Interface | [API Controllers](src/controllers) / [DTO Structures](src/api/structures)\nDevelopment | Realize | [API Provider Functions](src/providers)\nTesting | Test | [E2E Test Functions](test/features/api)\nMaintenance | - | Use Claude Code like AI coding tool please\n\n## Project Structure\n\nThis template project has categorized directories like below.\n\nAs you can see from the below, all of the Backend source files are placed into the [src](src/) directory. When you build the TypeScript source files, compiled files would be placed into the `lib` directory following the [`tsconfig.json`](tsconfig.json) configuration. Otherwise you build client [SDK library](https://nestia.io/docs/sdk/) for npm publishing and their compiled files would be placed into the [`packages`](packages) directory.\n\n - [`packages/api/`](packages/api): SDK module built by `npm run build:api`\n - [`docs/`](docs/): Documentation directory\n - [`docs/analysis`](docs/analysis/): Requirement Analysis report\n - [`docs/ERD.md`](docs/ERD.md): Entity Relationship Diagram and detailed descriptions\n - [`prisma/schema`](prisma/schema): Prisma ORM schema files\n - [`src/`](src): Backend source directory\n - [`src/api/`](src/api/): Client SDK that would be published to the `@ORGANIZATION/PROJECT-api`\n - [`src/api/functional/`](src/api/functional/): API functions generated by the [`nestia`](https://github.com/samchon/nestia)\n - [`src/api/structures/`](src/api/structures/): DTO structures\n - [`src/controllers/`](src/controllers/): Controller classes of the Main Program\n - [`src/providers/`](src/providers/): Implementations of the API functions\n - [`test/`](test): Test Automation Program\n - [`test/features`](test/features): List of test functions\n - [`nestia.config.ts`](nestia.config.ts): Configuration file of [`nestia`](https://github.com/samchon/nestia)\n - [`package.json`](package.json): NPM configuration\n - [`tsconfig.json`](tsconfig.json): TypeScript configuration for the main program\n\n## NPM Run Commands\n\nList of the run commands defined in the [package.json](package.json) are like below:\n\n - Test\n - **`test`**: Run test automation program\n - `benchmark`: Run performance benchmark program\n - Build\n - `build`: Build everything\n - `build:main`: Build main program (`src` directory)\n - `build:test` Build test automation program (`test` directory)\n - `build:sdk`: Build SDK into main program only\n - `build:swagger`: Build Swagger Documents\n - **`dev`**: Incremental build for development (test program)\n - Deploy\n - `package:api`: Build and deploy the SDK library to the NPM\n - `start`: Start the backend server\n - `start:dev`: Start the backend server with incremental build and reload\n - Webpack\n - `webpack`: Run webpack bundler\n - `webpack:start`: Start the backend server built by webpack\n - `webpack:test`: Run test program to the webpack built\n\n## Specialization\n\nTransform this template project to be yours.\n\nWhen you've created a new backend project through this template project, you can specialize it to be suitable for you by changing some words. Replace below words through IDE specific function like `Edit > Replace in Files` (*Ctrl + Shift + H*), who've been supported by the VSCode.\n\n| Before | After\n|--------------|----------------------------------------\n| ORGANIZATION | Your account or corporation name\n| PROJECT | Your own project name\n| AUTHOR | Author name\n| https://github.com/samchon/nestia-start | Your repository URL\n\n## License\n\nAutoBE is licensed under the [GNU Affero General Public License v3.0 (AGPL-3.0)](https://github.com/wrtnlabs/autobe/?tab=AGPL-3.0-1-ov-file#readme). If you modify AutoBE itself or offer it as a network service, you must make your source code available under the same license.\n\nHowever, backend applications generated by AutoBE can be relicensed under any license you choose, such as MIT. This means you can freely use AutoBE-generated code in commercial projects without open source obligations, similar to how other code generation tools work.\n",
|
|
10
|
-
"test/tsconfig.json": "{\n \"extends\": \"../tsconfig.json\",\n \"compilerOptions\": {\n \"outDir\": \"../bin\",\n \"noUnusedLocals\": false,\n \"noUnusedParameters\": false,\n },\n \"include\": [\".\", \"../src\"]\n}",
|
|
11
|
-
"typos.toml": "[default]\nlocale = 'en-us'\nextend-ignore-re = [\n \"(?Rm)^.*(<!--|#|//)\\\\s*spellchecker:disable-line(-->|\\n)?$\",\n \".*(?:spellchecker|typos):\\\\s?ignore-next-line[^\\\\n]*\\\\n[^\\\\n]*\",\n \"(?s)(<!--|#|//)\\\\s*spellchecker:off\\\\s*(-->|\\n).*?(<!--|#|//)\\\\s*spellchecker:on\",\n]\n\n[default.extend-words]\nJeongho = \"Jeongho\"\nNam = \"Nam\"\ntypia = \"typia\"\n\n[files]\nextend-exclude = [\"*.json\"]"
|
|
6
|
+
"test/tsconfig.json": "{\n \"extends\": \"../tsconfig.json\",\n \"compilerOptions\": {\n \"outDir\": \"../bin\",\n \"noUnusedLocals\": false,\n \"noUnusedParameters\": false,\n },\n \"include\": [\".\", \"../src\"]\n}"
|
|
12
7
|
};
|
|
13
8
|
//# sourceMappingURL=AutoBeCompilerInterfaceTemplate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutoBeCompilerInterfaceTemplate.js","sourceRoot":"","sources":["../../src/raw/AutoBeCompilerInterfaceTemplate.ts"],"names":[],"mappings":";;;AAAa,QAAA,+BAA+B,GAA2B;IACrE,
|
|
1
|
+
{"version":3,"file":"AutoBeCompilerInterfaceTemplate.js","sourceRoot":"","sources":["../../src/raw/AutoBeCompilerInterfaceTemplate.ts"],"names":[],"mappings":";;;AAAa,QAAA,+BAA+B,GAA2B;IACrE,6BAA6B,EAAE,8wBAA8wB;IAC7yB,oBAAoB,EAAE,iNAAiN;CACxO,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IAutoBeRealizeCompiler, IAutoBeRealizeCompilerListener, IAutoBeRealizeControllerProps, IAutoBeRealizeTestProps, IAutoBeRealizeTestResult } from "@autobe/interface";
|
|
2
2
|
export declare class AutoBeRealizeCompiler implements IAutoBeRealizeCompiler {
|
|
3
3
|
private readonly listener;
|
|
4
4
|
constructor(listener: IAutoBeRealizeCompilerListener);
|
|
5
5
|
controller(props: IAutoBeRealizeControllerProps): Promise<Record<string, string>>;
|
|
6
6
|
test(props: IAutoBeRealizeTestProps): Promise<IAutoBeRealizeTestResult>;
|
|
7
|
-
getTemplate(options: IAutoBeGetFilesOptions): Promise<Record<string, string>>;
|
|
8
7
|
}
|
|
@@ -10,11 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.AutoBeRealizeCompiler = void 0;
|
|
13
|
-
const AutoBeCompilerInterfaceTemplate_1 = require("../raw/AutoBeCompilerInterfaceTemplate");
|
|
14
13
|
const AutoBeCompilerRealizeTemplate_1 = require("../raw/AutoBeCompilerRealizeTemplate");
|
|
15
|
-
const AutoBeCompilerRealizeTemplateOfPostgres_1 = require("../raw/AutoBeCompilerRealizeTemplateOfPostgres");
|
|
16
|
-
const AutoBeCompilerRealizeTemplateOfSQLite_1 = require("../raw/AutoBeCompilerRealizeTemplateOfSQLite");
|
|
17
|
-
const AutoBeCompilerTestTemplate_1 = require("../raw/AutoBeCompilerTestTemplate");
|
|
18
14
|
const FilePrinter_1 = require("../utils/FilePrinter");
|
|
19
15
|
const testRealizeProject_1 = require("./testRealizeProject");
|
|
20
16
|
const writeRealizeControllers_1 = require("./writeRealizeControllers");
|
|
@@ -33,15 +29,6 @@ class AutoBeRealizeCompiler {
|
|
|
33
29
|
test(props) {
|
|
34
30
|
return (0, testRealizeProject_1.testRealizeProject)(Object.assign(Object.assign({}, props), { files: Object.assign(Object.assign({}, props.files), AutoBeCompilerRealizeTemplate_1.AutoBeCompilerRealizeTemplate) }), this.listener.test);
|
|
35
31
|
}
|
|
36
|
-
getTemplate(options) {
|
|
37
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
-
return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, AutoBeCompilerInterfaceTemplate_1.AutoBeCompilerInterfaceTemplate), AutoBeCompilerTestTemplate_1.AutoBeCompilerTestTemplate), AutoBeCompilerRealizeTemplate_1.AutoBeCompilerRealizeTemplate), (options.dbms === "postgres"
|
|
39
|
-
? AutoBeCompilerRealizeTemplateOfPostgres_1.AutoBeCompilerRealizeTemplateOfPostgres
|
|
40
|
-
: {})), (options.dbms === "sqlite"
|
|
41
|
-
? AutoBeCompilerRealizeTemplateOfSQLite_1.AutoBeCompilerRealizeTemplateOfSQLite
|
|
42
|
-
: {}));
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
32
|
}
|
|
46
33
|
exports.AutoBeRealizeCompiler = AutoBeRealizeCompiler;
|
|
47
34
|
//# sourceMappingURL=AutoBeRealizeCompiler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutoBeRealizeCompiler.js","sourceRoot":"","sources":["../../src/realize/AutoBeRealizeCompiler.ts"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"AutoBeRealizeCompiler.js","sourceRoot":"","sources":["../../src/realize/AutoBeRealizeCompiler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAQA,wFAAqF;AACrF,sDAAmD;AACnD,6DAA0D;AAC1D,uEAAoE;AAEpE,MAAa,qBAAqB;IAChC,YACmB,QAAwC;QAAxC,aAAQ,GAAR,QAAQ,CAAgC;IACxD,CAAC;IAES,UAAU,CACrB,KAAoC;;YAEpC,MAAM,MAAM,GAA2B,MAAM,IAAA,iDAAuB,EAAC,KAAK,CAAC,CAAC;YAC5E,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;gBAC/C,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,yBAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;YAClD,OAAO,MAAM,CAAC;QAChB,CAAC;KAAA;IAEM,IAAI,CACT,KAA8B;QAE9B,OAAO,IAAA,uCAAkB,kCAElB,KAAK,KACR,KAAK,kCACA,KAAK,CAAC,KAAK,GACX,6DAA6B,MAGpC,IAAI,CAAC,QAAQ,CAAC,IAAI,CACnB,CAAC;IACJ,CAAC;CACF;AA5BD,sDA4BC"}
|
|
@@ -5,5 +5,4 @@ export declare class AutoBeTestCompiler implements IAutoBeTestCompiler {
|
|
|
5
5
|
validate(props: IAutoBeTestValidateProps): Promise<IValidation.IError[] | null>;
|
|
6
6
|
write(props: IAutoBeTestWriteProps): Promise<string>;
|
|
7
7
|
getExternal(): Promise<Record<string, string>>;
|
|
8
|
-
getTemplate(): Promise<Record<string, string>>;
|
|
9
8
|
}
|
|
@@ -18,8 +18,6 @@ const embed_eslint_1 = require("embed-eslint");
|
|
|
18
18
|
const tstl_1 = require("tstl");
|
|
19
19
|
const typescript_1 = __importDefault(require("typescript"));
|
|
20
20
|
const transform_1 = __importDefault(require("typia/lib/transform"));
|
|
21
|
-
const AutoBeCompilerInterfaceTemplate_1 = require("../raw/AutoBeCompilerInterfaceTemplate");
|
|
22
|
-
const AutoBeCompilerTestTemplate_1 = require("../raw/AutoBeCompilerTestTemplate");
|
|
23
21
|
const test_json_1 = __importDefault(require("../raw/test.json"));
|
|
24
22
|
const FilePrinter_1 = require("../utils/FilePrinter");
|
|
25
23
|
const shrinkCompileResult_1 = require("../utils/shrinkCompileResult");
|
|
@@ -88,11 +86,6 @@ class AutoBeTestCompiler {
|
|
|
88
86
|
return test_json_1.default;
|
|
89
87
|
});
|
|
90
88
|
}
|
|
91
|
-
getTemplate() {
|
|
92
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
93
|
-
return Object.assign(Object.assign({}, AutoBeCompilerInterfaceTemplate_1.AutoBeCompilerInterfaceTemplate), AutoBeCompilerTestTemplate_1.AutoBeCompilerTestTemplate);
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
89
|
}
|
|
97
90
|
exports.AutoBeTestCompiler = AutoBeTestCompiler;
|
|
98
91
|
//# sourceMappingURL=AutoBeTestCompiler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutoBeTestCompiler.js","sourceRoot":"","sources":["../../src/test/AutoBeTestCompiler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAQA,yCAGuB;AACvB,+CAA2C;AAC3C,+BAAqC;AACrC,4DAA4B;AAE5B,oEAAiD;AAEjD,
|
|
1
|
+
{"version":3,"file":"AutoBeTestCompiler.js","sourceRoot":"","sources":["../../src/test/AutoBeTestCompiler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAQA,yCAGuB;AACvB,+CAA2C;AAC3C,+BAAqC;AACrC,4DAA4B;AAE5B,oEAAiD;AAEjD,iEAA4C;AAC5C,sDAAmD;AACnD,sEAAmE;AACnE,uEAAoE;AAEpE,MAAa,kBAAkB;IAChB,OAAO,CAClB,KAAoC;;;YAEpC,MAAM,KAAK,GAAW,MAAA,KAAK,CAAC,OAAO,mCAAI,2BAA2B,CAAC;YACnE,MAAM,QAAQ,GAAgB,IAAI,0BAAW,CAAC;gBAC5C,QAAQ,EAAE,mBAAsC;gBAChD,eAAe,EAAE;oBACf,MAAM,EAAE,oBAAE,CAAC,YAAY,CAAC,MAAM;oBAC9B,MAAM,EAAE,oBAAE,CAAC,UAAU,CAAC,QAAQ;oBAC9B,kBAAkB,EAAE,IAAI;oBACxB,OAAO,EAAE,IAAI;oBACb,KAAK,EAAE;wBACL,CAAC,KAAK,CAAC,EAAE,CAAC,WAAW,CAAC;wBACtB,CAAC,GAAG,KAAK,QAAQ,CAAC,EAAE,CAAC,aAAa,CAAC;qBACpC;oBACD,MAAM,EAAE,IAAI;oBACZ,YAAY,EAAE,IAAI;oBAClB,eAAe,EAAE,IAAI;oBACrB,sBAAsB,EAAE,IAAI;oBAC5B,qBAAqB,EAAE,IAAI;oBAC3B,iBAAiB,EAAE,IAAI;iBACxB;gBACD,YAAY,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,EAAE,CAAC,CAAC;oBACvC,MAAM,EAAE;wBACN,IAAA,mBAAc,EACZ,OAAO,EACP,EAAE,EACF;4BACE,aAAa,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC;yBAClD,CACF;qBACF;iBACF,CAAC;gBACF,KAAK,EAAE;oBACL,sBAAsB,EAAE,OAAO;iBAChC;aACF,CAAC,CAAC;YACH,OAAO,IAAA,yCAAmB,EAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;QAC5D,CAAC;KAAA;IAEY,QAAQ,CACnB,KAA+B;;YAE/B,MAAM,MAAM,GAAyB,EAAE,CAAC;YACxC,MAAM,SAAS,GAGX,IAAI,cAAO,CACb,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,GAAG,CAC3B,CAAC,EAAE,EAAE,EAAE,CACL,IAAI,WAAI,CACN;gBACE,MAAM,EAAE,EAAE,CAAC,MAAM;gBACjB,IAAI,EAAE,EAAE,CAAC,IAAI;aACd,EACD,EAAE,CACH,CACJ,EACD,uCAA+B,CAAC,QAAQ,EACxC,uCAA+B,CAAC,MAAM,CACvC,CAAC;YACF,IAAA,4BAAoB,EAAC;gBACnB,QAAQ,EAAE,KAAK,CAAC,QAAQ;gBACxB,QAAQ,EAAE,KAAK,CAAC,QAAQ;gBACxB,SAAS,EAAE,SAAS;gBACpB,MAAM;aACP,CAAC,CAAC;YACH,OAAO,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;QAC7C,CAAC;KAAA;IAEY,KAAK,CAAC,KAA4B;;YAC7C,MAAM,OAAO,GAAW,IAAA,qCAAiB,EAAC,KAAK,CAAC,CAAC;YACjD,OAAO,KAAK,CAAC,QAAQ,KAAK,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,yBAAW,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC5E,CAAC;KAAA;IAEY,WAAW;;YACtB,OAAO,mBAAsC,CAAC;QAChD,CAAC;KAAA;CACF;AA/ED,gDA+EC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@autobe/compiler",
|
|
3
|
-
"version": "0.29.
|
|
3
|
+
"version": "0.29.2",
|
|
4
4
|
"description": "AI backend server code generator",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"author": "Wrtn Technologies",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"tgrid": "^1.2.0",
|
|
31
31
|
"tstl": "^3.0.0",
|
|
32
32
|
"typia": "^10.0.2",
|
|
33
|
-
"@autobe/
|
|
34
|
-
"@autobe/
|
|
35
|
-
"@autobe/utils": "^0.29.
|
|
33
|
+
"@autobe/interface": "^0.29.2",
|
|
34
|
+
"@autobe/filesystem": "^0.29.2",
|
|
35
|
+
"@autobe/utils": "^0.29.2"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/node": "^22.15.3",
|
package/src/AutoBeCompiler.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
|
+
AutoBePhase,
|
|
2
3
|
IAutoBeCompiler,
|
|
3
4
|
IAutoBeCompilerListener,
|
|
5
|
+
IAutoBeGetFilesOptions,
|
|
4
6
|
IAutoBeInterfaceCompiler,
|
|
5
7
|
IAutoBePrismaCompiler,
|
|
6
8
|
IAutoBeRealizeCompiler,
|
|
@@ -11,6 +13,12 @@ import {
|
|
|
11
13
|
import { AutoBeTypeScriptCompiler } from "./AutoBeTypeScriptCompiler";
|
|
12
14
|
import { AutoBeInterfaceCompiler } from "./interface/AutoBeInterfaceCompiler";
|
|
13
15
|
import { AutoBePrismaCompiler } from "./prisma/AutoBePrismaCompiler";
|
|
16
|
+
import { AutoBeCompilerCommonTemplate } from "./raw/AutoBeCompilerCommonTemplate";
|
|
17
|
+
import { AutoBeCompilerInterfaceTemplate } from "./raw/AutoBeCompilerInterfaceTemplate";
|
|
18
|
+
import { AutoBeCompilerRealizeTemplate } from "./raw/AutoBeCompilerRealizeTemplate";
|
|
19
|
+
import { AutoBeCompilerRealizeTemplateOfPostgres } from "./raw/AutoBeCompilerRealizeTemplateOfPostgres";
|
|
20
|
+
import { AutoBeCompilerRealizeTemplateOfSQLite } from "./raw/AutoBeCompilerRealizeTemplateOfSQLite";
|
|
21
|
+
import { AutoBeCompilerTestTemplate } from "./raw/AutoBeCompilerTestTemplate";
|
|
14
22
|
import { AutoBeRealizeCompiler } from "./realize/AutoBeRealizeCompiler";
|
|
15
23
|
import { AutoBeTestCompiler } from "./test/AutoBeTestCompiler";
|
|
16
24
|
|
|
@@ -50,4 +58,36 @@ export class AutoBeCompiler implements IAutoBeCompiler {
|
|
|
50
58
|
this.test = new AutoBeTestCompiler();
|
|
51
59
|
this.realize = new AutoBeRealizeCompiler(this.listener.realize);
|
|
52
60
|
}
|
|
61
|
+
|
|
62
|
+
public async getTemplate(
|
|
63
|
+
options: Required<IAutoBeGetFilesOptions>,
|
|
64
|
+
): Promise<Record<string, string>> {
|
|
65
|
+
const result: Record<string, string> = {
|
|
66
|
+
...AutoBeCompilerCommonTemplate,
|
|
67
|
+
};
|
|
68
|
+
const index: number = PHASES.indexOf(options.phase);
|
|
69
|
+
if (index >= OF_INTERFACE)
|
|
70
|
+
Object.assign(result, AutoBeCompilerInterfaceTemplate);
|
|
71
|
+
if (index >= OF_TEST) Object.assign(result, AutoBeCompilerTestTemplate);
|
|
72
|
+
if (index >= OF_REALIZE)
|
|
73
|
+
Object.assign(
|
|
74
|
+
result,
|
|
75
|
+
AutoBeCompilerRealizeTemplate,
|
|
76
|
+
options.dbms === "postgres"
|
|
77
|
+
? AutoBeCompilerRealizeTemplateOfPostgres
|
|
78
|
+
: AutoBeCompilerRealizeTemplateOfSQLite,
|
|
79
|
+
);
|
|
80
|
+
return result;
|
|
81
|
+
}
|
|
53
82
|
}
|
|
83
|
+
|
|
84
|
+
const PHASES: AutoBePhase[] = [
|
|
85
|
+
"analyze",
|
|
86
|
+
"prisma",
|
|
87
|
+
"interface",
|
|
88
|
+
"test",
|
|
89
|
+
"realize",
|
|
90
|
+
];
|
|
91
|
+
const OF_INTERFACE: number = PHASES.indexOf("interface");
|
|
92
|
+
const OF_TEST: number = PHASES.indexOf("test");
|
|
93
|
+
const OF_REALIZE: number = PHASES.indexOf("realize");
|
|
@@ -3,7 +3,6 @@ import { invertOpenApiDocument, transformOpenApiDocument } from "@autobe/utils";
|
|
|
3
3
|
import { NestiaMigrateApplication } from "@nestia/migrate";
|
|
4
4
|
import { OpenApi } from "@samchon/openapi";
|
|
5
5
|
|
|
6
|
-
import { AutoBeCompilerInterfaceTemplate } from "../raw/AutoBeCompilerInterfaceTemplate";
|
|
7
6
|
import { ArrayUtil } from "../utils/ArrayUtil";
|
|
8
7
|
import { FilePrinter } from "../utils/FilePrinter";
|
|
9
8
|
|
|
@@ -33,6 +32,7 @@ import { FilePrinter } from "../utils/FilePrinter";
|
|
|
33
32
|
export class AutoBeInterfaceCompiler implements IAutoBeInterfaceCompiler {
|
|
34
33
|
public async write(
|
|
35
34
|
document: AutoBeOpenApi.IDocument,
|
|
35
|
+
exclude: string[],
|
|
36
36
|
): Promise<Record<string, string>> {
|
|
37
37
|
const migrate: NestiaMigrateApplication = new NestiaMigrateApplication(
|
|
38
38
|
transformOpenApiDocument(document),
|
|
@@ -48,7 +48,9 @@ export class AutoBeInterfaceCompiler implements IAutoBeInterfaceCompiler {
|
|
|
48
48
|
});
|
|
49
49
|
return Object.fromEntries([
|
|
50
50
|
...(await ArrayUtil.asyncMap(
|
|
51
|
-
Object.entries(files)
|
|
51
|
+
Object.entries(files).filter(
|
|
52
|
+
([key, _]) => exclude.includes(key) === false,
|
|
53
|
+
),
|
|
52
54
|
async ([key, value]) => [
|
|
53
55
|
key,
|
|
54
56
|
key.endsWith(".ts") && key.endsWith(".d.ts") === false
|
|
@@ -60,7 +62,6 @@ export class AutoBeInterfaceCompiler implements IAutoBeInterfaceCompiler {
|
|
|
60
62
|
"packages/api/swagger.json",
|
|
61
63
|
JSON.stringify(migrate.getData().document(), null, 2),
|
|
62
64
|
],
|
|
63
|
-
...Object.entries(AutoBeCompilerInterfaceTemplate),
|
|
64
65
|
]);
|
|
65
66
|
}
|
|
66
67
|
|
|
@@ -75,8 +76,4 @@ export class AutoBeInterfaceCompiler implements IAutoBeInterfaceCompiler {
|
|
|
75
76
|
): Promise<AutoBeOpenApi.IDocument> {
|
|
76
77
|
return invertOpenApiDocument(document);
|
|
77
78
|
}
|
|
78
|
-
|
|
79
|
-
public async getTemplate(): Promise<Record<string, string>> {
|
|
80
|
-
return AutoBeCompilerInterfaceTemplate;
|
|
81
|
-
}
|
|
82
79
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export const AutoBeCompilerCommonTemplate: Record<string, string> = {
|
|
2
|
+
".eslintrc.cjs": "module.exports = {\n root: true,\n plugins: [\"@typescript-eslint\", \"deprecation\"],\n extends: [\"plugin:@typescript-eslint/recommended\"],\n parser: \"@typescript-eslint/parser\",\n parserOptions: {\n project: [\"tsconfig.json\", \"test/tsconfig.json\"],\n },\n overrides: [\n {\n files: [\"src/**/*.ts\", \"test/**/*.ts\"],\n rules: {\n \"@typescript-eslint/consistent-type-definitions\": \"off\",\n \"@typescript-eslint/no-empty-function\": \"off\",\n \"@typescript-eslint/no-empty-interface\": \"off\",\n \"@typescript-eslint/no-explicit-any\": \"off\",\n \"@typescript-eslint/no-inferrable-types\": \"off\",\n \"@typescript-eslint/no-namespace\": \"off\",\n \"@typescript-eslint/no-non-null-assertion\": \"off\",\n \"@typescript-eslint/no-unused-expressions\": \"off\",\n \"@typescript-eslint/no-unused-vars\": \"off\",\n \"@typescript-eslint/no-var-requires\": \"off\",\n \"@typescript-eslint/no-floating-promises\": \"error\",\n \"@typescript-eslint/no-require-imports\": \"off\",\n \"@typescript-eslint/no-empty-object-type\": \"off\",\n \"@typescript-eslint/prefer-as-const\": \"off\",\n \"prefer-as-const\": \"off\",\n },\n },\n ],\n};\n",
|
|
3
|
+
".gitignore": "./autobe/\nbin/\ndist/\nlib/\nnode_modules/\n\nprisma/migrations\nprisma/schema/migrations\nprisma/bbs.db\n\n*.DS_Store\n.env\n.npmrc\npackage-lock.json\npnpm-lock.yaml",
|
|
4
|
+
"LICENSE": "MIT License\n\nCopyright (c) 2025 Wrtn Technologies\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.",
|
|
5
|
+
"README.md": "# AutoBE Generated Backend Server\n\n\n\nA backend repository generated by [`@autobe`](https://github.com/wrtnlabs/autobe).\n\nThis backend program was automatically generated using [`@autobe`](https://github.com/wrtnlabs/autobe), the AI vibe coding agent for backend servers of below stack.\n\n- TypeScript\n- NestJS / Nestia\n- Prisma\n- Postgres\n\n```mermaid\nflowchart\nsubgraph \"Backend Coding Agent\"\n coder(\"Facade Controller\")\nend\nsubgraph \"Functional Agents\"\n coder --\"Requirements Analysis\"--> analyze(\"{{ANALYSIS_EMOJI}} Analyze\")\n coder --\"ERD\"--> prisma(\"{{PRISMA_EMOJI}} Prisma\")\n coder --\"API Design\"--> interface(\"{{INTERFACE_EMOJI}} Interface\")\n coder --\"Test Codes\" --> test(\"{{TEST_EMOJI}} Test\")\n coder --\"Main Program\" --> realize(\"{{REALIZE_EMOJI}} Realize\")\nend\nsubgraph \"Compiler Feedback\"\n prisma --\"validates\" --> prismaCompiler(\"Prisma Compiler\")\n interface --\"validates\" --> openapiValidator(\"OpenAPI Validator\")\n interface --\"generates\" --> tsCompiler(\"TypeScript Compiler\")\n test --\"validates\" --> tsCompiler(\"TypeScript Compiler\")\n realize --\"validates\" --> tsCompiler(\"TypeScript Compiler\")\nend\n```\n\nAlso, this backend application was built following [`@autobe`](https://github.com/wrtnlabs/autobe)'s waterfall development model, where each specialized AI agent handles a specific phase of development. The process ensures 100% working code through continuous compiler feedback and validation at every stage.\n\nEach agent receives input from previous phases and produces validated output that becomes the foundation for the next development stage. The **Facade Controller** orchestrates the entire process, while **Functional Agents** handle specialized tasks with built-in **Compiler Feedback** ensuring code quality and correctness.\n\nBelow table shows the mapping between waterfall phases, corresponding [`@autobe`](https://github.com/wrtnlabs/autobe) agents, and the actual deliverables you can find in this repository:\n\nWaterfall Model | AutoBe Agent | Result\n----------------|--------------|----------------------------------------------\nRequirements | ✅ Facade | Conversation History\nAnalysis | {{ANALYSIS_EMOJI}} Analyze | [Requirement Analysis Report](docs/analysis)\nDesign | {{PRISMA_EMOJI}} Prisma | [Entity Relationship Diagram](docs/ERD.md) / [Prisma Schema](prisma/schema)\nDesign | {{INTERFACE_EMOJI}} Interface | [API Controllers](src/controllers) / [DTO Structures](src/api/structures)\nDevelopment | {{REALIZE_EMOJI}} Realize | [API Provider Functions](src/providers)\nTesting | {{TEST_EMOJI}} Test | [E2E Test Functions](test/features/api)\nMaintenance | - | Use Claude Code like AI coding tool please\n\n## Project Structure\n\nThis template project has categorized directories like below.\n\nAs you can see from the below, all of the Backend source files are placed into the [src](src/) directory. When you build the TypeScript source files, compiled files would be placed into the `lib` directory following the [`tsconfig.json`](tsconfig.json) configuration. Otherwise you build client [SDK library](https://nestia.io/docs/sdk/) for npm publishing and their compiled files would be placed into the [`packages`](packages) directory.\n\n - [`packages/api/`](packages/api): SDK module built by `npm run build:api`\n - [`docs/`](docs/): Documentation directory\n - [`docs/analysis`](docs/analysis/): Requirement Analysis report\n - [`docs/ERD.md`](docs/ERD.md): Entity Relationship Diagram and detailed descriptions\n - [`prisma/schema`](prisma/schema): Prisma ORM schema files\n - [`src/`](src): Backend source directory\n - [`src/api/`](src/api/): Client SDK that would be published to the `@ORGANIZATION/PROJECT-api`\n - [`src/api/functional/`](src/api/functional/): API functions generated by the [`nestia`](https://github.com/samchon/nestia)\n - [`src/api/structures/`](src/api/structures/): DTO structures\n - [`src/controllers/`](src/controllers/): Controller classes of the Main Program\n - [`src/providers/`](src/providers/): Implementations of the API functions\n - [`test/`](test): Test Automation Program\n - [`test/features`](test/features): List of test functions\n - [`nestia.config.ts`](nestia.config.ts): Configuration file of [`nestia`](https://github.com/samchon/nestia)\n - [`package.json`](package.json): NPM configuration\n - [`tsconfig.json`](tsconfig.json): TypeScript configuration for the main program\n\n## NPM Run Commands\n\nList of the run commands defined in the [package.json](package.json) are like below:\n\n - Test\n - **`test`**: Run test automation program\n - `benchmark`: Run performance benchmark program\n - Build\n - `build`: Build everything\n - `build:main`: Build main program (`src` directory)\n - `build:test` Build test automation program (`test` directory)\n - `build:sdk`: Build SDK into main program only\n - `build:swagger`: Build Swagger Documents\n - **`dev`**: Incremental build for development (test program)\n - Deploy\n - `package:api`: Build and deploy the SDK library to the NPM\n - `start`: Start the backend server\n - `start:dev`: Start the backend server with incremental build and reload\n - Webpack\n - `webpack`: Run webpack bundler\n - `webpack:start`: Start the backend server built by webpack\n - `webpack:test`: Run test program to the webpack built\n\n## Specialization\n\nTransform this template project to be yours.\n\nWhen you've created a new backend project through this template project, you can specialize it to be suitable for you by changing some words. Replace below words through IDE specific function like `Edit > Replace in Files` (*Ctrl + Shift + H*), who've been supported by the VSCode.\n\n| Before | After\n|--------------|----------------------------------------\n| ORGANIZATION | Your account or corporation name\n| PROJECT | Your own project name\n| AUTHOR | Author name\n| https://github.com/samchon/nestia-start | Your repository URL\n\n## Benchmark\n\n### Aggregate\n\nPhase | Generated | FCSR | Token Consumption | Elapsed Time\n------|-----------|------|-------------------|--------------\n{{BENCHMARK_AGGREGATE}}\n\nThis table shows the comprehensive metrics for each phase of the AutoBE generation pipeline. For each phase (Analyze, Prisma, Interface, Test, Realize), it tracks:\n\n- **Phase**: The pipeline phase with success (✅) or failure (❌) indicator\n- **Generated**: Count of artifacts produced (e.g., actors, documents, namespaces, models, operations, schemas, functions)\n- **FCSR**: Function calling success rate\n- **Token Consumption**: Total number of LLM tokens consumed during the phase\n- **Elapsed Time**: Wall-clock time taken to complete the phase, including all AI agent operations and compiler feedback loops\n\nThese aggregate metrics provide visibility into the computational cost and time requirements of the entire generation process, helping identify resource-intensive phases and overall pipeline efficiency.\n\n### Function Calling\n\nType | Trial | Validation Failure | JSON Parse Error | Success | Success Rate\n:----|------:|-------------------:|-----------------:|---------:|-------------:\n{{BENCHMARK_FUNCTION_CALLING}}\n\nThis table shows the reliability and quality metrics for AI agent function calling operations across all phases. Each row represents a specific operation type (e.g., `analyzeScenario`, `prismaSchema`, `realizeWrite`), tracking:\n\n- **Type**: The AI agent operation name\n- **Trial**: Total number of function calling attempts made by the agent\n- **Validation Failure**: Calls that produced valid JSON but failed type validation\n- **JSON Parse Error**: Calls that produced malformed JSON that couldn't be parsed\n- **Success**: Calls that completed successfully with valid, validated responses\n- **Success Rate**: Percentage of successful calls out of total attempts\n\nThese metrics reveal the effectiveness of AutoBE's validation feedback strategy powered by [`typia.llm.application<Class, Model>()`](https://typia.io/docs/llm/application/). When function calls fail type validation, detailed error messages are fed back to the AI agent, enabling iterative correction through self-healing spiral loops.\n\nSuccess rates vary based on model size and capability - smaller models may have lower initial success rates. However, validation feedback enables even weaker models to achieve high success rates through automatic correction cycles, demonstrating the power of compiler-driven development.\n\n## License\n\nAutoBE is licensed under the [GNU Affero General Public License v3.0 (AGPL-3.0)](https://github.com/wrtnlabs/autobe/?tab=AGPL-3.0-1-ov-file#readme). If you modify AutoBE itself or offer it as a network service, you must make your source code available under the same license.\n\nHowever, backend applications generated by AutoBE can be relicensed under any license you choose, such as MIT. This means you can freely use AutoBE-generated code in commercial projects without open source obligations, similar to how other code generation tools work.\n",
|
|
6
|
+
"typos.toml": "[default]\nlocale = 'en-us'\nextend-ignore-re = [\n \"(?Rm)^.*(<!--|#|//)\\\\s*spellchecker:disable-line(-->|\\n)?$\",\n \".*(?:spellchecker|typos):\\\\s?ignore-next-line[^\\\\n]*\\\\n[^\\\\n]*\",\n \"(?s)(<!--|#|//)\\\\s*spellchecker:off\\\\s*(-->|\\n).*?(<!--|#|//)\\\\s*spellchecker:on\",\n]\n\n[default.extend-words]\nJeongho = \"Jeongho\"\nNam = \"Nam\"\ntypia = \"typia\"\n\n[files]\nextend-exclude = [\"*.json\"]"
|
|
7
|
+
};
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
export const AutoBeCompilerInterfaceTemplate: Record<string, string> = {
|
|
2
|
-
".eslintrc.cjs": "module.exports = {\n root: true,\n plugins: [\"@typescript-eslint\", \"deprecation\"],\n extends: [\"plugin:@typescript-eslint/recommended\"],\n parser: \"@typescript-eslint/parser\",\n parserOptions: {\n project: [\"tsconfig.json\", \"test/tsconfig.json\"],\n },\n overrides: [\n {\n files: [\"src/**/*.ts\", \"test/**/*.ts\"],\n rules: {\n \"@typescript-eslint/consistent-type-definitions\": \"off\",\n \"@typescript-eslint/no-empty-function\": \"off\",\n \"@typescript-eslint/no-empty-interface\": \"off\",\n \"@typescript-eslint/no-explicit-any\": \"off\",\n \"@typescript-eslint/no-inferrable-types\": \"off\",\n \"@typescript-eslint/no-namespace\": \"off\",\n \"@typescript-eslint/no-non-null-assertion\": \"off\",\n \"@typescript-eslint/no-unused-expressions\": \"off\",\n \"@typescript-eslint/no-unused-vars\": \"off\",\n \"@typescript-eslint/no-var-requires\": \"off\",\n \"@typescript-eslint/no-floating-promises\": \"error\",\n \"@typescript-eslint/no-require-imports\": \"off\",\n \"@typescript-eslint/no-empty-object-type\": \"off\",\n \"@typescript-eslint/prefer-as-const\": \"off\",\n \"prefer-as-const\": \"off\",\n },\n },\n ],\n};\n",
|
|
3
2
|
".github/workflows/build.yml": "name: build\non:\n pull_request:\n paths:\n - 'src/**'\n - 'test/**'\n - 'package.json'\njobs:\n Ubuntu:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v4\n - uses: actions/setup-node@v4\n with:\n node-version: 20.x\n - uses: pnpm/action-setup@v4\n with:\n version: 8\n \n - name: Install Backend-Server\n run: pnpm install\n\n - name: Build Swagger\n run: pnpm run build:swagger\n\n - name: Build SDK\n run: pnpm run build:sdk\n\n - name: Compile Backend-Server\n run: pnpm run build\n\n # - name: Run Test Program\n # run: pnpm run test -- --reset true --simultaneous 16\n\n - name: EsLint\n run: pnpm run eslint\n",
|
|
4
|
-
".
|
|
5
|
-
"LICENSE": "MIT License\n\nCopyright (c) 2025 Wrtn Technologies\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.",
|
|
6
|
-
"README.md": "# AutoBE Generated Backend Server\n\n\n\nA backend repository generated by [`@autobe`](https://github.com/wrtnlabs/autobe).\n\nThis backend program was automatically generated using [`@autobe`](https://github.com/wrtnlabs/autobe), the AI vibe coding agent for backend servers of below stack.\n\n- TypeScript\n- NestJS / Nestia\n- Prisma\n- Postgres\n\n```mermaid\nflowchart\nsubgraph \"Backend Coding Agent\"\n coder(\"Facade Controller\")\nend\nsubgraph \"Functional Agents\"\n coder --\"Requirements Analysis\"--> analyze(\"Analyze\")\n coder --\"ERD\"--> prisma(\"Prisma\")\n coder --\"API Design\"--> interface(\"Interface\")\n coder --\"Test Codes\" --> test(\"Test\")\n coder --\"Main Program\" --> realize(\"Realize\")\nend\nsubgraph \"Compiler Feedback\"\n prisma --\"validates\" --> prismaCompiler(\"Prisma Compiler\")\n interface --\"validates\" --> openapiValidator(\"OpenAPI Validator\")\n interface --\"generates\" --> tsCompiler(\"TypeScript Compiler\")\n test --\"validates\" --> tsCompiler(\"TypeScript Compiler\")\n realize --\"validates\" --> tsCompiler(\"TypeScript Compiler\")\nend\n```\n\nAlso, this backend application was built following [`@autobe`](https://github.com/wrtnlabs/autobe)'s waterfall development model, where each specialized AI agent handles a specific phase of development. The process ensures 100% working code through continuous compiler feedback and validation at every stage.\n\nEach agent receives input from previous phases and produces validated output that becomes the foundation for the next development stage. The **Facade Controller** orchestrates the entire process, while **Functional Agents** handle specialized tasks with built-in **Compiler Feedback** ensuring code quality and correctness.\n\nBelow table shows the mapping between waterfall phases, corresponding [`@autobe`](https://github.com/wrtnlabs/autobe) agents, and the actual deliverables you can find in this repository:\n\nWaterfall Model | AutoBe Agent | Result\n----------------|--------------|----------------------------------------------\nRequirements | Facade | Conversation History\nAnalysis | Analyze | [Requirement Analysis Report](docs/analysis)\nDesign | Prisma | [Entity Relationship Diagram](docs/ERD.md) / [Prisma Schema](prisma/schema)\nDesign | Interface | [API Controllers](src/controllers) / [DTO Structures](src/api/structures)\nDevelopment | Realize | [API Provider Functions](src/providers)\nTesting | Test | [E2E Test Functions](test/features/api)\nMaintenance | - | Use Claude Code like AI coding tool please\n\n## Project Structure\n\nThis template project has categorized directories like below.\n\nAs you can see from the below, all of the Backend source files are placed into the [src](src/) directory. When you build the TypeScript source files, compiled files would be placed into the `lib` directory following the [`tsconfig.json`](tsconfig.json) configuration. Otherwise you build client [SDK library](https://nestia.io/docs/sdk/) for npm publishing and their compiled files would be placed into the [`packages`](packages) directory.\n\n - [`packages/api/`](packages/api): SDK module built by `npm run build:api`\n - [`docs/`](docs/): Documentation directory\n - [`docs/analysis`](docs/analysis/): Requirement Analysis report\n - [`docs/ERD.md`](docs/ERD.md): Entity Relationship Diagram and detailed descriptions\n - [`prisma/schema`](prisma/schema): Prisma ORM schema files\n - [`src/`](src): Backend source directory\n - [`src/api/`](src/api/): Client SDK that would be published to the `@ORGANIZATION/PROJECT-api`\n - [`src/api/functional/`](src/api/functional/): API functions generated by the [`nestia`](https://github.com/samchon/nestia)\n - [`src/api/structures/`](src/api/structures/): DTO structures\n - [`src/controllers/`](src/controllers/): Controller classes of the Main Program\n - [`src/providers/`](src/providers/): Implementations of the API functions\n - [`test/`](test): Test Automation Program\n - [`test/features`](test/features): List of test functions\n - [`nestia.config.ts`](nestia.config.ts): Configuration file of [`nestia`](https://github.com/samchon/nestia)\n - [`package.json`](package.json): NPM configuration\n - [`tsconfig.json`](tsconfig.json): TypeScript configuration for the main program\n\n## NPM Run Commands\n\nList of the run commands defined in the [package.json](package.json) are like below:\n\n - Test\n - **`test`**: Run test automation program\n - `benchmark`: Run performance benchmark program\n - Build\n - `build`: Build everything\n - `build:main`: Build main program (`src` directory)\n - `build:test` Build test automation program (`test` directory)\n - `build:sdk`: Build SDK into main program only\n - `build:swagger`: Build Swagger Documents\n - **`dev`**: Incremental build for development (test program)\n - Deploy\n - `package:api`: Build and deploy the SDK library to the NPM\n - `start`: Start the backend server\n - `start:dev`: Start the backend server with incremental build and reload\n - Webpack\n - `webpack`: Run webpack bundler\n - `webpack:start`: Start the backend server built by webpack\n - `webpack:test`: Run test program to the webpack built\n\n## Specialization\n\nTransform this template project to be yours.\n\nWhen you've created a new backend project through this template project, you can specialize it to be suitable for you by changing some words. Replace below words through IDE specific function like `Edit > Replace in Files` (*Ctrl + Shift + H*), who've been supported by the VSCode.\n\n| Before | After\n|--------------|----------------------------------------\n| ORGANIZATION | Your account or corporation name\n| PROJECT | Your own project name\n| AUTHOR | Author name\n| https://github.com/samchon/nestia-start | Your repository URL\n\n## License\n\nAutoBE is licensed under the [GNU Affero General Public License v3.0 (AGPL-3.0)](https://github.com/wrtnlabs/autobe/?tab=AGPL-3.0-1-ov-file#readme). If you modify AutoBE itself or offer it as a network service, you must make your source code available under the same license.\n\nHowever, backend applications generated by AutoBE can be relicensed under any license you choose, such as MIT. This means you can freely use AutoBE-generated code in commercial projects without open source obligations, similar to how other code generation tools work.\n",
|
|
7
|
-
"test/tsconfig.json": "{\n \"extends\": \"../tsconfig.json\",\n \"compilerOptions\": {\n \"outDir\": \"../bin\",\n \"noUnusedLocals\": false,\n \"noUnusedParameters\": false,\n },\n \"include\": [\".\", \"../src\"]\n}",
|
|
8
|
-
"typos.toml": "[default]\nlocale = 'en-us'\nextend-ignore-re = [\n \"(?Rm)^.*(<!--|#|//)\\\\s*spellchecker:disable-line(-->|\\n)?$\",\n \".*(?:spellchecker|typos):\\\\s?ignore-next-line[^\\\\n]*\\\\n[^\\\\n]*\",\n \"(?s)(<!--|#|//)\\\\s*spellchecker:off\\\\s*(-->|\\n).*?(<!--|#|//)\\\\s*spellchecker:on\",\n]\n\n[default.extend-words]\nJeongho = \"Jeongho\"\nNam = \"Nam\"\ntypia = \"typia\"\n\n[files]\nextend-exclude = [\"*.json\"]"
|
|
3
|
+
"test/tsconfig.json": "{\n \"extends\": \"../tsconfig.json\",\n \"compilerOptions\": {\n \"outDir\": \"../bin\",\n \"noUnusedLocals\": false,\n \"noUnusedParameters\": false,\n },\n \"include\": [\".\", \"../src\"]\n}"
|
|
9
4
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import {
|
|
2
|
-
IAutoBeGetFilesOptions,
|
|
3
2
|
IAutoBeRealizeCompiler,
|
|
4
3
|
IAutoBeRealizeCompilerListener,
|
|
5
4
|
IAutoBeRealizeControllerProps,
|
|
@@ -7,11 +6,7 @@ import {
|
|
|
7
6
|
IAutoBeRealizeTestResult,
|
|
8
7
|
} from "@autobe/interface";
|
|
9
8
|
|
|
10
|
-
import { AutoBeCompilerInterfaceTemplate } from "../raw/AutoBeCompilerInterfaceTemplate";
|
|
11
9
|
import { AutoBeCompilerRealizeTemplate } from "../raw/AutoBeCompilerRealizeTemplate";
|
|
12
|
-
import { AutoBeCompilerRealizeTemplateOfPostgres } from "../raw/AutoBeCompilerRealizeTemplateOfPostgres";
|
|
13
|
-
import { AutoBeCompilerRealizeTemplateOfSQLite } from "../raw/AutoBeCompilerRealizeTemplateOfSQLite";
|
|
14
|
-
import { AutoBeCompilerTestTemplate } from "../raw/AutoBeCompilerTestTemplate";
|
|
15
10
|
import { FilePrinter } from "../utils/FilePrinter";
|
|
16
11
|
import { testRealizeProject } from "./testRealizeProject";
|
|
17
12
|
import { writeRealizeControllers } from "./writeRealizeControllers";
|
|
@@ -44,20 +39,4 @@ export class AutoBeRealizeCompiler implements IAutoBeRealizeCompiler {
|
|
|
44
39
|
this.listener.test,
|
|
45
40
|
);
|
|
46
41
|
}
|
|
47
|
-
|
|
48
|
-
public async getTemplate(
|
|
49
|
-
options: IAutoBeGetFilesOptions,
|
|
50
|
-
): Promise<Record<string, string>> {
|
|
51
|
-
return {
|
|
52
|
-
...AutoBeCompilerInterfaceTemplate,
|
|
53
|
-
...AutoBeCompilerTestTemplate,
|
|
54
|
-
...AutoBeCompilerRealizeTemplate,
|
|
55
|
-
...(options.dbms === "postgres"
|
|
56
|
-
? AutoBeCompilerRealizeTemplateOfPostgres
|
|
57
|
-
: {}),
|
|
58
|
-
...(options.dbms === "sqlite"
|
|
59
|
-
? AutoBeCompilerRealizeTemplateOfSQLite
|
|
60
|
-
: {}),
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
42
|
}
|
|
@@ -16,8 +16,6 @@ import ts from "typescript";
|
|
|
16
16
|
import { IValidation } from "typia";
|
|
17
17
|
import typiaTransform from "typia/lib/transform";
|
|
18
18
|
|
|
19
|
-
import { AutoBeCompilerInterfaceTemplate } from "../raw/AutoBeCompilerInterfaceTemplate";
|
|
20
|
-
import { AutoBeCompilerTestTemplate } from "../raw/AutoBeCompilerTestTemplate";
|
|
21
19
|
import TestExternal from "../raw/test.json";
|
|
22
20
|
import { FilePrinter } from "../utils/FilePrinter";
|
|
23
21
|
import { shrinkCompileResult } from "../utils/shrinkCompileResult";
|
|
@@ -102,11 +100,4 @@ export class AutoBeTestCompiler implements IAutoBeTestCompiler {
|
|
|
102
100
|
public async getExternal(): Promise<Record<string, string>> {
|
|
103
101
|
return TestExternal as Record<string, string>;
|
|
104
102
|
}
|
|
105
|
-
|
|
106
|
-
public async getTemplate(): Promise<Record<string, string>> {
|
|
107
|
-
return {
|
|
108
|
-
...AutoBeCompilerInterfaceTemplate,
|
|
109
|
-
...AutoBeCompilerTestTemplate,
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
103
|
}
|