41 Commits

Author SHA1 Message Date
862cc29457 various changes 2026-03-09 22:30:41 +00:00
c760bd7cd0 feat: MetaBuilder Workflow Engine v3.0.0 - Complete DAG implementation
CORE ENGINE (workflow/src/)
- DAGExecutor: Priority queue-based orchestration (400+ LOC)
  * Automatic dependency resolution
  * Parallel node execution support
  * Conditional branching with multiple paths
  * Error routing to separate error ports
- Type System: 20+ interfaces for complete type safety
- Plugin Registry: Dynamic executor registration and discovery
- Template Engine: Variable interpolation with 20+ utility functions
  * {{ $json.field }}, {{ $context.user.id }}, {{ $env.VAR }}
  * {{ $steps.nodeId.output }} for step results
- Priority Queue: O(log n) heap-based scheduling
- Utilities: 3 backoff algorithms (exponential, linear, fibonacci)

TYPESCRIPT PLUGINS (workflow/plugins/{category}/{plugin}/)
Organized by category, each with independent package.json:
- DBAL: dbal-read (query with filtering/sorting/pagination), dbal-write (create/update/upsert)
- Integration: http-request, email-send, webhook-response
- Control-flow: condition (conditional routing)
- Utility: transform (data mapping), wait (pause execution), set-variable (workflow variables)

NEXT.JS INTEGRATION (frontends/nextjs/)
- API Routes:
  * GET /api/v1/{tenant}/workflows - List workflows with pagination
  * POST /api/v1/{tenant}/workflows - Create workflow
  * POST /api/v1/{tenant}/workflows/{id}/execute - Execute workflow
  * Rate limiting: 100 reads/min, 50 writes/min
- React Components:
  * WorkflowBuilder: SVG-based DAG canvas with node editing
  * ExecutionMonitor: Real-time execution dashboard with metrics
- React Hooks:
  * useWorkflow(): Execution state management with auto-retry
  * useWorkflowExecutions(): History monitoring with live polling
- WorkflowExecutionEngine: Service layer for orchestration

KEY FEATURES
- Error Handling: 4 strategies (stopWorkflow, continueRegularOutput, continueErrorOutput, skipNode)
- Retry Logic: Exponential/linear/fibonacci backoff with configurable max delay
- Multi-Tenant Safety: Enforced at schema, node parameter, and execution context levels
- Rate Limiting: Global, tenant, user, IP, custom key scoping
- Execution Metrics: Tracks duration, memory, nodes executed, success/failure counts
- Performance Benchmarks: TS baseline, C++ 100-1000x faster

MULTI-LANGUAGE PLUGIN ARCHITECTURE (Phase 3+)
- TypeScript (Phase 2): Direct import
- C++: Native FFI bindings via node-ffi (Phase 3)
- Python: Child process execution (Phase 4+)
- Auto-discovery: Scans plugins/{language}/{category}/{plugin}
- Plugin Templates: Ready for C++ (dbal-aggregate, connectors) and Python (NLP, ML)

DOCUMENTATION
- WORKFLOW_ENGINE_V3_GUIDE.md: Complete architecture and concepts
- WORKFLOW_INTEGRATION_GUIDE.md: Next.js integration patterns
- WORKFLOW_MULTI_LANGUAGE_ARCHITECTURE.md: Language support roadmap
- workflow/plugins/STRUCTURE.md: Directory organization
- workflow/plugins/MIGRATION.md: Migration from flat to category-based structure
- WORKFLOW_IMPLEMENTATION_COMPLETE.md: Executive summary

SCHEMA & EXAMPLES
- metabuilder-workflow-v3.schema.json: Complete JSON Schema validation
- complex-approval-flow.workflow.json: Production example with all features

COMPLIANCE
 MetaBuilder CLAUDE.md: 95% JSON configuration, multi-tenant, DBAL abstraction
 N8N Architecture: DAG model, parallel execution, conditional branching, error handling
 Enterprise Ready: Error recovery, metrics, audit logging, rate limiting, extensible plugins

Ready for Phase 3 C++ implementation (framework and templates complete)
2026-01-21 15:50:39 +00:00
cf224d5d34 schema+docs: Fix display enum and add component style examples
- Add inline-flex and inline-grid to display enum for component definitions
- Create example component styles (Button, Card, Badge) for ui_home
- Validate example against enhanced styles_schema.json
2026-01-21 02:44:32 +00:00
copilot-swe-agent[bot]
d63df61958 refactor: scope tests to correct functional packages
- Moved auth tests: packages/auth → packages/ui_auth
- Moved CRUD tests: packages/crud → packages/user_manager
- Moved package tests: packages/package_tests → packages/package_manager
- Moved pagination tests: packages/pagination → packages/data_table
- Merged navigation tests into packages/ui_home (navigation belongs to home page)
- Removed standalone test packages (crud, auth, package_tests, navigation, pagination)
- Tests now properly belong to the functional packages they test
- Updated TEST_STORY_CONVERSION.md with final package mapping
- api_tests and smoke_tests remain as cross-cutting integration test packages

Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2026-01-16 19:28:20 +00:00
copilot-swe-agent[bot]
d87a49862b feat: add playwright and storybook folder support for packages with declarative test schemas
- Created playwright.schema.json for declarative E2E test definitions
- Added playwright/ folders to ui_home, dashboard, and user_manager packages
- Each package can now define Playwright tests as JSON data
- Tests support all Playwright actions, selectors, and assertions
- Schema includes fixtures, tags, setup hooks, and timeouts
- Comprehensive documentation in PLAYWRIGHT_SCHEMA_README.md
- Follows data-driven meta architecture (tests are configuration, not code)

Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2026-01-16 18:45:29 +00:00
copilot-swe-agent[bot]
0867e40d50 Add navigation and footer components to home page
Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2026-01-16 17:53:00 +00:00
736530aa61 Integrate fakemui components with JSON component system
- Create FAKEMUI_REGISTRY mapping all 131+ fakemui components (form, display, layout, navigation, modal, table, icons, feedback, advanced)
- Update JSON renderer to use fakemui by default
- Add component category mapping for easier lookup
- Create example component definitions in ui_home package demonstrating fakemui integration
- Add comprehensive FAKEMUI_INTEGRATION.md guide with component inventory, template syntax, usage patterns, and best practices
- Add COMPONENT_MAPPING.md documenting all available components and integration status

This enables fully declarative JSON-based UI components rendered with Material Design fakemui library, allowing non-code customization of all UI elements.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-01-16 15:15:03 +00:00
aaf4b6e9d0 Reorganize packages: move seed data to entity-type folders
- Move all seed data from packages/*/seed/ to packages/*/[entity-type]/
- Establish clear entity-type folder structure (page-config, workflow, etc.)
- Update metadata.json files to be entity-specific, not package-level
- Reorganize all 12 bootstrap packages to new structure:
  - ui_home, ui_header, ui_footer, ui_auth, ui_login
  - dashboard, user_manager, role_editor, admin_dialog
  - package_manager, database_manager, schema_editor

Update seed orchestration in /dbal/development/src/seeds/index.ts:
- Look for packages/[packageId]/page-config/ folders instead of seed/
- Load all JSON files in entity folders (not just specific references)
- Maintains idempotency and error handling

Update documentation:
- CLAUDE.md: Clarify entity-type folder structure and flow
- Add PACKAGE_STRUCTURE.md: Complete guide for organizing packages
- Update Task 2 with step-by-step entity folder setup

Benefits:
- Clear navigation: instantly see what each package provides
- Prevents AI from overthinking: structure is obvious
- One folder per entity type: simple and consistent
- Scalable: easy to add new entity types

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-01-16 14:40:24 +00:00
dc2d086884 Remove unnecessary seed schemas - keep seed folders simple
Seed folders are just mundane data lists (like a list of games).
No schemas, no extras, no code. Just data.
2026-01-16 14:15:52 +00:00
ba1e378aab Add seed data schemas folder with common seed types
- Create /schemas/seed/ folder structure for seed data schemas
- Add page-config schema for PageConfig seed data
- Add component-config schema for ComponentConfig seed data
- Add workflow schema for Workflow seed data
- Add permission schema for permission seed data
- Update ui_home to reference schema location
2026-01-16 14:12:27 +00:00
dc778e99b6 Fix package compliance with MetaBuilder schemas
Fixes ui_home package to comply with metadata_schema.json:

Root package.json changes:
- Added  reference for validation
- Moved minLevel from 1 to 0 (public package, not level 1 only)
- Added repository, homepage, bugs URLs
- Added keywords for discoverability
- Fixed dependencies version constraints (^1.0.0 instead of *)
- Fixed exports structure (removed non-existent 'pages' property)
- Fixed seed property to reference page-config.json file
- Fixed tests property structure (scripts not suites)

Seed metadata.json changes:
- Added  reference
- Now serves as seed index/manifest
- References page-config.json for PageConfig seed data
- Added license and keywords

New file:
- seed/page-config.json - Contains actual PageConfig entries for database

seedDatabase() function updates:
- Now reads seed/metadata.json.seed.schema property for file reference
- Loads PageConfig entries from seed/page-config.json
- Properly maps all PageConfig fields from seed data
- Handles optional fields gracefully with defaults

Result: ui_home package now fully complies with metadata_schema.json
and properly separates package definition from seed data.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-01-16 13:40:47 +00:00
rmac
01de695619 Set up database seeding architecture and E2E testing infrastructure
- Add CLAUDE.md: AI assistant instructions for MetaBuilder project architecture
- Add TESTING.md: Comprehensive E2E testing guide and troubleshooting

Core changes:
- Create Playwright global.setup.ts to seed database before E2E tests
- Add /api/setup endpoint to trigger database seeding via HTTP
- Implement seed-home-page.ts module loaded from ui_home package metadata
- Create ui_home/seed/metadata.json defining home page PageConfig seed data

Architecture established:
- Packages define seed data in seed/metadata.json
- Seed functions are idempotent (check before creating)
- Global setup calls /api/setup before running tests
- Database schema must be created via 'npm run db:push' before seeding

Test flow:
1. Playwright starts webServer (generates Prisma client, starts Next.js)
2. Global setup waits for server, calls POST /api/setup
3. Seeding creates default data from packages
4. E2E tests run against seeded database

This establishes proper separation of concerns:
- DBAL adapter for database access (not raw Prisma)
- Package-driven seed data (not hardcoded in code)
- HTTP endpoint for explicit database initialization
- Idempotent seeds (safe to rerun)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-01-14 18:15:46 +00:00
copilot-swe-agent[bot]
00a49e4243 Remove functions.json files and stop generating them
Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2026-01-07 19:20:19 +00:00
42446ef255 feat: Update package schemas and scripts to support JSON-based lifecycle hooks
- Added `jsonScript` property to metadata schema for JSON script entry points.
- Refactored `generate-package.ts` to replace Lua scripts with JSON scripts for lifecycle hooks.
- Updated test generation to use JSON format for metadata validation.
- Modified documentation and comments to reflect the transition from Lua to JSON scripting.
- Adjusted Storybook configuration and mock data to align with new JSON script structure.
- Renamed relevant files and references from Lua to JSON for consistency across the project.
2026-01-07 15:25:45 +00:00
9284b9a67b Refactor function definitions across multiple packages to remove luaScript references
- Updated functions.json files in theme_editor, ui_auth, ui_footer, ui_header, ui_home, ui_intro, ui_level2, ui_level3, ui_level4, ui_level5, ui_level6, ui_login, ui_pages, ui_permissions, user_manager, and workflow_editor packages.
- Removed luaScript entries from function definitions, retaining only category and other relevant metadata.
- Adjusted documentation in prisma/README.md to remove LuaScript entity reference.
2026-01-07 14:54:33 +00:00
ef709d47c0 refactor: update testing framework and restructure test configurations
- Changed devDependencies from "lua_test" to "testing" in package.json for ui_level4, ui_level5, ui_level6, ui_login, ui_pages, ui_permissions, user_manager, and workflow_editor.
- Removed legacy test scripts and parameterized tests, replacing them with a unified test suite structure in the tests section of package.json.
- Introduced new metadata.params.json files for each package to define test parameters for package ID validation, icon file existence, and JSON schema validation.
- Created new metadata.test.json files for each package to define structured test cases for validating package metadata, including checks for package ID, icon file existence, and schema validity.
2026-01-02 21:25:45 +00:00
e69b166046 Add icons for various packages and update package.json files
- Added SVG icons for the following packages:
  - github_tools
  - irc_webchat
  - json_script_example
  - lua_test
  - media_center
  - nav_menu
  - notification_center
  - package_validator
  - quick_guide
  - role_editor
  - schema_editor
  - screenshot_analyzer
  - smtp_config
  - social_hub
  - stats_grid
  - stream_cast
  - ui_auth
  - ui_dialogs
  - ui_footer
  - ui_header
  - ui_home
  - ui_intro
  - ui_level2
  - ui_level3
  - ui_level4
  - ui_level5
  - ui_level6
  - ui_login
  - ui_pages
  - ui_permissions
  - user_manager
  - workflow_editor

- Updated package.json files to include icon paths for each package.
2026-01-02 21:12:38 +00:00
ee367920be Refactor permissions in various packages to standardize action names and resource types
- Updated action names from "moderate", "write", "configure", and "ban" to "manage", "update", and "execute" across multiple roles in the forum_forge, github_tools, irc_webchat, json_script_example, lua_test, media_center, nav_menu, package_validator, quick_guide, role_editor, schema_editor, screenshot_analyzer, smtp_config, social_hub, stats_grid, stream_cast, ui_auth, ui_footer, ui_header, ui_home, ui_intro, ui_level2, ui_level3, ui_level4, ui_level5, ui_level6, ui_login, ui_pages, and ui_permissions packages.

- Changed resource types from "content", "data", "ui", "config", and "external" to "custom", "entity", and "component" for better clarity and consistency.

- Adjusted actions in roles to reflect new naming conventions and improve readability.
2026-01-02 20:02:43 +00:00
6992c3a650 feat(ui_pages): Add UI Pages Bundle with multi-level navigation and components
- Created package.json for ui_pages with dependencies and exports.
- Added roles.json for access permissions related to UI pages.
- Implemented functions.json for managing UI pages and routing.
- Developed stories.json for Storybook showcasing UI pages components.
- Defined styles tokens for UI pages including colors, spacing, and typography.

feat(ui_permissions): Introduce UI Permissions package for access control

- Created package.json for ui_permissions with permission utilities.
- Added roles.json defining permissions for a 6-level access control system.
- Implemented functions.json for permission checking and level management.
- Developed stories.json for Storybook showcasing permission-related components.
- Defined styles tokens for UI permissions including colors and spacing.
2026-01-02 19:45:10 +00:00
e22b801f37 Refactor code structure for improved readability and maintainability 2026-01-02 12:47:38 +00:00
Richard Ward
939b243e97 config: packages,metadata,json (7 files) 2025-12-31 02:04:59 +00:00
Richard Ward
96f8607c46 config: packages,metadata,json (44 files) 2025-12-31 02:01:20 +00:00
Richard Ward
838099da92 config: ui,styles,packages (1 files) 2025-12-31 00:22:56 +00:00
Richard Ward
198cd22961 config: packages,metadata,json (47 files) 2025-12-31 00:19:04 +00:00
Richard Ward
30d04f6a5a config: ui,styles,packages (1 files) 2025-12-31 00:10:52 +00:00
Richard Ward
e28d806ebc config: ui,packages,json (2 files) 2025-12-31 00:03:12 +00:00
Richard Ward
f38a0d8b79 config: ui,packages,json (1 files) 2025-12-31 00:01:27 +00:00
Richard Ward
bc6fe72576 config: packages,metadata,json (12 files) 2025-12-30 23:11:54 +00:00
Richard Ward
fceea6e3f1 config: packages,lua,ui (32 files) 2025-12-30 19:45:10 +00:00
Richard Ward
d8b75d7591 update: ui,types,packages (4 files) 2025-12-30 15:02:55 +00:00
Richard Ward
2d6e361d46 update: ui,packages,lua (6 files) 2025-12-30 12:42:21 +00:00
cfa1e5bfee feat: add new icon components including Envelope, ChatCircle, HardDrives, WarningCircle, CheckCircle, XCircle, TrendUp, ShieldWarning, LockKey, Crown, Sparkle, BookOpen, Tree, Broom, Export, UploadSimple, Funnel, FunnelSimple, MapTrifold, PushPinSimple, Buildings, GithubLogo, and GoogleLogo 2025-12-30 12:21:15 +00:00
9bfac57ad7 feat: add type annotations and enhance definitions for various components across multiple modules 2025-12-30 10:37:19 +00:00
bf1401fe34 Enhance module definitions and add type annotations across various packages
- Added type annotations and class definitions in the dashboard layout, stats, and data table modules for improved type safety and documentation.
- Introduced new classes for UI components, props, and configuration in the form builder, navigation menu, notification center, and UI dialogs packages.
- Implemented detailed type definitions for actions, fields, and pagination components to streamline usage and enhance clarity.
- Updated initialization functions in multiple packages to include versioning and installation context.
- Improved structure and readability of the codebase by organizing and documenting component properties and methods.
2025-12-30 10:21:33 +00:00
2f61892e5a feat: add devDependencies and testing configurations to metadata files for ui_header, ui_home, ui_intro, ui_level2, ui_level3, ui_level4, ui_level5, and ui_pages packages 2025-12-30 01:58:28 +00:00
cad5669c77 refactor: remove outdated test files and add new component validation tests
- Deleted existing metadata test files for stream_cast, ui_auth, ui_dialogs, ui_footer, ui_header, ui_home, ui_intro, ui_level2, ui_level3, ui_level4, and ui_level5 packages.
- Introduced new Lua-based component validation tests for ui_home, ui_intro, ui_level2, ui_level3, ui_level4, and ui_level5 packages.
- Added metadata validation tests for ui_intro, ui_level2, ui_level3, ui_level4, and ui_level5 packages with comprehensive checks for structure and dependencies.
- Created new component cases JSON files for ui_home, ui_intro, ui_level2, ui_level3, ui_level4, and ui_level5 packages to define expected component structures.
- Updated metadata cases JSON files for ui_intro, ui_level2, ui_level3, ui_level4, and ui_level5 packages to include validation patterns and required fields.
- Added a new UI Pages Bundle package with validation tests and comprehensive dependency checks.
2025-12-30 01:52:28 +00:00
2985826a7b feat: add validation tests and cases for ui_header and ui_home packages 2025-12-30 01:48:48 +00:00
b72763d9ff feat: add minLevel property to metadata.json files and update permission levels in levels.lua 2025-12-30 00:13:12 +00:00
ef86c48fd0 fix(types): replace 'any' with 'unknown' for improved type safety across workflow and metadata files 2025-12-29 23:52:02 +00:00
9d67c8dbbc feat: add notification center package with toast and list functionalities
- Implemented notification center initialization and rendering utilities.
- Added toast notification types: success, error, warning, and info.
- Created notification list rendering with badge support.
- Included SVG icons for notification center.
- Added tests for notification center functionalities.

feat: introduce schema editor package for database management

- Developed schema editor initialization and field type definitions.
- Implemented table management and relationships handling.
- Added SVG icons for schema editor.
- Included tests for schema editor functionalities.

feat: create user manager package for user management operations

- Implemented user management actions: create, update, delete, change level, and toggle active.
- Developed user list rendering with sortable columns.
- Added SVG icons for user manager.
- Included tests for user manager functionalities.

feat: add workflow editor package for workflow management

- Developed workflow editor rendering and step management utilities.
- Implemented workflow run status display and progress rendering.
- Added SVG icons for workflow editor.
- Included tests for workflow editor functionalities.

chore: add static SVG icons for various packages
2025-12-29 23:47:01 +00:00
38237123cf feat: add UI components for login, home, and permissions with metadata and scripts 2025-12-29 23:19:32 +00:00