diff --git a/backend/src/build-system/__tests__/fullstack-gen.spec.ts b/backend/src/build-system/__tests__/fullstack-gen.spec.ts index d1bfe66..8e011ef 100644 --- a/backend/src/build-system/__tests__/fullstack-gen.spec.ts +++ b/backend/src/build-system/__tests__/fullstack-gen.spec.ts @@ -5,13 +5,13 @@ import { Logger } from '@nestjs/common'; import { ProjectInitHandler } from '../handlers/project-init'; import { PRDHandler } from '../handlers/product-manager/product-requirements-document/prd'; import { UXSMDHandler } from '../handlers/ux/sitemap-document'; -import { UXSitemapStructureHandler } from '../handlers/ux/sitemap-structure'; -import { UXDatamapHandler } from '../handlers/ux/datamap'; -import { DatabaseRequirementHandler } from '../handlers/database/requirements-document'; +import { UXSMSHandler } from '../handlers/ux/sitemap-structure'; +import { UXDMDHandler } from '../handlers/ux/datamap'; +import { DBRequirementHandler } from '../handlers/database/requirements-document'; import { FileStructureHandler } from '../handlers/file-manager/file-structure'; -import { UXSitemapStructurePagebyPageHandler } from '../handlers/ux/sitemap-structure/sms-page'; +import { UXSMSPageByPageHandler } from '../handlers/ux/sitemap-structure/sms-page'; import { DBSchemaHandler } from '../handlers/database/schemas/schemas'; -import { FileArchGenerateHandler } from '../handlers/file-manager/file-arch'; +import { FileFAHandler } from '../handlers/file-manager/file-arch'; import { BackendRequirementHandler } from '../handlers/backend/requirements-document'; import { BackendCodeHandler } from '../handlers/backend/code-generate'; import { BackendFileReviewHandler } from '../handlers/backend/file-review/file-review'; @@ -38,17 +38,17 @@ import { BackendFileReviewHandler } from '../handlers/backend/file-review/file-r name: 'UX Sitemap Document Node', }, { - handler: UXSitemapStructureHandler, + handler: UXSMSHandler, name: 'UX Sitemap Structure Node', // requires: ['op:UX:SMD'], }, { - handler: UXDatamapHandler, + handler: UXDMDHandler, name: 'UX DataMap Document Node', // requires: ['op:UX:SMD'], }, { - handler: DatabaseRequirementHandler, + handler: DBRequirementHandler, name: 'Database Requirements Node', // requires: ['op:UX:DATAMAP:DOC'], }, @@ -61,7 +61,7 @@ import { BackendFileReviewHandler } from '../handlers/backend/file-review/file-r }, }, { - handler: UXSitemapStructurePagebyPageHandler, + handler: UXSMSPageByPageHandler, name: 'Level 2 UX Sitemap Structure Node details', // requires: ['op:UX:SMS'], }, @@ -71,7 +71,7 @@ import { BackendFileReviewHandler } from '../handlers/backend/file-review/file-r // requires: ['op:DATABASE_REQ'], }, { - handler: FileArchGenerateHandler, + handler: FileFAHandler, name: 'File Arch', // requires: ['op:FILE:STRUCT', 'op:UX:DATAMAP:DOC'], }, diff --git a/backend/src/build-system/__tests__/test-generate-doc.spec.ts b/backend/src/build-system/__tests__/test-generate-doc.spec.ts index 7b6303f..4375955 100644 --- a/backend/src/build-system/__tests__/test-generate-doc.spec.ts +++ b/backend/src/build-system/__tests__/test-generate-doc.spec.ts @@ -1,91 +1,91 @@ -import { isIntegrationTest } from 'src/common/utils'; -import { BuildSequence } from '../types'; -import { executeBuildSequence } from './utils'; -import { Logger } from '@nestjs/common'; +// import { isIntegrationTest } from 'src/common/utils'; +// import { BuildSequence } from '../types'; +// import { executeBuildSequence } from './utils'; +// import { Logger } from '@nestjs/common'; -// TODO: adding integration flag -(isIntegrationTest ? describe : describe.skip)( - 'Sequence: PRD -> UXSD -> UXDD -> UXSS', - () => { - it('should execute the full sequence and log results to individual files', async () => { - const sequence: BuildSequence = { - id: 'test-backend-sequence', - version: '1.0.0', - name: 'Spotify-like Music Web', - description: 'Users can play music', - databaseType: 'SQLite', - steps: [ - { - id: 'step-1', - name: 'Generate PRD', - nodes: [ - { - id: 'op:PRD', - name: 'PRD Generation Node', - }, - ], - }, - { - id: 'step-2', - name: 'Generate UX Sitemap Document', - nodes: [ - { - id: 'op:UX:SMD', - name: 'UX Sitemap Document Node', - }, - ], - }, - { - id: 'step-3', - name: 'Generate UX Sitemap Structure', - nodes: [ - { - id: 'op:UX:SMS', - name: 'UX Sitemap Structure Node', - }, - ], - }, - { - id: 'step-4', - name: 'UX Data Map Document', - nodes: [ - { - id: 'op:UX:DATAMAP:DOC', - name: 'UX Data Map Document node', - }, - ], - }, - { - id: 'step-5', - name: 'UX SMD LEVEL 2 Page Details', - nodes: [ - { - id: 'op:UX:SMS:LEVEL2', - name: 'UX SMD LEVEL 2 Page Details Node', - }, - ], - }, - ], - }; +// // TODO: adding integration flag +// (isIntegrationTest ? describe : describe.skip)( +// 'Sequence: PRD -> UXSD -> UXDD -> UXSS', +// () => { +// it('should execute the full sequence and log results to individual files', async () => { +// const sequence: BuildSequence = { +// id: 'test-backend-sequence', +// version: '1.0.0', +// name: 'Spotify-like Music Web', +// description: 'Users can play music', +// databaseType: 'SQLite', +// steps: [ +// { +// id: 'step-1', +// name: 'Generate PRD', +// nodes: [ +// { +// id: 'op:PRD', +// name: 'PRD Generation Node', +// }, +// ], +// }, +// { +// id: 'step-2', +// name: 'Generate UX Sitemap Document', +// nodes: [ +// { +// id: 'op:UX:SMD', +// name: 'UX Sitemap Document Node', +// }, +// ], +// }, +// { +// id: 'step-3', +// name: 'Generate UX Sitemap Structure', +// nodes: [ +// { +// id: 'op:UX:SMS', +// name: 'UX Sitemap Structure Node', +// }, +// ], +// }, +// { +// id: 'step-4', +// name: 'UX Data Map Document', +// nodes: [ +// { +// id: 'op:UX:DATAMAP:DOC', +// name: 'UX Data Map Document node', +// }, +// ], +// }, +// { +// id: 'step-5', +// name: 'UX SMD LEVEL 2 Page Details', +// nodes: [ +// { +// id: 'op:UX:SMS:LEVEL2', +// name: 'UX SMD LEVEL 2 Page Details Node', +// }, +// ], +// }, +// ], +// }; - try { - const result = await executeBuildSequence( - 'test-generate-all-ux-part', - sequence, - ); +// try { +// const result = await executeBuildSequence( +// 'test-generate-all-ux-part', +// sequence, +// ); - Logger.log( - 'Sequence completed successfully. Logs stored in:', - result.logFolderPath, - ); +// Logger.log( +// 'Sequence completed successfully. Logs stored in:', +// result.logFolderPath, +// ); - if (!result.success) { - throw result.error; - } - } catch (error) { - Logger.error('Error during sequence execution:', error); - throw error; - } - }, 600000); - }, -); +// if (!result.success) { +// throw result.error; +// } +// } catch (error) { +// Logger.error('Error during sequence execution:', error); +// throw error; +// } +// }, 600000); +// }, +// ); diff --git a/backend/src/build-system/__tests__/test.backend-code-generator.spec.ts b/backend/src/build-system/__tests__/test.backend-code-generator.spec.ts index 1b3c5d4..75c43f8 100644 --- a/backend/src/build-system/__tests__/test.backend-code-generator.spec.ts +++ b/backend/src/build-system/__tests__/test.backend-code-generator.spec.ts @@ -4,7 +4,7 @@ import { executeBuildSequence } from './utils'; import { isIntegrationTest } from 'src/common/utils'; import { PRDHandler } from '../handlers/product-manager/product-requirements-document/prd'; import { UXSMDHandler } from '../handlers/ux/sitemap-document'; -import { DatabaseRequirementHandler } from '../handlers/database/requirements-document'; +import { DBRequirementHandler } from '../handlers/database/requirements-document'; import { DBSchemaHandler } from '../handlers/database/schemas/schemas'; import { BackendCodeHandler } from '../handlers/backend/code-generate'; import { ProjectInitHandler } from '../handlers/project-init'; @@ -49,7 +49,7 @@ import { ProjectInitHandler } from '../handlers/project-init'; }, { - handler: DatabaseRequirementHandler, + handler: DBRequirementHandler, name: 'Database Requirements Node', // requires: ['op:UX:DATAMAP:DOC'], }, diff --git a/backend/src/build-system/__tests__/test.sms-lvl2.spec.ts b/backend/src/build-system/__tests__/test.sms-lvl2.spec.ts index 10cac48..d6c684c 100644 --- a/backend/src/build-system/__tests__/test.sms-lvl2.spec.ts +++ b/backend/src/build-system/__tests__/test.sms-lvl2.spec.ts @@ -1,10 +1,10 @@ import { isIntegrationTest } from 'src/common/utils'; import { PRDHandler } from '../handlers/product-manager/product-requirements-document/prd'; import { ProjectInitHandler } from '../handlers/project-init'; -import { UXDatamapHandler } from '../handlers/ux/datamap'; +import { UXDMDHandler } from '../handlers/ux/datamap'; import { UXSMDHandler } from '../handlers/ux/sitemap-document'; -import { UXSitemapStructureHandler } from '../handlers/ux/sitemap-structure'; -import { UXSitemapStructurePagebyPageHandler } from '../handlers/ux/sitemap-structure/sms-page'; +import { UXSMSHandler as UXSMSHandler } from '../handlers/ux/sitemap-structure'; +import { UXSMSPageByPageHandler } from '../handlers/ux/sitemap-structure/sms-page'; import { BuildSequence } from '../types'; import { executeBuildSequence } from './utils'; @@ -34,15 +34,15 @@ import { executeBuildSequence } from './utils'; }, { - handler: UXSitemapStructureHandler, + handler: UXSMSHandler, name: 'UX Sitemap Structure Node', }, { - handler: UXDatamapHandler, + handler: UXDMDHandler, name: 'UX DataMap Document Node', }, { - handler: UXSitemapStructurePagebyPageHandler, + handler: UXSMSPageByPageHandler, name: 'Level 2 UX Sitemap Structure Node details', }, ], diff --git a/backend/src/build-system/handlers/backend/code-generate/index.ts b/backend/src/build-system/handlers/backend/code-generate/index.ts index 964c097..091d067 100644 --- a/backend/src/build-system/handlers/backend/code-generate/index.ts +++ b/backend/src/build-system/handlers/backend/code-generate/index.ts @@ -13,7 +13,7 @@ import { } from 'src/build-system/errors'; import { BuildNode, BuildNodeRequire } from 'src/build-system/hanlder-manager'; import { UXSMDHandler } from '../../ux/sitemap-document'; -import { UXDatamapHandler } from '../../ux/datamap'; +import { UXDMDHandler } from '../../ux/datamap'; import { DBSchemaHandler } from '../../database/schemas/schemas'; import { BackendRequirementHandler } from '../requirements-document'; @@ -23,7 +23,7 @@ import { BackendRequirementHandler } from '../requirements-document'; */ @BuildNode() -@BuildNodeRequire([UXSMDHandler, UXDatamapHandler, DBSchemaHandler]) +@BuildNodeRequire([UXSMDHandler, UXDMDHandler, DBSchemaHandler]) export class BackendCodeHandler implements BuildHandler { async run(context: BuilderContext): Promise> { const projectName = @@ -32,7 +32,7 @@ export class BackendCodeHandler implements BuildHandler { context.getGlobalContext('databaseType') || 'Default database type'; // Retrieve required documents const sitemapDoc = context.getNodeData(UXSMDHandler); - const datamapDoc = context.getNodeData(UXDatamapHandler); + const datamapDoc = context.getNodeData(UXDMDHandler); const databaseSchemas = context.getNodeData(DBSchemaHandler); const backendRequirementDoc = context.getNodeData(BackendRequirementHandler)?.overview || ''; diff --git a/backend/src/build-system/handlers/backend/requirements-document/index.ts b/backend/src/build-system/handlers/backend/requirements-document/index.ts index 98dd489..50a077e 100644 --- a/backend/src/build-system/handlers/backend/requirements-document/index.ts +++ b/backend/src/build-system/handlers/backend/requirements-document/index.ts @@ -9,8 +9,8 @@ import { } from 'src/build-system/errors'; import { chatSyncWithClocker } from 'src/build-system/utils/handler-helper'; import { BuildNode, BuildNodeRequire } from 'src/build-system/hanlder-manager'; -import { DatabaseRequirementHandler } from '../../database/requirements-document'; -import { UXDatamapHandler } from '../../ux/datamap'; +import { DBRequirementHandler } from '../../database/requirements-document'; +import { UXDMDHandler } from '../../ux/datamap'; import { UXSMDHandler } from '../../ux/sitemap-document'; type BackendRequirementResult = { @@ -29,7 +29,7 @@ type BackendRequirementResult = { */ @BuildNode() -@BuildNodeRequire([DatabaseRequirementHandler, UXDatamapHandler, UXSMDHandler]) +@BuildNodeRequire([DBRequirementHandler, UXDMDHandler, UXSMDHandler]) export class BackendRequirementHandler implements BuildHandler { @@ -46,8 +46,8 @@ export class BackendRequirementHandler const projectName = context.getGlobalContext('projectName') || 'Default Project Name'; - const dbRequirements = context.getNodeData(DatabaseRequirementHandler); - const datamapDoc = context.getNodeData(UXDatamapHandler); + const dbRequirements = context.getNodeData(DBRequirementHandler); + const datamapDoc = context.getNodeData(UXDMDHandler); const sitemapDoc = context.getNodeData(UXSMDHandler); if (!dbRequirements || !datamapDoc || !sitemapDoc) { diff --git a/backend/src/build-system/handlers/database/requirements-document/index.ts b/backend/src/build-system/handlers/database/requirements-document/index.ts index 677a23b..87fb0f1 100644 --- a/backend/src/build-system/handlers/database/requirements-document/index.ts +++ b/backend/src/build-system/handlers/database/requirements-document/index.ts @@ -8,12 +8,12 @@ import { ModelUnavailableError, } from 'src/build-system/errors'; import { chatSyncWithClocker } from 'src/build-system/utils/handler-helper'; -import { UXDatamapHandler } from '../../ux/datamap'; +import { UXDMDHandler } from '../../ux/datamap'; import { BuildNode, BuildNodeRequire } from 'src/build-system/hanlder-manager'; @BuildNode() -@BuildNodeRequire([UXDatamapHandler]) -export class DatabaseRequirementHandler implements BuildHandler { +@BuildNodeRequire([UXDMDHandler]) +export class DBRequirementHandler implements BuildHandler { private readonly logger = new Logger('DatabaseRequirementHandler'); async run(context: BuilderContext): Promise> { @@ -22,7 +22,7 @@ export class DatabaseRequirementHandler implements BuildHandler { const projectName = context.getGlobalContext('projectName') || 'Default Project Name'; - const datamapDoc = context.getNodeData(UXDatamapHandler); + const datamapDoc = context.getNodeData(UXDMDHandler); if (!datamapDoc) { this.logger.error('Data mapping document is missing.'); @@ -46,7 +46,7 @@ export class DatabaseRequirementHandler implements BuildHandler { messages: [{ content: prompt, role: 'system' }], }, 'generateDatabaseRequirementPrompt', - DatabaseRequirementHandler.name, + DBRequirementHandler.name, ); } catch (error) { throw new ModelUnavailableError('Model Unavailable:' + error); diff --git a/backend/src/build-system/handlers/database/schemas/schemas.ts b/backend/src/build-system/handlers/database/schemas/schemas.ts index 1a58c77..2e26812 100644 --- a/backend/src/build-system/handlers/database/schemas/schemas.ts +++ b/backend/src/build-system/handlers/database/schemas/schemas.ts @@ -17,11 +17,11 @@ import { ModelUnavailableError, ResponseTagError, } from 'src/build-system/errors'; -import { DatabaseRequirementHandler } from '../requirements-document'; +import { DBRequirementHandler } from '../requirements-document'; import { BuildNode, BuildNodeRequire } from 'src/build-system/hanlder-manager'; @BuildNode() -@BuildNodeRequire([DatabaseRequirementHandler]) +@BuildNodeRequire([DBRequirementHandler]) export class DBSchemaHandler implements BuildHandler { private readonly logger: Logger = new Logger('DBSchemaHandler'); async run(context: BuilderContext): Promise { @@ -32,7 +32,7 @@ export class DBSchemaHandler implements BuildHandler { context.getGlobalContext('projectName') || 'Default Project Name'; const databaseType = context.getGlobalContext('databaseType') || 'PostgreSQL'; - const dbRequirements = context.getNodeData(DatabaseRequirementHandler); + const dbRequirements = context.getNodeData(DBRequirementHandler); const uuid = context.getGlobalContext('projectUUID'); // 2. Validate database type diff --git a/backend/src/build-system/handlers/file-manager/file-arch/index.ts b/backend/src/build-system/handlers/file-manager/file-arch/index.ts index fcadede..acf633f 100644 --- a/backend/src/build-system/handlers/file-manager/file-arch/index.ts +++ b/backend/src/build-system/handlers/file-manager/file-arch/index.ts @@ -19,12 +19,12 @@ import { validateAgainstVirtualDirectory, } from 'src/build-system/utils/file_generator_util'; import { FileStructureHandler } from '../file-structure'; -import { UXDatamapHandler } from '../../ux/datamap'; +import { UXDMDHandler } from '../../ux/datamap'; import { BuildNode, BuildNodeRequire } from 'src/build-system/hanlder-manager'; @BuildNode() -@BuildNodeRequire([FileStructureHandler, UXDatamapHandler]) -export class FileArchGenerateHandler implements BuildHandler { +@BuildNodeRequire([FileStructureHandler, UXDMDHandler]) +export class FileFAHandler implements BuildHandler { private readonly logger: Logger = new Logger('FileArchGenerateHandler'); private virtualDir: VirtualDirectory; @@ -34,7 +34,7 @@ export class FileArchGenerateHandler implements BuildHandler { this.virtualDir = context.virtualDirectory; const fileStructure = context.getNodeData(FileStructureHandler); - const datamapDoc = context.getNodeData(UXDatamapHandler); + const datamapDoc = context.getNodeData(UXDMDHandler); if (!fileStructure || !datamapDoc) { Logger.error(fileStructure); @@ -58,7 +58,7 @@ export class FileArchGenerateHandler implements BuildHandler { messages: [{ content: prompt, role: 'system' }], }, 'generateFileArch', - FileArchGenerateHandler.name, + FileFAHandler.name, ); } catch (error) { this.logger.error('Model is unavailable:' + error); diff --git a/backend/src/build-system/handlers/file-manager/file-generate/index.ts b/backend/src/build-system/handlers/file-manager/file-generate/index.ts index 26a0a2a..2c45df4 100644 --- a/backend/src/build-system/handlers/file-manager/file-generate/index.ts +++ b/backend/src/build-system/handlers/file-manager/file-generate/index.ts @@ -13,18 +13,18 @@ import { FileWriteError, } from 'src/build-system/errors'; import { getProjectPath } from 'codefox-common'; -import { FileArchGenerateHandler } from '../file-arch'; +import { FileFAHandler } from '../file-arch'; import { BuildNode, BuildNodeRequire } from 'src/build-system/hanlder-manager'; @BuildNode() -@BuildNodeRequire([FileArchGenerateHandler]) +@BuildNodeRequire([FileFAHandler]) export class FileGeneratorHandler implements BuildHandler { private readonly logger = new Logger('FileGeneratorHandler'); private virtualDir: VirtualDirectory; async run(context: BuilderContext): Promise> { this.virtualDir = context.virtualDirectory; - const fileArchDoc = context.getNodeData(FileArchGenerateHandler); + const fileArchDoc = context.getNodeData(FileFAHandler); const uuid = context.getGlobalContext('projectUUID'); if (!fileArchDoc) { diff --git a/backend/src/build-system/handlers/file-manager/file-structure/index.ts b/backend/src/build-system/handlers/file-manager/file-structure/index.ts index ea77d8a..5a90fa9 100644 --- a/backend/src/build-system/handlers/file-manager/file-structure/index.ts +++ b/backend/src/build-system/handlers/file-manager/file-structure/index.ts @@ -14,7 +14,7 @@ import { MissingConfigurationError, } from 'src/build-system/errors'; import { UXSMDHandler } from '../../ux/sitemap-document'; -import { UXDatamapHandler } from '../../ux/datamap'; +import { UXDMDHandler } from '../../ux/datamap'; import { BuildNode, BuildNodeRequire } from 'src/build-system/hanlder-manager'; /** @@ -22,7 +22,7 @@ import { BuildNode, BuildNodeRequire } from 'src/build-system/hanlder-manager'; * based on the provided documentation. */ @BuildNode() -@BuildNodeRequire([UXSMDHandler, UXDatamapHandler]) +@BuildNodeRequire([UXSMDHandler, UXDMDHandler]) export class FileStructureHandler implements BuildHandler { readonly id = 'op:FILE:STRUCT'; private readonly logger: Logger = new Logger('FileStructureHandler'); @@ -37,7 +37,7 @@ export class FileStructureHandler implements BuildHandler { const projectName = context.getGlobalContext('projectName') || 'Default Project Name'; const sitemapDoc = context.getNodeData(UXSMDHandler); - const datamapDoc = context.getNodeData(UXDatamapHandler); + const datamapDoc = context.getNodeData(UXDMDHandler); const projectPart = opts?.projectPart ?? 'frontend'; const framework = context.getGlobalContext('framework') ?? 'react'; diff --git a/backend/src/build-system/handlers/frontend-code-generate/index.ts b/backend/src/build-system/handlers/frontend-code-generate/index.ts index 112c5a0..8eb6a1a 100644 --- a/backend/src/build-system/handlers/frontend-code-generate/index.ts +++ b/backend/src/build-system/handlers/frontend-code-generate/index.ts @@ -13,10 +13,10 @@ import { readFile } from 'fs/promises'; import { parseGenerateTag } from 'src/build-system/utils/strings'; import { generateFrontEndCodePrompt, generateCSSPrompt } from './prompt'; -import { UXSitemapStructureHandler } from '../ux/sitemap-structure'; -import { UXDatamapHandler } from '../ux/datamap'; +import { UXSMSHandler } from '../ux/sitemap-structure'; +import { UXDMDHandler } from '../ux/datamap'; import { BackendRequirementHandler } from '../backend/requirements-document'; -import { FileArchGenerateHandler } from '../file-manager/file-arch'; +import { FileFAHandler } from '../file-manager/file-arch'; import { BuildNode, BuildNodeRequire } from 'src/build-system/hanlder-manager'; /** @@ -26,10 +26,10 @@ import { BuildNode, BuildNodeRequire } from 'src/build-system/hanlder-manager'; */ @BuildNode() @BuildNodeRequire([ - UXSitemapStructureHandler, - UXDatamapHandler, + UXSMSHandler, + UXDMDHandler, BackendRequirementHandler, - FileArchGenerateHandler, + FileFAHandler, ]) export class FrontendCodeHandler implements BuildHandler { readonly logger: Logger = new Logger('FrontendCodeHandler'); @@ -45,12 +45,12 @@ export class FrontendCodeHandler implements BuildHandler { this.logger.log('Generating Frontend Code...'); // 1. Retrieve the necessary input from context - const sitemapStruct = context.getNodeData(UXSitemapStructureHandler); - const uxDataMapDoc = context.getNodeData(UXDatamapHandler); + const sitemapStruct = context.getNodeData(UXSMSHandler); + const uxDataMapDoc = context.getNodeData(UXDMDHandler); const backendRequirementDoc = context.getNodeData( BackendRequirementHandler, ); - const fileArchDoc = context.getNodeData(FileArchGenerateHandler); + const fileArchDoc = context.getNodeData(FileFAHandler); // 2. Grab any globally stored context as needed this.virtualDir = context.virtualDirectory; diff --git a/backend/src/build-system/handlers/ux/datamap/index.ts b/backend/src/build-system/handlers/ux/datamap/index.ts index a356ebc..178ddd5 100644 --- a/backend/src/build-system/handlers/ux/datamap/index.ts +++ b/backend/src/build-system/handlers/ux/datamap/index.ts @@ -16,7 +16,7 @@ import { UXSMDHandler } from '../sitemap-document'; */ @BuildNode() @BuildNodeRequire([UXSMDHandler]) -export class UXDatamapHandler implements BuildHandler { +export class UXDMDHandler implements BuildHandler { private readonly logger = new Logger('UXDatamapHandler'); async run(context: BuilderContext): Promise> { @@ -51,7 +51,7 @@ export class UXDatamapHandler implements BuildHandler { messages: [{ content: prompt, role: 'system' }], }, 'generateUXDataMap', - UXDatamapHandler.name, + UXDMDHandler.name, ); this.logger.log('Successfully generated UX Data Map content.'); diff --git a/backend/src/build-system/handlers/ux/sitemap-structure/index.ts b/backend/src/build-system/handlers/ux/sitemap-structure/index.ts index 447473a..f86cad6 100644 --- a/backend/src/build-system/handlers/ux/sitemap-structure/index.ts +++ b/backend/src/build-system/handlers/ux/sitemap-structure/index.ts @@ -19,7 +19,7 @@ import { BuildNode, BuildNodeRequire } from 'src/build-system/hanlder-manager'; @BuildNode() @BuildNodeRequire([UXSMDHandler]) -export class UXSitemapStructureHandler implements BuildHandler { +export class UXSMSHandler implements BuildHandler { private readonly logger = new Logger('UXSitemapStructureHandler'); async run(context: BuilderContext): Promise> { @@ -91,7 +91,7 @@ export class UXSitemapStructureHandler implements BuildHandler { messages, }, 'generateUXSiteMapStructre', - UXSitemapStructureHandler.name, + UXSMSHandler.name, ); if (!uxStructureContent || uxStructureContent.trim() === '') { diff --git a/backend/src/build-system/handlers/ux/sitemap-structure/sms-page.ts b/backend/src/build-system/handlers/ux/sitemap-structure/sms-page.ts index d801985..45224e4 100644 --- a/backend/src/build-system/handlers/ux/sitemap-structure/sms-page.ts +++ b/backend/src/build-system/handlers/ux/sitemap-structure/sms-page.ts @@ -9,13 +9,11 @@ import { } from 'src/build-system/errors'; import { BuildNode, BuildNodeRequire } from 'src/build-system/hanlder-manager'; import { UXSMDHandler } from '../sitemap-document'; -import { UXSitemapStructureHandler } from '.'; +import { UXSMSHandler } from '.'; @BuildNode() -@BuildNodeRequire([UXSMDHandler, UXSitemapStructureHandler]) -export class UXSitemapStructurePagebyPageHandler - implements BuildHandler -{ +@BuildNodeRequire([UXSMDHandler, UXSMSHandler]) +export class UXSMSPageByPageHandler implements BuildHandler { readonly logger = new Logger('UXSitemapStructurePagebyPageHandler'); async run(context: BuilderContext): Promise> { @@ -24,7 +22,7 @@ export class UXSitemapStructurePagebyPageHandler const projectName = context.getGlobalContext('projectName') || 'Default Project Name'; const sitemapDoc = context.getNodeData(UXSMDHandler); - const uxStructureDoc = context.getNodeData(UXSitemapStructureHandler); + const uxStructureDoc = context.getNodeData(UXSMSHandler); // Validate required data if (!projectName || typeof projectName !== 'string') { @@ -94,7 +92,7 @@ export class UXSitemapStructurePagebyPageHandler const refinedGlobalCompSections = await batchChatSyncWithClock( context, 'generate global components', - UXSitemapStructurePagebyPageHandler.name, + UXSMSPageByPageHandler.name, requests, ); refinedSections.push(refinedGlobalCompSections); @@ -151,7 +149,7 @@ export class UXSitemapStructurePagebyPageHandler const refinedPageViewSections = await batchChatSyncWithClock( context, 'generate page by page details', - UXSitemapStructurePagebyPageHandler.name, + UXSMSPageByPageHandler.name, page_view_requests, ); refinedSections.push(refinedPageViewSections); diff --git a/backend/src/build-system/utils/__test__/build-utils.spec.ts b/backend/src/build-system/utils/__test__/build-utils.spec.ts index 8e8c21c..5923d1e 100644 --- a/backend/src/build-system/utils/__test__/build-utils.spec.ts +++ b/backend/src/build-system/utils/__test__/build-utils.spec.ts @@ -3,13 +3,13 @@ import { Logger } from '@nestjs/common'; import { ProjectInitHandler } from 'src/build-system/handlers/project-init'; import { PRDHandler } from 'src/build-system/handlers/product-manager/product-requirements-document/prd'; import { UXSMDHandler } from 'src/build-system/handlers/ux/sitemap-document'; -import { UXSitemapStructureHandler } from 'src/build-system/handlers/ux/sitemap-structure'; -import { UXDatamapHandler } from 'src/build-system/handlers/ux/datamap'; -import { DatabaseRequirementHandler } from 'src/build-system/handlers/database/requirements-document'; +import { UXSMSHandler } from 'src/build-system/handlers/ux/sitemap-structure'; +import { UXDMDHandler } from 'src/build-system/handlers/ux/datamap'; +import { DBRequirementHandler } from 'src/build-system/handlers/database/requirements-document'; import { FileStructureHandler } from 'src/build-system/handlers/file-manager/file-structure'; -import { UXSitemapStructurePagebyPageHandler } from 'src/build-system/handlers/ux/sitemap-structure/sms-page'; +import { UXSMSPageByPageHandler } from 'src/build-system/handlers/ux/sitemap-structure/sms-page'; import { DBSchemaHandler } from 'src/build-system/handlers/database/schemas/schemas'; -import { FileArchGenerateHandler } from 'src/build-system/handlers/file-manager/file-arch'; +import { FileFAHandler } from 'src/build-system/handlers/file-manager/file-arch'; import { BackendRequirementHandler } from 'src/build-system/handlers/backend/requirements-document'; import { BackendCodeHandler } from 'src/build-system/handlers/backend/code-generate'; import { BackendFileReviewHandler } from 'src/build-system/handlers/backend/file-review/file-review'; @@ -39,15 +39,15 @@ describe('Build Sequence Test', () => { name: 'UX Sitemap Document Node', }, { - handler: UXSitemapStructureHandler, + handler: UXSMSHandler, name: 'UX Sitemap Structure Node', }, { - handler: UXDatamapHandler, + handler: UXDMDHandler, name: 'UX DataMap Document Node', }, { - handler: DatabaseRequirementHandler, + handler: DBRequirementHandler, name: 'Database Requirements Node', }, { @@ -58,7 +58,7 @@ describe('Build Sequence Test', () => { }, }, { - handler: UXSitemapStructurePagebyPageHandler, + handler: UXSMSPageByPageHandler, name: 'Level 2 UX Sitemap Structure Node details', }, { @@ -66,7 +66,7 @@ describe('Build Sequence Test', () => { name: 'Database Schemas Node', }, { - handler: FileArchGenerateHandler, + handler: FileFAHandler, name: 'File Arch', }, { @@ -132,15 +132,15 @@ describe('sortBuildSequence Tests', () => { }, { - handler: UXSitemapStructureHandler, + handler: UXSMSHandler, name: 'UX Sitemap Structure Node', }, { - handler: UXDatamapHandler, + handler: UXDMDHandler, name: 'UX DataMap Document Node', }, { - handler: UXSitemapStructurePagebyPageHandler, + handler: UXSMSPageByPageHandler, name: 'Level 2 UX Sitemap Structure Node details', }, ],