@burgan-tech/vnext-core-runtime
v0.0.18
Published
vNext Core Domain - Runtime Package for engine deployment
Readme
@burgan-tech/vnext-core
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.
🚀 Features
- 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
- Template System: Ready-to-use template structure for new vNext projects
- Type Safety: Structured exports with clear APIs for accessing components
📦 Installation
Install as dependency
npm install @burgan-tech/vnext-coreInstall as dev dependency
npm install --save-dev @burgan-tech/vnext-core🏗️ Project Structure
vnext-core/
├── 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🏛️ Architecture Principles
Component Types
- 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
🛠️ Development
Running Tests
npm test⚙️ Configuration
The 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": []
}
}Path Configuration
You can customize component directory names:
{
"paths": {
"componentsRoot": "src",
"workflows": "Flows",
"schemas": "Models"
}
}✅ Validation
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
Validation Output
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
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:runtimeBuild Options
npm 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 messageBuild Types
| Type | Description | Use Case |
|------|-------------|----------|
| runtime | Complete domain structure with all files | Engine deployment |
| reference | Only exported components from vnext.config.json | Cross-domain usage |
Examples
# 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-validationBuild Output Structure
Runtime Build:
dist/
├── <domain>/
│ ├── Extensions/
│ ├── Functions/
│ ├── Schemas/
│ ├── Tasks/
│ ├── Views/
│ └── Workflows/
├── vnext.config.json
├── package.json
├── README.md
└── LICENSEReference 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📜 Available Scripts
| 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 |
🤝 Contributing
- 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
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🏢 About Burgan Tech
This package is maintained by the Burgan Tech team as part of our commitment to building scalable, domain-driven workflow solutions.
🔗 Links
📞 Support
For support and questions:
- Create an issue on GitHub
- Contact the development team at [email protected]
Made with ❤️ by the Burgan Tech team
