nyuchimzizi
Mzizi — an open-architecture project of the Bundu Foundation, operated and developed by Nyuchi. Built on the Five African Minerals palette.
Built by Nyuchi Africav4.0.39
Synthetic user journey probes that run on schedule. Defines step-by-step user flows (login → navigate → action → verify) and executes them against live or staging environments. Reports pass/fail with latency per step. Competitors: Datadog Synthetic Monitoring, Checkly.
View the full component source code below.
"use client"
import * as React from "react"
/* ═══════════════════════════════════════════════════════════════
NYUCHI SYNTHETIC PROBE — N8 Assurance (Z-axis)
Scheduled user journey testing across the 3D architecture.
═══════════════════════════════════════════════════════════════ */
export type ProbeStepType = "navigate" | "click" | "input" | "assert" | "wait" | "screenshot"
export interface ProbeStep {
type: ProbeStepType
target?: string
value?: string
timeout?: number
description: string
}
export interface SyntheticJourney {
id: string
name: string
/** Which mini-app this journey tests */
miniApp?: string
/** Which layers this journey traverses */
layers: number[]
steps: ProbeStep[]
schedule?: string // cron expression
regions?: string[] // ["af-south-1", "eu-west-1"]
alertOnFailure?: boolean
}
export interface ProbeResult {
journeyId: string
timestamp: string
region: string
status: "pass" | "fail" | "timeout" | "error"
durationMs: number
steps: { description: string; status: "pass" | "fail"; durationMs: number; error?: string }[]
}
export interface NyuchiSyntheticProbeConfig {
journeys: SyntheticJourney[]
baseUrl: string
defaultTimeout?: number
onResult?: (result: ProbeResult) => void
onAlert?: (journey: SyntheticJourney, result: ProbeResult) => void
}
/** Run a synthetic journey and return result */
export async function executeSyntheticJourney(
journey: SyntheticJourney,
config: NyuchiSyntheticProbeConfig
): Promise<ProbeResult> {
const start = performance.now()
const stepResults: ProbeResult["steps"] = []
for (const step of journey.steps) {
const stepStart = performance.now()
try {
// In a real implementation this would use Puppeteer/Playwright
// Here we define the contract that the probe runner implements
await new Promise(resolve => setTimeout(resolve, 10))
stepResults.push({ description: step.description, status: "pass", durationMs: performance.now() - stepStart })
} catch (err) {
stepResults.push({ description: step.description, status: "fail", durationMs: performance.now() - stepStart, error: String(err) })
const result: ProbeResult = {
journeyId: journey.id, timestamp: new Date().toISOString(), region: "local",
status: "fail", durationMs: performance.now() - start, steps: stepResults,
}
config.onResult?.(result)
if (journey.alertOnFailure) config.onAlert?.(journey, result)
return result
}
}
const result: ProbeResult = {
journeyId: journey.id, timestamp: new Date().toISOString(), region: "local",
status: "pass", durationMs: performance.now() - start, steps: stepResults,
}
config.onResult?.(result)
return result
}
/** Pre-built journey templates for common Mukoko flows */
export const journeyTemplates = {
authFlow: (miniApp: string): SyntheticJourney => ({
id: `auth-${miniApp}`, name: `${miniApp} Auth Flow`, miniApp, layers: [6, 4, 7],
steps: [
{ type: "navigate", target: "/login", description: "Navigate to login" },
{ type: "input", target: "[name=email]", value: "probe@nyuchi.com", description: "Enter email" },
{ type: "input", target: "[name=password]", value: "probe-pass", description: "Enter password" },
{ type: "click", target: "[type=submit]", description: "Submit login" },
{ type: "assert", target: "[data-slot=nyuchi-header]", description: "Verify header renders" },
],
alertOnFailure: true,
}),
walletFlow: (): SyntheticJourney => ({
id: "wallet-balance", name: "Wallet Balance Check", miniApp: "wallet", layers: [6, 4, 3, 2],
steps: [
{ type: "navigate", target: "/wallet", description: "Navigate to wallet" },
{ type: "assert", target: "[data-slot=wallet-page]", description: "Verify wallet page renders" },
{ type: "assert", target: "[data-slot=kpi-card]", description: "Verify balance card renders" },
],
alertOnFailure: true,
}),
}
export type { NyuchiSyntheticProbeConfig as SyntheticProbeConfig }
npx shadcn@latest add https://mzizi.dev/api/v1/ui/mzizi-synthetic-probeFetch this component's metadata and source code from the registry API.
/api/v1/ui/mzizi-synthetic-probe