@archlex/model
v0.6.0
Published
Type definitions and data models for ArchLex architecture diagrams
Maintainers
Readme
@archlex/model
Type definitions and data models for ArchLex architecture diagrams.
Installation
npm install @archlex/modelUsage
import type {
Diagram,
Node,
Edge,
Provider,
ServiceDefinition
} from '@archlex/model';
// Use types in your application
const node: Node = {
id: 'web-server',
type: 'ec2',
provider: 'aws',
label: 'Web Server',
position: { x: 0, y: 0 }
};
const edge: Edge = {
source: 'web-server',
target: 'database',
label: 'queries'
};Exported Types
Core Types
Diagram- Complete diagram structureNode- Service node in the diagramEdge- Connection between nodesPosition- X/Y coordinates
Provider Types
Provider- Cloud provider identifierServiceDefinition- Service metadataIconDefinition- Icon data and metadata
AST Types
Program- Root AST nodeStatement- AST statement typesExpression- AST expression types
Features
- Full TypeScript type definitions
- Zero runtime dependencies
- Comprehensive JSDoc documentation
- Strict type checking support
Documentation
Visit archlex.dev for full documentation.
License
MIT
