Examples
Real-world MAKO file examples showing the protocol in action.
Product Example
---
# @mako — Machine-Accessible Knowledge Object
# Spec: https://makospec.vercel.app
mako: "1.0"
type: product
entity: "Nike Air Max 90"
updated: 2026-02-13
tokens: 245
language: en
summary: "Mid-range casual running shoe by Nike, 79.99 EUR"
canonical: "https://example.com/product/nike-air-max-90"
freshness: daily
media:
cover:
url: /uploads/nike-air-max-90-hero.webp
alt: "Nike Air Max 90 - White/Black colorway"
images: 6
video: 1
actions:
- name: add_to_cart
description: "Add this product to the shopping cart"
endpoint: /api/cart/add
method: POST
params:
- name: size
type: string
required: true
description: "Shoe size (EU sizing, e.g., '42')"
- name: quantity
type: integer
required: false
description: "Number of pairs (default: 1)"
- name: check_availability
description: "Check stock availability by size"
endpoint: /api/stock/check
method: GET
params:
- name: size
type: string
required: true
description: "Size to check"
links:
internal:
- url: /category/running-shoes
context: "Browse all running shoes"
type: parent
- url: /product/nike-pegasus-40
context: "Lighter alternative, 20 EUR more"
type: sibling
- url: /guides/choosing-running-shoes
context: "Guide to picking the right running shoe"
type: reference
external:
- url: https://nike.com/air-max-90
context: "Official Nike product page"
type: source
related:
- /product/adidas-ultraboost
- /product/new-balance-1080
- /product/asics-gel-nimbus
tags:
- running
- shoes
- nike
- casual
---
# Nike Air Max 90
Mid-range casual running shoe by Nike. Popular for daily wear and light running.
## Key Facts
- Price: 79.99 EUR (was 149.99 EUR, 47% off)
- Availability: In stock
- Sizes: EU 38-46
- Material: Leather upper, mesh panels, Air Max cushioning
- Weight: 340g (size 42)
- Rating: 4.3/5 (234 reviews)
## Context
Positioned as an affordable entry into Nike's Air Max line. Direct competitors at similar price: Adidas Runfalcon (69€), Puma Velocity (74€). Premium alternatives: Adidas Ultraboost (129€), New Balance 1080 (139€).
Best for: casual running, daily commute, gym. Not recommended for: trail running, marathon training.
## Reviews Summary
Positive: comfortable all-day wear, classic design, good value at sale price.
Negative: narrow fit (size up if wide feet), outsole wears fast on pavement, limited color options in stock.
Article Example
---
mako: "1.0"
type: article
entity: "Introduction to WebAssembly"
updated: 2026-02-10
tokens: 195
language: en
summary: "Technical overview of WebAssembly for web developers, covering use cases, performance, and getting started"
canonical: "https://example.com/blog/intro-to-webassembly"
audience: developers
freshness: monthly
media:
cover:
url: /uploads/wasm-overview-2026.webp
alt: "Introduction to WebAssembly - technical overview"
images: 3
actions:
- name: share
description: "Share this article"
endpoint: /api/share
method: POST
links:
internal:
- url: /blog/wasm-vs-javascript-benchmarks
context: "Detailed performance comparison with real benchmarks"
type: sibling
- url: /tutorials/first-wasm-app
context: "Step-by-step tutorial to build your first Wasm app"
type: child
external:
- url: https://webassembly.org/
context: "Official WebAssembly specification and documentation"
type: source
- url: https://developer.mozilla.org/en-US/docs/WebAssembly
context: "MDN WebAssembly reference"
type: reference
tags:
- webassembly
- wasm
- performance
- web-development
---
# Introduction to WebAssembly
By Sarah Chen | February 10, 2026 | 8 min read
## Summary
WebAssembly (Wasm) is a binary instruction format that runs in browsers at near-native speed. It complements JavaScript for performance-critical tasks like image processing, gaming, and data visualization.
## Key Points
- Wasm runs 10-50x faster than JavaScript for CPU-intensive tasks
- Supported in all major browsers since 2017 (Chrome, Firefox, Safari, Edge)
- Languages: Rust, C/C++, Go, and AssemblyScript compile to Wasm
- Does NOT replace JavaScript — they work together via JS interop
- File sizes are 10-30% smaller than equivalent minified JavaScript
## Use Cases
- Image/video processing (Figma, Photoshop Web)
- Gaming engines (Unity, Unreal in browser)
- Scientific computing and data visualization
- Cryptography and compression
- Database engines (SQLite in browser)
## Getting Started
Recommended path: Learn Rust → use wasm-pack → deploy with Vite or Webpack. Alternatively, use AssemblyScript (TypeScript-like syntax) for a gentler learning curve.
## Context
Wasm 2.0 (2025) added garbage collection and threads support, making it viable for managed languages (C#, Kotlin). The Component Model proposal aims to enable cross-language module composition. Growing adoption in serverless (Cloudflare Workers, Fastly) beyond browsers.
Docs Example
---
mako: "1.0"
type: docs
entity: "Express.js Middleware Guide"
updated: 2026-01-15
tokens: 210
language: en
summary: "How to write and use middleware in Express.js, with examples"
canonical: "https://example.com/docs/middleware"
audience: developers
freshness: monthly
links:
internal:
- url: /docs/routing
context: "Express routing documentation"
type: sibling
- url: /docs/error-handling
context: "Error handling middleware patterns"
type: child
- url: /api-reference/app-use
context: "app.use() API reference"
type: reference
external:
- url: https://expressjs.com/en/guide/using-middleware.html
context: "Official Express middleware guide"
type: source
tags:
- express
- nodejs
- middleware
- backend
---
# Express.js Middleware Guide
## Overview
Middleware functions execute during the request-response cycle. They access the `req`, `res` objects and call `next()` to pass control to the next middleware. Express apps are essentially a series of middleware calls.
## Usage
### Basic middleware
```javascript
app.use((req, res, next) => {
console.log(`${req.method} ${req.path}`);
next();
});
Route-specific middleware
app.get('/api/users', authenticate, (req, res) => {
res.json(req.user);
});
Error-handling middleware
app.use((err, req, res, next) => {
console.error(err.stack);
res.status(500).json({ error: 'Internal server error' });
});
Execution Order
Middleware executes in the order registered via app.use(). Error handlers must have 4 parameters and are registered last. Route-specific middleware runs only for matching routes.
Common Middleware
express.json()— parse JSON request bodiesexpress.static()— serve static filescors()— enable Cross-Origin Resource Sharinghelmet()— set security HTTP headersmorgan()— HTTP request loggingexpress-rate-limit— rate limiting
See Also
- Error handling patterns:
/docs/error-handling - Authentication middleware examples:
/docs/auth - Performance middleware (compression, caching):
/docs/performance