[BACKEND] Initialize Go backend structure and dependencies (#23)

This commit is contained in:
2026-02-15 22:50:06 +00:00
parent 7157877f0b
commit c75f976a2d
29 changed files with 1857 additions and 253 deletions

44
server/.env.example Normal file
View File

@@ -0,0 +1,44 @@
# Chat Switchboard - Server Environment Variables
# Copy this file to .env and fill in the values
# Server settings
PORT=8080
ENVIRONMENT=development
DEBUG=true
# Database settings (PostgreSQL)
DB_HOST=localhost
DB_PORT=5432
DB_USER=chat_switchboard
DB_PASSWORD=your-secure-password-here
DB_NAME=chat_switchboard
DB_SSL_MODE=disable
DB_MAX_CONNS=25
# JWT settings
JWT_SECRET=your-super-secret-jwt-key-change-in-production
JWT_EXPIRATION=24h
JWT_ISSUER=chat-switchboard
# CORS settings (comma-separated for multiple origins)
CORS_ALLOWED_ORIGINS=http://localhost:3000,http://localhost:8080
CORS_ALLOWED_METHODS=GET,POST,PUT,DELETE,OPTIONS,PATCH
CORS_ALLOWED_HEADERS=Content-Type,Authorization,X-Requested-With,Accept,Origin
# Rate limiting
RATE_LIMIT_REQUESTS=100
RATE_LIMIT_WINDOW=1m
# Logging
LOG_LEVEL=info
# Optional: Redis configuration (for WebSocket pub/sub and session cache)
# REDIS_HOST=localhost
# REDIS_PORT=6379
# REDIS_DB=0
# REDIS_PASSWORD=
# Optional: External services
# OPENAI_API_KEY=
# ANTHROPIC_API_KEY=
# GOOGLE_API_KEY=