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
anytypes) - 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:
- Run stack-specific validation (PHP lint,
npm run build, Python syntax check) - If errors are found, feed the error output back to the AI
- AI patches its own code based on the specific error messages
- Re-run validation
- 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
| Template | Stack | Use Case |
|---|---|---|
| PHP Pro | PHP 8 + MySQL + Tailwind | Full-stack web apps |
| Laravel | Laravel + Blade + MySQL | MVC applications |
| Node.js | Express + EJS | Server-rendered apps |
| Next.js | React + Next.js 14 | SSR/SSG applications |
| Expo | React Native (Expo) | Mobile apps |
| Expo Pro | Expo + Firebase + Navigation | Production mobile |
| Flutter | Dart + Flutter | Cross-platform mobile |
| REST API | Express + JWT + Prisma | API backends |
| Electron | Electron + React | Desktop 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:
| Time | Event |
|---|---|
| Hour 0 | Sent /expo Tadwerak Build a recycling app with wallet and e-commerce via Telegram |
| ~25 min | AI generated 30+ screens, tester validated Expo build, passed |
| Hour 1-4 | Manual refinement: Firebase integration, wallet flow logic, RTL Arabic layout |
| Hour 8-16 | UI polish, admin dashboard, push notifications, order tracking |
| Hour 20 | Final testing, edge case fixes |
| Hour 24 | Deployed 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.