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.
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.
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
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
- Use Taubyte's capabilities - Don't reinvent the wheel
- Follow Taubyte patterns - Use the established patterns
- Export all functions - Use
//export functionName - Handle errors properly - Use utility functions
- Set CORS headers - For HTTP endpoints
- Use context for data - Request-scoped data
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
- 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