AI-Orchestrated Development

DevOps Pilot

Send a Telegram command, get a deployed application. AI generates code from 9 stack templates, auto-tests for errors, sets up databases, and deploys to AWS staging — all without touching an IDE.

PythonTelegram Bot APIClaude / GeminiAWS EC2SSH

DevOps Pilot

An AI-orchestrated development and deployment framework that turns a single Telegram message into a fully deployed application. Send a command, get a running app on AWS — with generated code, automated testing, database setup, and production deployment.

This is how I shipped Tadwerak (30+ screens, dual-role mobile app) in under 24 hours.

Pipeline Architecture

text
┌─────────────────────────────────────────────────────────────┐ │ TELEGRAM │ │ /expo Tadwerak Build a recycling app with wallet │ └──────────┬──────────────────────────────────────────────────┘ ┌──────────▼──────────────────────────────────────────────────┐ │ GHOST (ghost.py) — Command Parser │ │ Extracts: template=expo, name=Tadwerak, spec="recycling..." │ └──────────┬──────────────────────────────────────────────────┘ ┌──────────▼──────────────────────────────────────────────────┐ │ ENGINE (core/engine.py) — AI Code Generator │ │ Prompts Claude/Gemini with template + requirements │ │ Generates full project codebase │ └──────────┬──────────────────────────────────────────────────┘ ┌──────────▼──────────────────────────────────────────────────┐ │ DRIVER (core/driver.py) — AI IDE Controller │ │ Orchestrates write → iterate → refine cycles │ └──────────┬──────────────────────────────────────────────────┘ ┌──────────▼──────────────────────────────────────────────────┐ │ TESTER (core/tester.py) — Validation Engine │ │ PHP lint, Node build, Python checks │ │ ┌─────────────────────────────────────┐ │ │ │ SELF-CORRECTION LOOP │ │ │ │ Error → AI Fix → Retest → Pass/Fail │ │ │ │ (max 5 iterations) │ │ │ └─────────────────────────────────────┘ │ └──────────┬──────────────────────────────────────────────────┘ ┌──────────▼──────────────────────────────────────────────────┐ │ DB SETUP (core/dbsetup.py) │ │ Auto-generates and executes schema.sql │ └──────────┬──────────────────────────────────────────────────┘ ┌──────────▼──────────────────────────────────────────────────┐ │ DEPLOYER (core/deployer.py) │ │ Packages build → SSH to AWS EC2 → Deploys to staging │ │ Sets up Nginx, PM2/PHP-FPM, env variables │ └─────────────────────────────────────────────────────────────┘

Core Modules

Ghost (ghost.py) — Telegram Command Parser

Listens for messages in a specific Telegram chat. Parses structured commands like:

/web PizzaDash Build a pizza ordering dashboard with auth and payments
/expo Tadwerak Build a recycling app with wallet and e-commerce
/flutter MyApp Build a fitness tracker with charts

Extracts the template identifier, project name, and natural language specification, then routes to the engine.

Engine (core/engine.py) — AI Code Generator

Takes the parsed command and the selected stack template, then constructs a detailed prompt for Claude or Gemini. The prompt includes:

  • The full template boilerplate (file structure, package.json, routing patterns)
  • The user's natural language requirements
  • Coding standards (TypeScript strict, ESLint, no any types)
  • Expected output format (complete file-by-file codebase)

Tester (core/tester.py) — Self-Correction Loop

This is the critical differentiator from other AI coding tools. After code generation:

  1. Run stack-specific validation (PHP lint, npm run build, Python syntax check)
  2. If errors are found, feed the error output back to the AI
  3. AI patches its own code based on the specific error messages
  4. Re-run validation
  5. Loop up to 5 times or until clean build

Most "AI coding" tools generate code and hope it works. DevOps Pilot generates, validates, and fixes until it actually compiles.

Deployer (core/deployer.py) — AWS Staging

Packages the validated build and deploys via SSH to an AWS EC2 staging server:

  • Sets up Nginx reverse proxy
  • Configures PM2 (Node) or PHP-FPM
  • Injects environment variables
  • Runs database migrations
  • Returns the live staging URL back to Telegram

9 Supported Templates

TemplateStackUse Case
PHP ProPHP 8 + MySQL + TailwindFull-stack web apps
LaravelLaravel + Blade + MySQLMVC applications
Node.jsExpress + EJSServer-rendered apps
Next.jsReact + Next.js 14SSR/SSG applications
ExpoReact Native (Expo)Mobile apps
Expo ProExpo + Firebase + NavigationProduction mobile
FlutterDart + FlutterCross-platform mobile
REST APIExpress + JWT + PrismaAPI backends
ElectronElectron + ReactDesktop apps

Each template includes a complete boilerplate with routing, auth patterns, database schemas, and UI component libraries pre-configured. The AI doesn't start from a blank file — it starts from a production-ready scaffold.

Proof: The Tadwerak Timeline

This is the concrete proof that the pipeline works:

TimeEvent
Hour 0Sent /expo Tadwerak Build a recycling app with wallet and e-commerce via Telegram
~25 minAI generated 30+ screens, tester validated Expo build, passed
Hour 1-4Manual refinement: Firebase integration, wallet flow logic, RTL Arabic layout
Hour 8-16UI polish, admin dashboard, push notifications, order tracking
Hour 20Final testing, edge case fixes
Hour 24Deployed and delivered to client

The AI generated the skeleton. The product decisions — which screens matter, how the wallet flow works, how to handle Arabic RTL layout — those were human judgment calls that no AI can make.

What the AI Could NOT Do

This is the honest breakdown of the AI/human split:

AI handled:

  • Boilerplate generation (file structure, imports, component skeletons)
  • Repetitive CRUD screens (user list, order list, etc.)
  • Basic navigation wiring
  • Standard UI patterns (forms, lists, modals)

I handled:

  • Product architecture decisions (what screens to build, user flow logic)
  • Firebase Firestore schema design (collections, subcollections, security rules)
  • Wallet reconciliation logic (credits, debits, withdrawal processing)
  • RTL Arabic layout (I18nManager configuration, bidirectional text handling)
  • Push notification service integration
  • Admin role separation and permission logic
  • Edge cases: offline handling, input validation, error states
  • Visual polish and UX refinement

The ratio was roughly 30% AI scaffold / 70% human engineering. The AI accelerated the start; the human delivered the product.