Skip to content

Latest commit

 

History

History
72 lines (52 loc) · 2.71 KB

File metadata and controls

72 lines (52 loc) · 2.71 KB

🚨 CRITICAL RULES - READ THIS FIRST

⚠️ MANDATORY READING FOR AI ASSISTANTS

Every AI assistant MUST read this file before working on any Taubyte project.

WHY THIS MATTERS: AIs often default to familiar patterns (Express.js, Socket.io, etc.) but Taubyte has its own ecosystem. This file prevents common AI mistakes.

🤖 AI-SPECIFIC WARNINGS

As an AI, you might be tempted to:

  • Use familiar web frameworks (Express, Gin, Echo)
  • Implement WebSocket connections manually
  • Use external databases (MySQL, PostgreSQL)
  • Create custom pub/sub systems

DON'T DO THIS! Taubyte provides everything built-in.

🚫 FORBIDDEN PATTERNS

NEVER use these libraries or frameworks:

  • socket.io - Use Taubyte's built-in WebSocket handling
  • express.js - Use Taubyte's HTTP event handling
  • gin, echo, fiber - Use Taubyte's HTTP event handling
  • gorilla/websocket - Use Taubyte's WebSocket handling
  • external database drivers (MySQL, PostgreSQL, MongoDB, etc.)
  • external pub/sub systems (Redis, RabbitMQ, Apache Kafka, etc.)
  • external storage systems (AWS S3, Google Cloud Storage, etc.)
  • Any non-Taubyte SDK packages

✅ CORRECT PATTERNS

ALWAYS use these:

  • Taubyte SDK packages only - github.com/taubyte/go-sdk/*
  • Export functions with //export - Mandatory for all public functions
  • Taubyte's built-in database - Distributed key-value storage
  • Taubyte's pub/sub system - Real-time messaging
  • Taubyte's WebSocket handling - Built-in WebSocket support
  • Taubyte's storage system - File storage capabilities
  • CORS headers - For all HTTP endpoints
  • Proper error handling - Use provided utility functions

🎯 Key Principles

  1. Use Taubyte's capabilities - Don't reinvent the wheel
  2. Follow Taubyte patterns - Use the established patterns
  3. Export all functions - Use //export functionName
  4. Handle errors properly - Use utility functions
  5. Set CORS headers - For HTTP endpoints
  6. Use context for data - Request-scoped data

🚀 Quick Checklist

Before writing any Taubyte function, verify:

  • Using only github.com/taubyte/go-sdk/* packages
  • Function is exported with //export functionName
  • Using Taubyte's built-in services (database, pub/sub, storage)
  • Setting CORS headers for HTTP endpoints
  • Proper error handling with utility functions
  • Following Taubyte patterns from the guide

📞 Remember

  • ALWAYS use Taubyte SDK packages
  • ALWAYS export functions with //export
  • ALWAYS use Taubyte's built-in services
  • NEVER use external frameworks
  • NEVER reinvent the wheel - use Taubyte's capabilities