Templates
Mermaid templates you can ship today
Every template is real, render-tested Mermaid source. Open one in the studio to edit it, run compatibility checks against GitHub, GitLab, or markdown targets, and export SVG or PNG.
Microservices architecture
A service map with an API gateway, core services, and shared infrastructure. A solid starting point for README architecture sections.
User login sequence
A login flow with token issuance and a failure branch. Useful for documenting auth endpoints and session behavior.
Order state machine
Lifecycle states for an e-commerce order, from creation to fulfillment, with cancellation and refund paths.
E-commerce data model
A compact entity-relationship model for customers, orders, and products with keys and attributes.
CI/CD pipeline
A build-test-deploy pipeline with a manual approval gate before production. Fits well in engineering handbooks.
Incident response timeline
A postmortem-ready timeline from alert to resolution. Note: the timeline type needs a recent Mermaid version on the target platform.
Sprint plan
A two-week sprint plan with backend, frontend, and release tracks. Swap in your own dates and tasks.
Payment module classes
An interface with two provider implementations and a processing service. A template for documenting module boundaries.
User onboarding journey
A scored user journey from signup to first value. Good for aligning product and growth teams on friction points.
Git release flow
A trunk-plus-develop branching model with a feature branch, a tagged release, and a hotfix commit.
Request throttling logic
Rate-limiting decision logic with quota checks and retry hints. A template for API behavior documentation.
OAuth2 authorization code flow
The full authorization code exchange between user, client app, authorization server, and resource API.
Payment checkout sequence
An order confirmation flow through a payment provider, with authorized and declined branches driven by webhooks.
Cache-aside pattern
The classic read-through caching interaction: cache hit, cache miss, database load, and repopulation with a TTL.
WebSocket connection lifecycle
Upgrade handshake, heartbeat loop, and clean shutdown — a template for documenting realtime connections.
Data ETL pipeline
Sources, extract-transform-load stages, and warehouse destinations grouped in subgraphs.
API error handling flow
Retry-with-backoff logic for external API calls, separating retryable errors from hard failures.
Signup activation funnel
From landing page to activated user, with drop-off points and the email verification loop made explicit.
Webhook delivery with retries
Event delivery with exponential backoff, retry limits, and a dead-letter path — API platform documentation staple.
ML training pipeline
Data preparation, training, evaluation gate, registry, deployment, and the drift-monitoring feedback loop.
Job queue lifecycle
Background job states with retry backoff and a dead-letter terminal state.
Document approval workflow
Draft, review, changes-requested loop, approval, publication, and archive states for content workflows.
Blog / CMS data model
Authors, posts, comments, and a many-to-many tag relationship — the canonical content schema.
SaaS multi-tenant data model
Organizations, users, subscriptions, plans, and projects — the backbone schema of a B2B SaaS.
Observer pattern
Subject, observer interface, and two concrete observers — a template for documenting design patterns.
Product launch plan
Marketing, product, and launch tracks converging on a ship milestone with a hotfix window.
Traffic sources breakdown
A simple share-of-total pie for reports and dashboards. Swap in your own channels and numbers.
Support ticket journey
A scored journey across customer, agent, and engineer touchpoints — useful for spotting support friction.
Product milestones timeline
Quarter-by-quarter milestones from prototype to 1.0. Note: timeline needs a recent Mermaid version on the target platform.
Project scope mindmap
A quick scope-mapping mindmap for kickoffs. Note: mindmap needs a recent Mermaid version on the target platform.
Incident escalation flow
Alert triage with severity-based escalation paths, paging rules, and the postmortem loop.
Feature prioritization quadrant
An effort-vs-impact quadrant for roadmap discussions. Note: quadrantChart needs a recent Mermaid version on the target platform.
Kubernetes deployment flow
Image build through rollout, with a health-check gate and automatic rollback on failed readiness probes.
Terraform apply workflow
Plan-review-apply with a drift-detection loop, the standard safety gate for infrastructure-as-code changes.
Feature flag rollout
Off, canary, partial, and full rollout states with a kill-switch rollback path from any active state.
A/B test decision flow
From hypothesis to ship/kill decision, with the statistical significance gate made explicit.
Database migration runbook
Backup, migrate, verify, and a rollback branch for production schema changes.
Event sourcing + CQRS
Command side writes events; a separate read-model projection serves queries.
Multi-region failover
Active-passive regions with a health-check-driven DNS failover path.
Message queue architecture
Producers, a broker with topic partitions, competing consumers, and a dead-letter queue.
Chatbot conversation flow
Intent detection with a fallback to human handoff when confidence is low.
Subscription billing lifecycle
Trial, active, dunning, and cancellation states for a recurring billing subscription.
Code review workflow
Draft PR through merge, with the changes-requested loop and CI gate made explicit.
Disaster recovery runbook
Declare-assess-restore sequence with RTO/RPO checkpoints for a major outage.
GraphQL resolver sequence
A query resolving through a batched data loader to avoid the N+1 query problem.
Cron job scheduler
Scheduled trigger through execution with a lock to prevent overlapping runs.
Trial-to-paid conversion journey
A scored journey through a free trial, tracking sentiment at each conversion touchpoint.
Load-balanced network topology
A standard three-tier topology: load balancer, app tier, and a primary/replica database pair.
Mobile biometric authentication
Face/fingerprint unlock backed by a securely stored refresh token, with a password fallback.
Deployment rollback decision
Post-deploy monitoring window with clear thresholds for when to auto-rollback versus page a human.
Reporting structure
A simple manager/report tree template for team pages and onboarding docs.
Data warehouse star schema
A fact table surrounded by dimension tables -- the standard star schema for analytics.
GDPR data request flow
Identity verification through fulfillment for access, export, and deletion requests.
Push notification delivery
Server-triggered push through a platform gateway (APNs/FCM) down to the device.
Micro-frontend architecture
An app shell composing independently deployed micro-frontends around a shared event bus.
Saga pattern with compensation
A distributed transaction orchestrated as a saga, with compensating actions after a payment failure.
Circuit breaker states
Closed, open, and half-open states for a resilience circuit breaker guarding a downstream call.
Blue-green deployment
Deploying to an idle green environment, smoke testing, and switching traffic with a rollback path.
Canary release rollout
Progressive traffic shifting from 5% to 100% with metric checks and rollback at each stage.
RBAC permissions data model
A role-based access control schema linking users to roles and roles to permissions.
Notification channel classes
A strategy pattern for pluggable notification channels (email, SMS, push) behind one interface.
Support ticket escalation journey
Customer satisfaction scores across a ticket's path from report through triage, escalation, and resolution.
Quarterly roadmap
A discovery-build-launch roadmap for a quarter with dependent task chains per phase.
Engineering org mindmap
A quick-reference mindmap of engineering sub-teams grouped under platform, product, data, and growth.
Release readiness quadrant
Plotting features by confidence and impact to decide what ships this release versus what needs more validation.
Revenue by channel
A revenue mix breakdown across direct, organic, paid, referral, and email channels.
API gateway rate limiting
A gateway checking a request against a rate limiter before forwarding to the backend, with a 429 branch.
Event-driven order fulfillment
An order event triggering inventory reservation, payment, packing, and shipping, with a failure-compensation branch.
Password reset sequence
A self-service password reset flow from request through emailed link to confirmed update.
Content moderation states
Automated and human review states for user-generated content, from pending through published or removed.
Backup and restore runbook
A nightly backup job from snapshot through encrypted offsite upload, checksum verification, and retention.
Service traffic flow
Request volume flowing from the gateway into downstream services, sized by relative traffic share.
Quarterly active users
Quarter-over-quarter active user growth shown as combined bar and line series.
Sprint backlog kanban
A sprint board snapshot across backlog, in-progress, review, and done columns.
Payment compliance requirements
A PCI compliance requirement traced to the payment service that satisfies it.
Dark launch verification flow
Shipping code behind a flag, running it silently against production traffic, then flipping it on for real users.
CDN cache invalidation
Purging and re-verifying a CDN edge cache after deploying a new static asset version.
Graceful process shutdown
Draining in-flight requests and deregistering from a load balancer before a process exits.
Token bucket rate limiter states
The two-state lifecycle of a token bucket rate limiter: full and empty, with periodic refill.
Multi-tenant onboarding journey
Satisfaction scores from account creation through SSO setup, data import, and first team workflow.
API versioning and deprecation timeline
The lifecycle of an API version from launch through deprecation notices to shutdown.
Incident postmortem mindmap
A structured recap covering timeline, root cause, action items, and impact for a postmortem doc.
Tech debt prioritization
Plotting tech debt items by effort and risk to decide what to schedule versus quick-win first.
Support ticket channel mix
Ticket volume broken down by intake channel: email, chat, phone, and community forum.
Inventory reservation data model
Tracking on-hand inventory per warehouse and reserving quantities against open orders.
Plugin architecture classes
A pluggable host interface pattern where plugins implement a common lifecycle hook.
Serverless function architecture
An API gateway routing to Lambda functions backed by a shared table and an event topic.
API key rotation
Issuing a new API key, updating the consuming app, and revoking the old key.
Subscription dunning flow
Retrying a failed renewal charge with escalating notices before suspending the subscription.
Two-factor authentication
A TOTP-based second factor challenge after a successful password check.
Feature flag service architecture
An application reading flags through an SDK backed by a local cache, an evaluation service, and an admin dashboard.
Release branching strategy
A develop branch feeding a release branch that gets tagged and merged back to main.
Onboarding checklist kanban
A build-out board for shipping a new user onboarding wizard, from requirements to done.
Team velocity trend
Story points completed per sprint over a five-sprint window.
Cloud cost allocation
Total cloud spend broken down into compute, storage, networking, and data platform, with compute split by environment.
Accessibility audit requirement
A keyboard-navigation requirement traced to the page that must satisfy it.
Search indexing pipeline
Change data capture feeding an indexing queue and worker, with a dead-letter path for failed documents.
Session timeout states
Active, idle, and expired states for a user session with inactivity-based transitions.
Bug triage flow
Reproducing an incoming bug report, then routing it by severity to a hotfix, next sprint, or backlog.
API deprecation notice
Publishing a deprecation notice and Sunset header, then guiding a consumer through migration.
Customer churn prediction data model
Usage events feeding a computed churn probability score per customer.
Release train schedule
A feature freeze through stabilization and general availability schedule for a scheduled release train.