core/.env
Tiago Yamamoto 8380a470be docs: adiciona setup completo e documentação end-to-end
- Cria .env com comentários detalhados (13 variáveis)
- Atualiza READMEs com guia completo de instalação
- Documenta setup Appwrite Cloud e schemas de collections
- Adiciona troubleshooting e guias de deploy
- Total: ~1.240 linhas de documentação em português
2025-12-11 19:55:12 -03:00

102 lines
4.5 KiB
Bash

# ==============================================================================
# APPWRITE CONFIGURATION - Backend as a Service (BaaS)
# ==============================================================================
# Appwrite Cloud provides authentication, database, storage, and serverless functions
# Documentation: https://appwrite.io/docs
# ------------------------------------------------------------------------------
# SERVER-SIDE VARIABLES (for Node.js scripts and Appwrite Functions)
# ------------------------------------------------------------------------------
# APPWRITE_ENDPOINT
# The API endpoint for your Appwrite instance
# For Appwrite Cloud: https://cloud.appwrite.io/v1
# For self-hosted: http://localhost/v1 or your custom domain
APPWRITE_ENDPOINT=https://cloud.appwrite.io/v1
# APPWRITE_PROJECT_ID
# Your Appwrite project identifier
# How to get: Go to https://cloud.appwrite.io → Select/Create Project → Copy Project ID
# Example: 6789abcdef123456
APPWRITE_PROJECT_ID=
# APPWRITE_API_KEY
# Secret API key with Admin permissions for server-side operations
# How to get: Project Settings → API Keys → Create API Key → Select all scopes
# WARNING: Keep this secret! Never commit to version control or expose client-side
# Example: a1b2c3d4e5f6...
APPWRITE_API_KEY=
# APPWRITE_FUNCTIONS_ENDPOINT (Optional)
# Custom endpoint for Appwrite Functions if using a dedicated domain
# Leave empty to use the same as APPWRITE_ENDPOINT
APPWRITE_FUNCTIONS_ENDPOINT=
# APPWRITE_FUNCTIONS_API_KEY (Optional)
# Separate API key for Functions if you want isolated permissions
# Leave empty to use the same as APPWRITE_API_KEY
APPWRITE_FUNCTIONS_API_KEY=
# ------------------------------------------------------------------------------
# CLIENT-SIDE VARIABLES (for React Dashboard - Vite requires VITE_ prefix)
# ------------------------------------------------------------------------------
# VITE_APPWRITE_ENDPOINT
# Same as APPWRITE_ENDPOINT, but accessible in browser via import.meta.env
# Must start with VITE_ to be exposed by Vite build system
VITE_APPWRITE_ENDPOINT=https://cloud.appwrite.io/v1
# VITE_APPWRITE_PROJECT_ID
# Your Appwrite project identifier (same value as APPWRITE_PROJECT_ID)
# Exposed to browser for client SDK initialization
VITE_APPWRITE_PROJECT_ID=
# VITE_APPWRITE_DATABASE_ID
# The database ID where all collections are stored
# How to get: Appwrite Console → Databases → Create/Select Database → Copy Database ID
# Suggested name: "DevOpsPlatform"
# Example: main_db_123
VITE_APPWRITE_DATABASE_ID=
# ------------------------------------------------------------------------------
# COLLECTION IDs (created inside the database)
# ------------------------------------------------------------------------------
# VITE_APPWRITE_COLLECTION_SERVERS_ID
# Collection for storing server information
# Schema: name (string), ip (string), status (enum: online/offline), region (string)
# Suggested ID: "servers"
VITE_APPWRITE_COLLECTION_SERVERS_ID=
# VITE_APPWRITE_COLLECTION_GITHUB_REPOS_ID
# Collection for GitHub repository data
# Schema: repo_name (string), url (url), last_commit (string), status (string)
# Suggested ID: "github_repos"
VITE_APPWRITE_COLLECTION_GITHUB_REPOS_ID=
# VITE_APPWRITE_COLLECTION_AUDIT_LOGS_ID
# Collection for audit log entries (used by Realtime terminal widget)
# Schema: event (string), user_id (string), timestamp (datetime)
# Suggested ID: "audit_logs"
VITE_APPWRITE_COLLECTION_AUDIT_LOGS_ID=
# VITE_APPWRITE_COLLECTION_CLOUDFLARE_ACCOUNTS_ID
# Collection for Cloudflare account integrations
# Schema: provider (string), apiKey (string), label (string)
# Suggested ID: "cloud_accounts" or "cloudflare_accounts"
VITE_APPWRITE_COLLECTION_CLOUDFLARE_ACCOUNTS_ID=
# ==============================================================================
# SETUP CHECKLIST
# ==============================================================================
# 1. Create Appwrite Cloud account at https://cloud.appwrite.io
# 2. Create a new project and copy the Project ID
# 3. Create API Key with all permissions (for server-side operations)
# 4. Create a Database named "DevOpsPlatform" and copy its ID
# 5. Create collections inside the database with the schemas described above
# 6. Enable Email/Password authentication provider
# 7. Create a test user in Authentication → Users
# 8. Deploy the three Appwrite Functions from appwrite-functions/ directory
# 9. Fill in all the IDs above
# 10. Run: npm install → npm run dev:web
# ==============================================================================