Desktop deployment workspace architecture for GitHub-driven projects:
- Tauri provides desktop shell and command bridge.
- React + TypeScript provides UI and local user workflows.
- Go provides local backend API, storage, encryption, GitHub integration, and deployment engines.
GitOrbit/
backend/
cmd/server/
internal/
app/
config/
models/
security/
services/
auth/
deploy/
github/
sql/
storage/
.env.example
go.mod
config/
instances.json
profiles.json
src/
components/
config/
hooks/
services/
types/
utils/
App.tsx
main.tsx
styles.css
src-tauri/
src/
Cargo.toml
tauri.conf.json
package.json
vite.config.ts
- Sidebar with default profiles:
- Home view listing all instances.
- Search view for GitHub users, organizations, and repositories.
- Repositories view per selected profile.
- Compatibility check button reads
manifest.jsonand toggles Install availability. - Drag and drop profile behavior:
- Drop profile onto another profile: create folder.
- Hold Shift while dropping: reorder.
- Right-click context menus for profile and instance quick actions.
- Bottom-left account popup from sidebar icon (compact menu style, with close button).
- Instance popup supports outside-click close, Escape close, and a header close button.
- Local HTTP API on
127.0.0.1:3547. profiles.jsonmanager.instances.jsonmanager with encrypted credential payloads.- AES-GCM local encryption key generation.
- GitHub API client:
- search users and organizations and repositories
- list repositories
- fetch
manifest.json
- GitHub OAuth Device Flow (without client secret).
- FTP deployment engine baseline with:
- upload and replace behavior
- source from GitHub repository archive (branch/tag/commit)
- manifest-driven ignore patterns (
launcher.ignore) - deployment logs
- rollback of replaced files (backup restore)
- SSH engine baseline (command execution).
- SQL migration planner endpoint to compare two refs and generate safe ALTER ADD statements + warnings.
- SQL executor supports direct import execution for MySQL and PostgreSQL.
- SFTP module placeholder separated for incremental implementation.
start_backendcommand starts Go server process from desktop shell.- Frontend invokes this command before calling local API.
- Sensitive fields are encrypted before disk persistence.
- OAuth token is stored encrypted locally.
- No GitHub secret in code or manifest.
- Strict JSON decoding with unknown fields rejected.
- Basic payload validation on instance creation.
- Node.js 20+
- Rust + Cargo (for Tauri build/run)
- Go 1.22+
npm installcopy backend/.env.example backend/.envSet GITHUB_OAUTH_CLIENT_ID in your environment before launching backend/Tauri.
npm run devnpm run web:buildGET /healthGET /api/profilesPOST /api/profilesGET /api/instancesPOST /api/instancesGET /api/github/search?q=...GET /api/github/repos?owner=...GET /api/github/manifest?owner=...&repo=...POST /api/auth/github/device/startPOST /api/auth/github/device/pollPOST /api/auth/github/tokenPOST /api/deploy/ftpPOST /api/deploy/ftp/instancePOST /api/sql/migration-plan
manifest.json supports deployment filtering and SQL schema planning fields:
{
"project_name": "MyProject",
"version": "1.2.0",
"type": "php",
"launcher": {
"compatible": true,
"connection_types": ["ftp", "sql"],
"sql_schema_path": "database/schema.json",
"ignore": [
"actions/database.php",
"storage/",
"*.log"
],
"notes": "Optional deployment notes"
}
}Connection behavior:
launcher.connection_typescontrols required credentials by transport/feature.- Add
"sql"to require SQL credentials and execute SQL import during deploy. - Add
"ssh"to require SSH host/username. requires_sqlis still accepted for backward compatibility, butconnection_typesis preferred.
Manifest type guidance:
typedescribes the project runtime/category and drives UI hints.- Recommended values currently handled by UI:
php,html,python,go,other. - For this application (GitOrbit), use
"type": "go".
Rules for launcher.ignore:
actions/database.phpignores exactly this file.storage/ignores the full directory recursively.*.logignores matching filenames.assets/**ignores a tree prefix.
Why ignore files and folders:
- Keep server-only runtime files untouched (uploads, caches, session files).
- Avoid overwriting environment-specific files.
- Reduce transfer size and accidental destructive updates.
- JSON files cannot include header comments by JSON standard; code files include purpose comments at top.
- On this machine, frontend build was validated. Full Tauri and Go build requires local Cargo and Go binaries available in PATH.