Add Monday demo journeys and walkthrough
This commit is contained in:
@@ -13,6 +13,7 @@ The initial landscape contains Website, API, ERP, CRM and Email Platform plus tw
|
||||
|
||||
- **Place order:** Website → API → ERP, followed by parallel CRM and Email Platform updates.
|
||||
- **Register customer:** Website → API → CRM → Email Platform.
|
||||
- **Monday demo journeys:** Contact enquiry, Sample request, Commercial order, and Order retry and recovery.
|
||||
|
||||
## Features
|
||||
|
||||
@@ -24,6 +25,7 @@ The initial landscape contains Website, API, ERP, CRM and Email Platform plus tw
|
||||
- Adjust playback speed and inspect the active payload.
|
||||
- Persist the complete landscape, including node positions, in browser local storage.
|
||||
- Export and import the landscape as JSON. Invalid imports and deleted connection references are rejected with actionable errors.
|
||||
- Use the Monday Demo guide at the bottom of the app to walk through playback, data inspection and failure recovery.
|
||||
|
||||
```bash
|
||||
npm test
|
||||
@@ -32,4 +34,4 @@ npm run build
|
||||
|
||||
## Limitations
|
||||
|
||||
This is intentionally a local simulation prototype. It has no authentication, collaboration, server persistence, external API calls, real payload delivery, or production-grade graph editing. Playback state is transient and is not included in saved JSON. LiteGraph supplies canvas rendering and cable interaction; scenario semantics are managed by the Vue application.
|
||||
This is intentionally a local simulation prototype. It has no authentication, collaboration, server persistence, external API calls, real payload delivery, or production-grade graph editing. Playback state is transient and is not included in saved JSON. LiteGraph supplies canvas rendering and cable interaction; scenario semantics are managed by the Vue application. The minimap is diagnostic rather than a full viewport navigator, and transformation highlighting currently compares top-level JSON fields.
|
||||
|
||||
@@ -231,5 +231,6 @@ onUnmounted(stopAnimation)
|
||||
<section v-if="selectedConnection" class="connection-properties panel"><span class="eyebrow">CONNECTION PROPERTIES</span><div class="property-grid"><label>Protocol<select v-model="selectedConnection.protocol"><option>HTTPS</option><option>HTTP</option><option>GraphQL</option><option>SMTP</option><option>Webhook</option><option>Message queue</option></select></label><label>Data type<select v-model="selectedConnection.dataType"><option>JSON</option><option>Form data</option><option>CSV</option><option>Event</option><option>Binary</option></select></label><label>Delivery<select v-model="selectedConnection.deliveryMethod"><option value="immediate">Immediate</option><option value="scheduled">Scheduled</option><option value="manual">Manual</option></select></label><label class="checkbox-label"><input v-model="selectedConnection.showCableLabel" type="checkbox" /> Show cable label</label></div></section>
|
||||
<section class="navigation-panel panel"><div class="nav-fields"><label>Search systems<input v-model="searchQuery" placeholder="Name or description" /></label><label>Category<select v-model="categoryFilter"><option value="all">All categories</option><option value="application">Application</option><option value="service">Service</option><option value="data">Data</option><option value="external">External</option></select></label><label>Data type<select v-model="dataTypeFilter"><option value="all">All data types</option><option>JSON</option><option>Form data</option><option>CSV</option><option>Event</option><option>Binary</option></select></label><button class="ghost" @click="fitToScreen">Fit to screen</button></div><div class="minimap-wrap"><span class="eyebrow">MINIMAP</span><canvas ref="minimapEl" width="220" height="120"></canvas></div></section>
|
||||
<section v-if="selectedScenario" class="scenario-builder panel"><div><span class="eyebrow">EASY SCENARIO BUILDER</span><strong>Start with an action, then build the journey</strong><p class="muted">Connections remain reusable destinations; parallel branches share one step.</p></div><label>Starting system<select v-model="selectedScenario.startSystemId"><option v-for="system in landscape.systems" :key="system.id" :value="system.id">{{ system.name }}</option></select></label><label>Starting action<select v-model="selectedScenario.startActionId"><option value="">Choose an action</option><option v-for="action in actionsForSystem(selectedScenario.startSystemId)" :key="action.id" :value="action.id">{{ action.capabilityName }} · {{ action.name }}</option></select></label><div class="builder-actions"><button class="ghost" @click="addJourneyStep">+ Sequential step</button><button class="ghost" @click="addParallelBranch">+ Parallel branch</button></div><div class="builder-steps"><article v-for="(step, index) in selectedScenario.steps" :key="step.id"><b>{{ index + 1 }}</b><span>{{ step.explanation }}</span><input v-model="step.payload" class="code" title="Editable sample payload" /></article></div></section>
|
||||
<section class="demo-guide panel"><span class="eyebrow">MONDAY DEMO / START HERE</span><strong>Try a journey in three clicks</strong><ol><li>Open <b>Scenarios</b> and choose Contact enquiry, Sample request or Commercial order.</li><li>Press <b>▶</b> in the journey list, then use pause, next or speed controls.</li><li>Try <b>Order retry and recovery</b> to see a rejection, automatic retry and recovery message. Select a system to inspect its data history.</li></ol></section>
|
||||
</main>
|
||||
</template>
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
.demo-guide{padding:12px 16px;color:#c9d3e5}.demo-guide strong{display:block;margin-top:4px}.demo-guide ol{display:flex;gap:24px;margin:9px 0 0;padding-left:18px;color:#8996af;font-size:11px}.demo-guide li{flex:1}.demo-guide b{color:#dce4f4}@media(max-width:800px){.demo-guide ol{display:block}.demo-guide li{margin:5px 0}}
|
||||
@@ -8,6 +8,7 @@ import './failure.css'
|
||||
import './connection.css'
|
||||
import './navigation.css'
|
||||
import './scenario-builder.css'
|
||||
import './demo.css'
|
||||
import './style.css'
|
||||
|
||||
createApp(App).mount('#app')
|
||||
|
||||
+7
-1
@@ -5,7 +5,7 @@ describe('landscape model', () => {
|
||||
it('provides the editable demo landscape', () => {
|
||||
const landscape = demoLandscape()
|
||||
expect(landscape.systems).toHaveLength(5)
|
||||
expect(landscape.scenarios.map((scenario) => scenario.name)).toEqual(['Place order', 'Register customer'])
|
||||
expect(landscape.scenarios.map((scenario) => scenario.name)).toEqual(expect.arrayContaining(['Place order', 'Register customer', 'Contact enquiry', 'Sample request', 'Commercial order', 'Order retry and recovery']))
|
||||
expect(landscape.scenarios[0].steps[2].connectionIds).toHaveLength(2)
|
||||
})
|
||||
it('round-trips a valid landscape and preserves positions', () => {
|
||||
@@ -23,4 +23,10 @@ describe('landscape model', () => {
|
||||
instance.capabilities[0].actions[0].payload = '{"changed":true}'
|
||||
expect(preset.capabilities.find((capability) => capability.id === 'analytics')?.actions[0].payload).not.toBe('{"changed":true}')
|
||||
})
|
||||
it('includes a bounded failure and retry demo', () => {
|
||||
const scenario = demoLandscape().scenarios.find((item) => item.id === 'order-retry')!
|
||||
const failed = scenario.steps.find((step) => step.outcome === 'rejected')!
|
||||
expect(failed.retryStepId).toBe('retry-3')
|
||||
expect(failed.recoveryStepId).toBe('retry-4')
|
||||
})
|
||||
})
|
||||
|
||||
+37
-1
@@ -98,7 +98,13 @@ export const demoLandscape = (): LandscapeModel => ({
|
||||
{ id: 'api-email', sourceId: 'api', targetId: 'email', label: 'Send confirmation', description: 'API asks the email platform to send a confirmation.', payload: '{"template":"order-confirmation","to":"alex@example.com"}' },
|
||||
{ id: 'website-api-register', sourceId: 'website', targetId: 'api', label: 'Registration', description: 'Website submits a new customer registration.', payload: '{"email":"alex@example.com"}' },
|
||||
{ id: 'api-crm-register', sourceId: 'api', targetId: 'crm', label: 'Create customer', description: 'API creates the customer profile.', payload: '{"customerId":"cus_89","status":"active"}' },
|
||||
{ id: 'crm-email', sourceId: 'crm', targetId: 'email', label: 'Welcome email', description: 'CRM triggers the welcome message.', payload: '{"template":"welcome","customerId":"cus_89"}' }
|
||||
{ id: 'crm-email', sourceId: 'crm', targetId: 'email', label: 'Welcome email', description: 'CRM triggers the welcome message.', payload: '{"template":"welcome","customerId":"cus_89"}' },
|
||||
{ id: 'website-api-contact', sourceId: 'website', targetId: 'api', label: 'Contact enquiry', description: 'Website sends a contact enquiry to the API.', payload: '{"requestId":"req_1001","topic":"sample enquiry"}', protocol: 'HTTPS', dataType: 'JSON', deliveryMethod: 'immediate', showCableLabel: true },
|
||||
{ id: 'api-crm-contact', sourceId: 'api', targetId: 'crm', label: 'Store enquiry', description: 'API stores a contact enquiry in the CRM.', payload: '{"requestId":"req_1001","status":"open"}', protocol: 'HTTPS', dataType: 'JSON', deliveryMethod: 'immediate', showCableLabel: true },
|
||||
{ id: 'website-api-sample', sourceId: 'website', targetId: 'api', label: 'Sample request', description: 'Website sends a product sample request.', payload: '{"orderId":"smp_1042","sku":"sample-blue"}', protocol: 'HTTPS', dataType: 'JSON', deliveryMethod: 'immediate', showCableLabel: true },
|
||||
{ id: 'api-erp-sample', sourceId: 'api', targetId: 'erp', label: 'Reserve sample', description: 'API asks ERP to reserve sample stock.', payload: '{"sku":"sample-blue","quantity":1}', protocol: 'HTTPS', dataType: 'JSON', deliveryMethod: 'scheduled', showCableLabel: true },
|
||||
{ id: 'website-api-commercial', sourceId: 'website', targetId: 'api', label: 'Commercial order', description: 'Website submits a commercial order.', payload: '{"orderId":"ord_2048","total":249.0}', protocol: 'HTTPS', dataType: 'JSON', deliveryMethod: 'immediate', showCableLabel: true },
|
||||
{ id: 'api-erp-commercial', sourceId: 'api', targetId: 'erp', label: 'Fulfil commercial order', description: 'API creates the commercial order in ERP.', payload: '{"orderId":"ord_2048","status":"new"}', protocol: 'HTTPS', dataType: 'JSON', deliveryMethod: 'immediate', showCableLabel: true }
|
||||
],
|
||||
scenarios: [
|
||||
{
|
||||
@@ -116,6 +122,36 @@ export const demoLandscape = (): LandscapeModel => ({
|
||||
{ id: 'register-2', connectionIds: ['api-crm-register'], explanation: 'The API creates the CRM customer record.', payload: '{"status":"active"}', delayMs: 1000 },
|
||||
{ id: 'register-3', connectionIds: ['crm-email'], explanation: 'The CRM triggers a welcome email.', payload: '{"template":"welcome"}', delayMs: 1000 }
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 'contact-enquiry', name: 'Contact enquiry', description: 'Route a visitor question into the CRM for follow-up.', startSystemId: 'website', startActionId: 'submit-contact',
|
||||
steps: [
|
||||
{ id: 'contact-1', connectionIds: ['website-api-contact'], explanation: 'A visitor submits a contact enquiry.', payload: '{"requestId":"req_1001","topic":"sample enquiry"}', delayMs: 700, outcome: 'success' },
|
||||
{ id: 'contact-2', connectionIds: ['api-crm-contact'], explanation: 'The API stores the enquiry for a team member.', payload: '{"requestId":"req_1001","status":"open"}', delayMs: 900, outcome: 'success' }
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 'sample-request', name: 'Sample request', description: 'Reserve a sample and demonstrate scheduled fulfilment.', startSystemId: 'website', startActionId: 'place-sample',
|
||||
steps: [
|
||||
{ id: 'sample-1', connectionIds: ['website-api-sample'], explanation: 'A visitor requests a product sample.', payload: '{"orderId":"smp_1042","sku":"sample-blue"}', delayMs: 700, outcome: 'success' },
|
||||
{ id: 'sample-2', connectionIds: ['api-erp-sample'], explanation: 'The API schedules a stock reservation with the ERP.', payload: '{"sku":"sample-blue","quantity":1}', delayMs: 1100, outcome: 'success' }
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 'commercial-order', name: 'Commercial order', description: 'Submit and fulfil a normal customer purchase.', startSystemId: 'website', startActionId: 'place-order',
|
||||
steps: [
|
||||
{ id: 'commercial-1', connectionIds: ['website-api-commercial'], explanation: 'The customer submits a commercial order.', payload: '{"orderId":"ord_2048","total":249.0}', delayMs: 700, outcome: 'success' },
|
||||
{ id: 'commercial-2', connectionIds: ['api-erp-commercial'], explanation: 'The API creates the order for fulfilment.', payload: '{"orderId":"ord_2048","status":"new"}', delayMs: 1000, outcome: 'success' }
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 'order-retry', name: 'Order retry and recovery', description: 'Show an ERP rejection, one retry and recovery.', startSystemId: 'website', startActionId: 'place-order',
|
||||
steps: [
|
||||
{ id: 'retry-1', connectionIds: ['website-api-commercial'], explanation: 'The website sends the order to the API.', payload: '{"orderId":"ord_3001","total":89.0}', delayMs: 650, outcome: 'success' },
|
||||
{ id: 'retry-2', connectionIds: ['api-erp-commercial'], explanation: 'ERP rejects the first fulfilment request because stock is being reconciled.', payload: '{"orderId":"ord_3001","status":"rejected","reason":"stock_reconciliation"}', delayMs: 1000, outcome: 'rejected', retryStepId: 'retry-3', recoveryStepId: 'retry-4' },
|
||||
{ id: 'retry-3', connectionIds: ['api-erp-commercial'], explanation: 'The API retries the fulfilment request after refreshing stock.', payload: '{"orderId":"ord_3001","status":"retry"}', delayMs: 900, outcome: 'success' },
|
||||
{ id: 'retry-4', connectionIds: ['api-email'], explanation: 'The API sends a recovery confirmation to the customer.', payload: '{"template":"order-retry-recovered","orderId":"ord_3001"}', delayMs: 700, outcome: 'success' }
|
||||
]
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user