Vercel
Role: Hosts the Next.js web app, API Routes, and cron jobs. All server-side logic runs as Vercel serverless functions:POST /api/telegram— receives Telegram webhook events, dispatches commands to RedisPOST /api/pairandPOST /api/pair/confirm— handles the agent pairing flowGET /api/agentsandDELETE /api/agents/:id— agent managementPOST /api/stripe/checkoutandPOST /api/stripe/portal— Stripe session creationPOST /api/stripe/webhook— handles Stripe billing eventsGET /api/cron/trial-reminders— daily cron for trial expiry notifications
Neon PostgreSQL
Role: Primary database for persistent state. Tables:users, agents, sessions, pairing_codes.
Neon is a serverless PostgreSQL provider with per-query billing and automatic scale-to-zero. The database is not in the hot path for real-time message relay — it is only accessed for authentication, plan checks, session recording, and pairing code lifecycle.
Free tier: Neon free tier — 0.5 GB storage, sufficient for user and session data at MVP scale.
Redis (Upstash)
Role: Real-time pub/sub relay between API Routes and the local agent. Two channel patterns:agent:{agentId}— commands published by API Routes, subscribed to by the local agentoutput:{sessionId}— output chunks published by the agent, subscribed to by the output forwarder Vercel function
ioredis).
Free tier: Upstash free tier — 10,000 commands/day, sufficient for development and light production use. Upgrade to the pay-per-use tier for production.
Telegram
Role: User interface for sending commands and receiving output. RemoteAgent uses the Telegram Bot API via Grammy.js. The bot runs in webhook mode — Telegram sends a POST request to/api/telegram for each incoming message. There is no polling, no persistent bot process, and no server-to-Telegram persistent connection.
Grammy.js handles:
- HMAC-SHA256 signature verification on every webhook request
- Message parsing and routing
- Sending and editing messages (for streaming output)
- Inline keyboards (for plan upgrade buttons in trial reminders)
- Telegram Login Widget verification (for the connect page)
Stripe
Role: Payment processing and subscription management. Stripe handles:- Hosted Checkout pages (no payment form to build or maintain)
- Subscription lifecycle (creation, renewal, failure, cancellation)
- Customer Portal (self-service billing management for users)
- Webhook events for real-time plan updates
Summary
| Service | Role | Free tier |
|---|---|---|
| Vercel | Web app hosting, API Routes, cron | Hobby plan |
| Neon PostgreSQL | Database | 0.5 GB |
| Upstash Redis | Real-time relay (pub/sub) | 10k cmds/day |
| Telegram Bot API | User interface | Free |
| Stripe | Payments and subscriptions | No monthly fee |
All services are managed — no VMs, no containers, no Kubernetes. RemoteAgent
has zero custom infrastructure to maintain. Scale is handled automatically by
each provider.