refactor: migrar backend legado para estrutura baas-control-plane

This commit is contained in:
Tiago Yamamoto 2025-12-27 13:38:18 -03:00
parent 014a7f3730
commit 870d78fb91
30 changed files with 0 additions and 2201 deletions

102
.env
View file

@ -1,102 +0,0 @@
# ==============================================================================
# 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://nyc.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=68be03580005c05fb11f
# 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=standard_7001daac229944c8386fdd31be6bf58d571e1293dbb78db1e091da15deabaf59810e33635a5c6526fe3acddcb05253f67283adfd079fea2ea5795d9302af1667b56b7a9ae8d427e082c3b762a86a627adfcbcdf8898d8ea0bb6c445af50a60b45aae65787458c22bbcb0a7e3a0f79a041660a854c898994236de7438859ed8a6
# 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://nyc.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=68be03580005c05fb11f
# 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=693b54a8000dcf488143
# ------------------------------------------------------------------------------
# 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=servers
# 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=github_repos
# 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=audit_logs
# 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=cloud_accounts
# ==============================================================================
# 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
# ==============================================================================

27
.gitignore vendored
View file

@ -1,27 +0,0 @@
# Dependencies
node_modules/
npm-debug.log
*.log
# Environment variables
.env
.env.local
.env*.local
# OS
.DS_Store
Thumbs.db
# Editor
.vscode/
.idea/
*.swp
*.swo
*~
# Build outputs
dist/
build/
# Backend data
backend/data/tenants.json

2055
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,17 +0,0 @@
{
"name": "core",
"private": true,
"version": "1.0.0",
"type": "module",
"scripts": {
"dev:backend": "npm --prefix backend run dev",
"dev:dashboard": "cd dashboard && npm run dev",
"dev:landing": "cd landing && deno task start",
"dev:web": "npm-run-all -p dev:dashboard dev:landing",
"lint:dashboard": "cd dashboard && npm run lint",
"setup:appwrite": "npm --prefix backend run setup:appwrite"
},
"devDependencies": {
"npm-run-all": "^4.1.5"
}
}