Skip to content
Dave Williams edited this page Jun 16, 2025 · 2 revisions

dave.io Wiki

Welcome to the comprehensive documentation for the dave.io platform - a modern serverless full-stack application built on Nuxt 3 and Cloudflare Workers with AI integration, JWT authentication, and automated OpenAPI documentation.

Quick Start

  • New to dave.io? Start with the Overview to understand the platform's purpose and capabilities
  • Developer Setup: Check out Development Environment for setup instructions
  • API Usage: See API System for endpoint documentation and examples
  • CLI Tools: Explore CLI Tools for development utilities

Documentation Navigation

πŸ—οΈ Architecture & Foundation

πŸ”Œ API & Services

πŸ” Security & Authentication

🎨 Frontend & UI

πŸ› οΈ Development Environment

Key Features

🧠 AI-Powered Services

  • Alt-text Generation: Automatic alt-text for images using Cloudflare AI (LLAVA model)
  • Ticket Management: Linear ticket automation with title and description generation
  • Content Enhancement: AI-powered content enrichment and optimization

πŸ”’ Enterprise Authentication

  • Hierarchical JWT Permissions: Parent permissions grant child access (api β†’ api:tokens)
  • Token Lifecycle Management: Creation, verification, listing, and revocation via CLI
  • Revocation Support: KV-based token blacklisting for security

🌐 Global Edge Platform

  • Cloudflare Workers: Serverless execution on global edge network
  • KV Storage: Hierarchical key-value storage with metrics collection
  • D1 Database: SQL database for structured authentication data
  • Images Service: Global CDN with BLAKE3 content addressing

πŸ”§ Developer Experience

  • Schema-First API Design: Zod schemas drive validation and OpenAPI docs
  • CLI Tool Ecosystem: Comprehensive command-line tools for all operations
  • ~3 Second Dev Startup: Fast development iteration with Bun runtime
  • Comprehensive Testing: Unit, integration, and HTTP API test suites

Technology Stack

Layer Technology Purpose
Runtime Bun 1.2.16 + Node.js 22.16.0 Package management and development
Framework Nuxt 3.17.5 + Nitro 2.11.12 Full-stack Vue.js with universal server
Platform Cloudflare Workers Serverless edge computing
Language TypeScript 5.8.3 Type-safe development
Validation Zod 3.25.64 Schema validation and OpenAPI
Authentication JOSE 6.0.11 JWT token handling
Testing Vitest 3.2.3 Unit and integration testing
Code Quality Biome 1.9.4 + Trunk Formatting and multi-linting

API Examples

# System health check
curl http://localhost:3000/api/ping

# AI alt-text generation (requires authentication)
curl -H "Authorization: Bearer <token>" \
     "http://localhost:3000/api/ai/alt?url=https://example.com/image.jpg"

# Image optimization (public)
curl -X POST -F "image=@image.jpg" -F "quality=80" \
     http://localhost:3000/api/images/optimise

# AI ticket title generation (public)
curl -X POST -H "Content-Type: application/json" \
     -d '{"description": "Fix login bug on mobile"}' \
     http://localhost:3000/api/ai/tickets/title

CLI Examples

# JWT token management
bun jwt init && bun jwt create --sub "api:metrics" --expiry "30d"

# KV data operations
bun kv export --all && bun kv import backup.yaml

# Interactive API testing
bun try --auth ai alt url "https://example.com/image.jpg"

# Automated API testing
bun run test:api --ai-only --url https://dave.io

Contributing

This platform follows strict development standards:

  • Schema-First Development: All APIs defined with Zod schemas before implementation
  • Comprehensive Testing: Unit tests for all business logic, integration tests for APIs
  • Type Safety: Full TypeScript coverage with strict configuration
  • Quality Gates: Biome + Trunk linting, type checking, and test validation
  • Breaking Changes Welcome: Platform prioritizes correctness over backward compatibility

For detailed development guidelines, see Development Environment and Code Quality & Linting.


Last Updated: June 16, 2025 | Commit: d5375e61