Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

tfgrid-studio/tfgrid-ai-stack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

105 Commits

TFGrid AI Stack

License GitHub stars GitHub issues

AI-powered development platform with integrated Git hosting and deployment.

Overview

TFGrid AI Stack is an app that deploys a complete AI-powered development platform on a single VM. It automatically installs and configures three integrated components:

  • Nginx Reverse Proxy: Public API gateway with routing, SSL termination, and monitoring
  • AI Agent Service: AI-powered project creation and code generation (Node.js API)
  • Gitea Git Server: Git repository hosting with web interface

All components run on the same VM and are accessible through clean URLs on a single domain.

Quick Start

Deploy the complete AI development environment:

tfgrid-compose up tfgrid-ai-stack

Features

  • πŸ€– AI-Powered Development: Create projects with AI assistance
  • πŸ“¦ Integrated Git Hosting: Built-in Gitea for version control
  • 🌐 Public Deployment: Automatic web deployment with SSL
  • πŸ“Š Monitoring: Prometheus + Grafana dashboards
  • πŸ”’ Secure Networking: WireGuard VPN for inter-VM communication
  • ⚑ One-Click Deployment: Single command setup
  • πŸ”„ Automated Backups: Scheduled backups with retention policies

Architecture

Internet
 ↓
[Single VM]
β”œβ”€β”€ Nginx Reverse Proxy ← routing, SSL, monitoring
β”œβ”€β”€ AI Agent Service ← project creation & code generation
└── Gitea Git Server ← repository hosting & web interface

URL Structure

https://yourdomain.com/
β”œβ”€β”€ / β†’ Gateway dashboard/API
β”œβ”€β”€ /git/ β†’ Gitea web interface
β”œβ”€β”€ /api/ β†’ AI Agent API endpoints
β”œβ”€β”€ /monitoring/ β†’ Prometheus/Grafana
└── /project1/ β†’ AI-generated projects

Usage

Deploy

tfgrid-compose up tfgrid-ai-stack

Create a Project

tfgrid-compose exec tfgrid-ai-stack create "portfolio website"

List Projects

tfgrid-compose exec tfgrid-ai-stack projects

Access Services

# Get deployment URLs
tfgrid-compose address tfgrid-ai-stack
# SSH into VMs
tfgrid-compose ssh tfgrid-ai-stack

Management Commands

# Monitor project logs
tfgrid-compose exec tfgrid-ai-stack monitor <project-name>
# Delete a project
tfgrid-compose exec tfgrid-ai-stack delete <project-name>
# Manual backup
tfgrid-compose exec tfgrid-ai-stack backup
# Restore from backup
tfgrid-compose exec tfgrid-ai-stack restore <backup-file>

Configuration

The pattern supports extensive customization through variables:

Domain & SSL

  • domain: Custom domain name for public access
  • ssl_email: Email for SSL certificate (required if domain set)

Resource Allocation

  • vm_cpu/memory/disk: Single VM resources (all services co-located)

Security & Limits

  • api_rate_limit: API rate limiting
  • max_concurrent_projects: Concurrent project creation limit

Backup Settings

  • backup_retention_days: Backup retention period
  • backup_schedule: Cron schedule for automated backups

Requirements

  • ThreeFold Grid account with sufficient TFT
  • tfgrid-compose CLI installed
  • SSH key configured

Resources

  • CPU: 8 cores total (default)
  • Memory: 16GB total (default)
  • Disk: 200GB total (default)
  • Cost: ~15ドル-20/month (varies by node pricing)

App Structure

tfgrid-ai-stack/
β”œβ”€β”€ tfgrid-compose.yaml # App definition (single-vm pattern)
β”œβ”€β”€ deployment/ # Component orchestration hooks
β”‚ β”œβ”€β”€ setup.sh # Install all components on single VM
β”‚ β”œβ”€β”€ configure.sh # Configure nginx routing
β”‚ └── healthcheck.sh # Verify component health
β”œβ”€β”€ scripts/ # AI project management scripts
β”œβ”€β”€ README.md # This file
└── LICENSE # Apache 2.0

Development

This app is maintained by TFGrid Studio. It integrates components from:

Documentation

Support

Releases

No releases published

Packages

Contributors

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /