Skip to content

kbhatnagar1506/orbit

Repository files navigation

🛰️ Orbit

Never open your laptop on-call again.

An AI-powered dev agent that catches production bugs in real-time, proposes fixes via WhatsApp, and merges PRs—all while you're traveling, sleeping, or off the grid.

Orbit Demo License Python Node.js

🎯 The Problem

Your app crashes at 3 AM. You're on a flight. Your on-call engineer is in a meeting. By the time anyone notices, you've lost customers, revenue, and sleep.

Orbit solves this.


✨ What Orbit Does

Production Error Detected
        ↓
Heroku Log Stream → Orbit Agent
        ↓
Claude AI analyzes the bug
        ↓
WhatsApp: "Error in payment.js line 47. Fix it now?"
        ↓
You: "yes"
        ↓
Agent creates branch → writes fix → runs tests
        ↓
WhatsApp: "PR ready. Approve?"
        ↓
You: "looks good"
        ↓
🚀 PR merged. Bug fixed. You're done.

Total time: 60 seconds. Your involvement: 2 messages.


🚀 Key Features

🔍 Real-Time Error Detection

  • Streams production logs from Heroku in real-time
  • Filters for critical errors (unhandled exceptions, 5xx errors, crashes)
  • Extracts file names, line numbers, and stack traces automatically

🤖 AI-Powered Code Analysis

  • Claude API reads the error + source code
  • Proposes targeted fixes (not generic patches)
  • Validates fixes with automated testing before sending

📱 Mobile-First Approval Flow

  • WhatsApp as your interface (no new app to install)
  • Works on planes, trains, and bad WiFi
  • Natural language replies: "yes", "looks good", "hold on"

🔗 GitHub Integration

  • Auto-creates feature branches (fix/payment-null-user)
  • Opens PRs with detailed diffs
  • Merges on your approval
  • Full audit trail (who approved what, when)

🎯 Human-in-the-Loop

  • Agent never acts without asking
  • You see the fix before it's merged
  • Freeform feedback: "also check guest checkout"

🏗️ Architecture

┌─────────────────────────────────────────────────────────────┐
│                    Your Production App                       │
│                    (Heroku / Railway)                        │
└────────────────────────┬────────────────────────────────────┘
                         │ (logs)
                         ↓
┌─────────────────────────────────────────────────────────────┐
│              Orbit Cloud Agent (FastAPI)                     │
│  ┌──────────────────────────────────────────────────────┐   │
│  │ Log Drain Listener                                   │   │
│  │ • Parse stack traces                                 │   │
│  │ • Filter critical errors                             │   │
│  │ • Extract file + line number                         │   │
│  └──────────────────────────────────────────────────────┘   │
│                         ↓                                    │
│  ┌──────────────────────────────────────────────────────┐   │
│  │ Claude API Integration                               │   │
│  │ • Analyze error + source code                        │   │
│  │ • Generate fix                                       │   │
│  │ • Validate with tests                                │   │
│  └──────────────────────────────────────────────────────┘   │
│                         ↓                                    │
│  ┌──────────────────────────────────────────────────────┐   │
│  │ State Machine                                        │   │
│  │ • DETECTED → ANALYZING → PROPOSED → PR_OPEN → DONE  │   │
│  └──────────────────────────────────────────────────────┘   │
└─────────────────────────────────────────────────────────────┘
         ↓                                    ↑
    (WhatsApp)                          (GitHub API)
         ↓                                    ↑
┌─────────────────────────────────────────────────────────────┐
│                    Your Phone (WhatsApp)                     │
│                    Your GitHub Account                       │
└─────────────────────────────────────────────────────────────┘

🛠️ Tech Stack

Component Technology Why
Agent Runtime FastAPI / Python Fast, async, perfect for webhooks
LLM Brain Claude API (Sonnet 4) Best at code analysis + reasoning
Mobile Interface Twilio WhatsApp API Works everywhere, no app install
GitHub Automation PyGithub / Octokit Native GitHub integration
Cloud Hosting Railway / Render Free tier, instant deploys
Log Streaming Heroku Drains Real-time production logs
Testing Docker containers Safe sandbox for fix validation

🚀 Quick Start

Prerequisites

  • Python 3.9+
  • GitHub account + personal access token
  • Twilio account (free WhatsApp sandbox)
  • Heroku app (or any app with log streaming)
  • Claude API key

1. Clone & Setup

git clone https://github.com/kbhatnagar1506/orbit.git
cd orbit
python -m venv venv
source venv/bin/activate  # or `venv\Scripts\activate` on Windows
pip install -r requirements.txt

2. Configure Environment

cp .env.example .env

Fill in your .env:

CLAUDE_API_KEY=sk-ant-...
GITHUB_TOKEN=ghp_...
TWILIO_ACCOUNT_SID=AC...
TWILIO_AUTH_TOKEN=...
TWILIO_WHATSAPP_NUMBER=+1234567890
GITHUB_REPO_OWNER=your-username
GITHUB_REPO_NAME=your-repo

3. Deploy to Railway

railway link
railway up

4. Connect Heroku Log Drain

heroku drains:add https://your-railway-app.railway.app/logs --app your-app

5. Test It

Break a function in your repo, push it, and watch the magic happen.


📊 Demo Flow (90 Seconds)

  1. Deploy a test app to Heroku with a planted bug
  2. Trigger the bug (hit a route that crashes)
  3. Watch Heroku logs fill with errors
  4. WhatsApp notification arrives with the diff
  5. Reply "yes" on your phone
  6. GitHub PR appears in real-time
  7. Reply "approve"
  8. PR merges automatically
  9. Hit the route again — it works ✅

🎯 Use Cases

🏢 For Engineering Teams

  • On-call engineers don't need to be glued to laptops
  • Fixes deployed while you sleep
  • Audit trail for compliance

🚀 For Startups

  • Catch bugs before customers report them
  • Reduce MTTR (mean time to recovery)
  • Scale without hiring more ops engineers

🏭 For Agencies

  • One agent per client repo
  • 24/7 monitoring across all projects
  • Impress clients with instant fixes

✈️ For Traveling Devs

  • Your codebase is your co-pilot
  • Fix production bugs from anywhere
  • Never miss a critical alert

💰 B2B Pricing Model

Tier Use Case Price
Startup Per developer/month $49–99
Agency Per repository/month $199–499
Enterprise Platform license + SLA $2k–10k/mo

🔒 Security & Compliance

  • E2E Encryption — WhatsApp messages encrypted end-to-end
  • Audit Trail — Every approval logged with timestamp + user
  • Sandboxed Execution — Fixes tested in isolated Docker containers
  • SOC2 Roadmap — Enterprise-grade compliance coming soon
  • On-Prem Option — Deploy Orbit in your own infrastructure

🧠 How the AI Works

Error Detection

# Catches patterns like:
# - "UnhandledPromiseRejection"
# - "Cannot read properties of undefined"
# - "ECONNREFUSED"
# - "out of memory"
# - Stack traces with file + line numbers

Fix Generation

Claude reads:
1. The error message + stack trace
2. The source code (file + context)
3. Recent commits (to understand intent)

Claude generates:
1. Root cause analysis
2. Targeted fix (not a band-aid)
3. Test cases to validate

Validation

Before sending to WhatsApp:
1. Run the fix in a Docker container
2. Execute existing tests
3. Check for regressions
4. Format the diff nicely

📈 Metrics That Matter

Metric Impact
MTTR Reduce from hours to minutes
Uptime Catch bugs before customers notice
Dev Happiness No more 3 AM wake-up calls
Cost Savings Downtime costs $10k+/hr for most companies

🤝 Contributing

We're building this at a hackathon. Want to help?

  1. Fork the repo
  2. Create a feature branch (git checkout -b feature/amazing-thing)
  3. Commit your changes (git commit -m 'Add amazing thing')
  4. Push to the branch (git push origin feature/amazing-thing)
  5. Open a Pull Request

📚 Documentation

  • Architecture Deep Dive
  • API Reference
  • Deployment Guide
  • Troubleshooting

🎓 What We Learned

  • WhatsApp is the perfect interface for async approvals
  • Claude is incredible at understanding stack traces
  • Heroku log drains are more reliable than webhooks
  • State machines keep the conversation coherent
  • Humans + AI > AI alone (the approval gate is the feature)

🚀 Roadmap

  • Slack integration (alongside WhatsApp)
  • Jira / Linear ticket auto-linking
  • Multi-repo dashboards
  • Custom fix templates per team
  • Rollback automation
  • Performance profiling integration
  • On-prem deployment option

📞 Support

  • Issues? Open a GitHub issue
  • Questions? Start a discussion
  • Want to chat? Reach out on social

📄 License

MIT License — see LICENSE for details.


🙏 Acknowledgments

Built with ❤️ at a hackathon by developers who've been woken up at 3 AM one too many times.

Special thanks to:

  • Claude API for being an incredible code analyst
  • Heroku for reliable log streaming
  • Twilio for making WhatsApp integration seamless
  • GitHub for the best developer platform

🎬 See It In Action

Watch the 90-second demo ← Coming soon


Never open your laptop on-call again.

Get StartedDocumentationContribute

Made with 🚀 by developers, for developers.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages