A structured template package for vNext workflow components with domain-based architecture. This package provides a foundation for building scalable workflow systems with schemas, tasks, views, functions, and extensions.
- Domain-Driven Architecture: Organized by business domains with clear separation of concerns
- Component-Based Structure: Modular design with schemas, workflows, tasks, views, functions, and extensions
- JSON Schema Validation: Built-in validation for all component definitions
- Template System: Ready-to-use template structure for new vNext projects
- Type Safety: Structured exports with clear APIs for accessing components
npm install @my-organization/corenpm install --save-dev @my-organization/corevnext-template/
βββ core/ # Domain-specific components
β βββ Extensions/ # Extension definitions
β βββ Functions/ # Function definitions
β βββ Schemas/ # JSON schema definitions
β βββ Tasks/ # Task definitions
β βββ Views/ # View components
β βββ Workflows/ # Workflow definitions
βββ index.js # Main entry point
βββ vnext.config.json # Domain configuration
βββ package.json # Package metadata
- Schemas: JSON Schema definitions for data validation
- Workflows: Business process definitions and state machines
- Tasks: Individual task definitions and configurations
- Views: User interface and presentation components
- Functions: Reusable business logic functions
- Extensions: Plugin and extension definitions
npm testThe vnext.config.json file allows you to customize paths and exports:
{
"domain": "my-domain",
"paths": {
"componentsRoot": "my-domain",
"schemas": "Schemas",
"workflows": "Workflows",
"tasks": "Tasks",
"views": "Views",
"functions": "Functions",
"extensions": "Extensions"
},
"exports": {
"schemas": ["schema1.json", "schema2.json"],
"workflows": ["workflow1.json"],
"tasks": [],
"views": [],
"functions": [],
"extensions": []
}
}You can customize component directory names:
{
"paths": {
"componentsRoot": "src",
"workflows": "Flows",
"schemas": "Models"
}
}Validate your project structure and schemas:
npm run validateThis will check:
- Package.json structure and content
- Main entry point functionality
- vnext.config.json validation
- Domain directory structure
- JSON file syntax validation
- Schema validation using @burgan-tech/vnext-schema
- Module functionality
- Semantic versioning compliance
The validation provides detailed output with:
- β Passed validations
- β Failed validations with file paths and line numbers
- π Summary statistics
- π Failed files summary for easy navigation
Build your domain package for deployment or cross-domain usage:
# Runtime build (default) - Complete domain structure
npm run build
# Reference build - Only exported components
npm run build:reference
# Runtime build explicitly
npm run build:runtimenpm run build -- [options]
Options:
-o, --output <dir> Output directory (default: dist)
-t, --type <type> Build type: reference or runtime (default: runtime)
--skip-validation Skip validation during build
-h, --help Show help message| Type | Description | Use Case |
|---|---|---|
runtime |
Complete domain structure with all files | Engine deployment |
reference |
Only exported components from vnext.config.json | Cross-domain usage |
# Build to custom directory
npm run build -- -o my-build
# Reference build to custom directory
npm run build -- -t reference -o packages/ref
# Skip validation for faster builds
npm run build -- --skip-validationRuntime Build:
dist/
βββ <domain>/
β βββ Extensions/
β βββ Functions/
β βββ Schemas/
β βββ Tasks/
β βββ Views/
β βββ Workflows/
βββ vnext.config.json
βββ package.json
βββ README.md
βββ LICENSE
Reference Build:
dist/
βββ <domain>/
β βββ Extensions/ # Only exported files
β βββ Functions/ # Only exported files
β βββ Schemas/ # Only exported files
β βββ Tasks/ # Only exported files
β βββ Views/ # Only exported files
β βββ Workflows/ # Only exported files
βββ vnext.config.json
βββ package.json
βββ README.md
βββ LICENSE
| Script | Description |
|---|---|
npm run validate |
Validate project structure and schemas |
npm run build |
Build runtime package to dist/ |
npm run build:runtime |
Build runtime package explicitly |
npm run build:reference |
Build reference package with exports only |
npm run setup <name> |
Setup domain with given name |
npm run sync-schema |
Sync schema version from dependencies |
npm test |
Run tests |
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
This package is maintained by the Burgan Tech team as part of our commitment to building scalable, domain-driven workflow solutions.
For support and questions:
- Create an issue on GitHub
- Contact the development team at dev@burgan-tech.com
Made with β€οΈ by the Burgan Tech team