Skip to main content
Yboard Functions let you deploy custom backend logic as serverless functions powered by an isolated Deno runtime.

Overview

Functions run server-side code without managing servers. They’re ideal for custom business logic, webhooks, scheduled tasks, and API integrations that go beyond CRUD operations.

Technology Stack

Core Components

  • Deno Runtime — Secure, isolated JavaScript/TypeScript execution
  • HTTP Router — Each function is an HTTP endpoint
  • Secret Manager — Inject environment variables securely
  • JWT Middleware — Optional authentication for functions

How It Works

  1. Write a function handler in JavaScript/TypeScript
  2. Deploy via the dashboard or MCP
  3. Function is available at /api/functions/{function-name}
  4. Supports all HTTP methods (GET, POST, PUT, PATCH, DELETE)

Function Example

Authentication Flow

Functions can optionally validate JWT tokens:
  1. Client sends request with Authorization: Bearer <token>
  2. Yboard validates the JWT
  3. User context is injected into the request
  4. Function can access user ID and claims

Performance Characteristics

Execution Limits

Optimization Strategies

  • Keep functions focused on a single task
  • Use streaming responses for large outputs
  • Cache expensive computations
  • Minimize cold starts by keeping functions small

Best Practices

  1. Keep functions small — One function per task
  2. Use secrets for API keys — never hardcode credentials
  3. Handle errors gracefully — Return appropriate HTTP status codes
  4. Use TypeScript for type safety
  5. Test locally before deploying