A canvas-based tool for creating, visualizing, and generating code from Event Modeling diagrams. It runs as a standalone Next.js web application .
Event Modeling is a method for designing information systems. It maps out how data changes over time using a sequence of:
- Commands — user intentions that trigger changes
- Events — facts that record what happened
- Read Models — projections of data for specific views
- Aggregates — domain entities enforcing business rules
- Screens — UI elements and their data requirements
This app provides an interactive canvas to model these elements, organize them into Slices (vertical feature slices) and Bounded Contexts, validate dependencies, and generate code.
This Next.js application provides advanced Event Modeling capabilities on an interactive canvas (ReactFlow-based). It supports creating event-driven system models with various elements including events, commands, read models, and aggregates.
- Event Modeling Elements: Create and manage events, commands, read models, aggregates, and other Event Modeling components
- AI Integration: Built-in AI features for slice analysis and modeling assistance using OpenAI
- Visual Design: Interactive screen design tools and flow visualization
- Code Generation: Automated code generation from Event Modeling diagrams
- Multi-language Support: Internationalization support with JSON-based translations
- Validation: Model validation and linking verification tools
src/
├── app/ # Next.js app router pages
│ ├── api/ # API routes
│ ├── elements/ # Element management page
│ ├── flow/ # Flow visualization page
│ ├── modelui/ # Model UI page
│ └── prototype/ # Prototype and code generation
├── components/ # React components
│ ├── ai/ # AI integration components
│ ├── aicanvas/ # AI chat interface
│ ├── api/ # API utilities
│ ├── code/ # Code generation components
│ ├── i18n/ # Internationalization files
│ └── modelui/ # Model UI components
└── utils/ # Utility functions
The application uses Next.js App Router with the following page structure:
-
/root- Landing page and main entry point for the application with tabbed interface:- Model Tab - Main model view for comprehensive Event Modeling management (
ModelViewcomponent) - Board Tab - Board setup and initialization tools (
Startercomponent) - Elements Tab - Element management interface for creating/editing components (
DataTablecomponent) - Slices Tab - Slice visualization and management (
Slicescomponent) - Scenario Tab - Scenario testing and validation (
Scenariocomponent, requires authentication) - Code Tab - Code generation and AI-powered development tools (
Codecomponent withChatProvider, requires authentication)
- Model Tab - Main model view for comprehensive Event Modeling management (
-
/elements- Element management interface for creating and editing Event Modeling components (usesDataTablecomponent) -
/flow- Flow visualization page for viewing event flows and system interactions (FlowDatacomponent) -
/modelui- Model user interface for comprehensive model viewing and management (usesModelViewand related components) -
/screendesign- Screen design tools for UI/UX modeling (ScreenDesignercomponent) -
/schemaeditor- Schema editor for defining data structures and field configurations (Fieldscomponent) -
/prototype- Prototype page with code generation and dependency analysis tools (usescodeProvider.tsanddependencyAnalyzer.ts) -
/codegen-help- Help and documentation for code generation features
/api/redirect- Handles OAuth redirects and authentication flows
- ModelView: Main application interface for Event Modeling
- AIIntegration: OpenAI-powered analysis and suggestions
- ChatWindow: Interactive AI chat for modeling assistance
- Starter: Initial setup and board creation tools
- CodeGen: Automated code generation from models
The ModelUI subsystem provides specialized views for different aspects of Event Modeling:
AggregateView- Aggregate-centric view showing event dependencies and relationships within bounded contextsClassic- Classic Event Modeling view with traditional table mappings and field relationshipsDataTrail- Data flow visualization showing how information travels through the systemOverview- High-level overview of all model elements with filtering and search capabilitiesSnapshots- Version control and comparison tool for tracking model changes over timeModelElement- Reusable component for rendering individual model elementsSpecElement- Component for displaying specification elements and requirements
The application uses a comprehensive data model defined in src/components/model.tsx that represents all Event Modeling concepts:
ElementType- Enumeration of all modeling elements (Command, Event, ReadModel, Aggregate, etc.)ElementData- Base class for all model elements with common properties (id, title, fields, dependencies)Field- Data structure definition with type, cardinality, mappings, and validation rules
Command- User intentions that trigger state changesEvent- Facts that represent state changes in the systemReadModel- Projections of data optimized for specific read scenariosAggregate- Domain entities that enforce business rules and consistencyScreen- User interface elements and their data requirementsExternalData- External system integrations and data sources
Slice- Vertical feature slices containing related commands, events, and read modelsSliceGroup- Collections of related slices for higher-level organizationContext- Bounded contexts that define boundaries between different parts of the systemActor- Roles or personas that interact with the systemSpec- Specifications and acceptance criteria for features
SliceType- Classification of slices (State Change, State View, Automation)SliceStatus- Workflow states for slice development (Planned, Assigned, Done, etc.)Context- Internal vs External system boundary classificationMeta- Metadata for elements including positioning and visual propertiesFlowStep- Sequential steps in user workflows and processes
fieldtype- Data types (String, UUID, Boolean, Date, Custom, etc.)fieldCardinality- Single values vs ListsField- Complete field definition with examples, mappings, and technical attributes
The model supports full Event Modeling methodology with proper relationships, dependencies, and metadata for visual representation.
When reporting a bug or requesting a feature, please include the following information so it can be handled efficiently.
Title format: [Bug] Short description of what went wrong
Include:
- What you did — step-by-step reproduction (which tab, which element type, what action)
- What you expected — the intended behavior
- What happened — actual behavior, including any error messages or console output
- Where on the canvas — which area of the app (e.g., Elements tab, Slices view, Code generation, AI assistant)
- Element types involved — e.g., Command, Event, ReadModel, Aggregate, Slice
Example:
[Bug] Drag-dropping a Command onto the canvas does not create a link to the Aggregate
Steps:
1. Open canvas with an existing model
2. Drag a Command element near an Aggregate
3. Release
Expected: A connector is created between Command and Aggregate
Actual: No connector appears, no error shown
Element types: Command, Aggregate
Area: Main canvas
Title format: [Feature] Short description
Include:
- Problem being solved — what workflow or use case is missing
- Proposed behavior — what you'd like the app to do
- Element types or areas affected — e.g., Slice management, Code generation, AI analysis
- Priority/context — is this blocking a modeling session? Nice-to-have?
To help triage tickets, reference these areas:
| Area | Description |
|---|---|
| Canvas | Main ReactFlow canvas where elements are placed and connected |
| Elements tab | Table-based editor for creating/editing Commands, Events, etc. |
| Model tab | Overview of the full event model |
| Slices tab | Vertical feature slices grouping related elements |
| Scenario tab | Scenario/acceptance test authoring (requires auth) |
| Code tab | AI-powered code generation from the model (requires auth) |
| Flow view | Graph visualization of event flows |
| Schema editor | Field and data structure definitions |
| Screen designer | UI/UX mockup tools tied to the model |