IsUp - Recommended Tech Stack
Philosophy
Build a modern, scalable uptime monitoring service that can compete with UptimeRobot while leveraging cutting-edge technologies for better developer experience, performance, and maintainability.
Recommended Stack Overview
┌─────────────────────────────────────────────────────────────────┐
│ FRONTEND │
│ Next.js 14+ (App Router) + TypeScript + Tailwind + shadcn/ui │
└─────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ API LAYER │
│ Next.js API Routes / tRPC / Hono │
└─────────────────────────────────────────────────────────────────┘
│
┌───────────────────┼───────────────────┐
▼ ▼ ▼
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ PostgreSQL │ │ Redis │ │ ClickHouse │
│ (Primary DB) │ │ (Cache/Queue) │ │ (Analytics) │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ MONITORING WORKERS │
│ Distributed Node.js/Bun workers across multiple regions │
└─────────────────────────────────────────────────────────────────┘Frontend
Core Framework: Next.js 14+ (App Router)
Why Next.js:
- Server Components for optimal performance
- Built-in API routes (can start monolithic, split later)
- Excellent TypeScript support
- Easy deployment to Vercel or self-hosted
- React Server Components reduce client bundle size
- Streaming and Suspense for real-time dashboards
UI Layer
| Technology | Purpose |
|---|---|
| TypeScript | Type safety across the stack |
| Tailwind CSS | Utility-first styling, fast iteration |
| shadcn/ui | High-quality, accessible components |
| Recharts/Tremor | Charts and data visualization |
| React Query (TanStack) | Server state management, caching |
| Zustand | Lightweight client state (if needed) |
Real-time Updates
- Server-Sent Events (SSE) for live status updates
- WebSockets (via Socket.io or Soketi) for instant incident alerts
- Consider Liveblocks or Partykit for multiplayer features
Backend
Option A: Next.js + tRPC (Recommended for Speed)
Best for rapid development, type-safety end-to-end.
// Example tRPC router
export const monitorRouter = router({
create: protectedProcedure
.input(createMonitorSchema)
.mutation(({ input, ctx }) => {
return createMonitor(input, ctx.user.id);
}),
list: protectedProcedure
.query(({ ctx }) => {
return getMonitors(ctx.user.id);
}),
});Option B: Hono + Bun (Recommended for Performance)
Best for high-throughput API, can run at the edge.
// Example Hono API
const app = new Hono()
.get('/monitors', auth(), async (c) => {
const monitors = await getMonitors(c.get('userId'));
return c.json(monitors);
})
.post('/monitors', auth(), validator('json', createMonitorSchema), async (c) => {
const monitor = await createMonitor(c.req.valid('json'));
return c.json(monitor, 201);
});Public REST API
Regardless of internal choice, expose a clean REST API for customers:
- OpenAPI/Swagger documentation
- API key authentication
- Rate limiting with clear headers
- Webhooks for event notifications
Database Layer
Primary Database: PostgreSQL
Why PostgreSQL:
- Battle-tested reliability
- Excellent JSON support for flexible schemas
- Row-level security for multi-tenancy
- Great ecosystem (Prisma, Drizzle, pg)
ORM Options:
- Drizzle ORM (Recommended) - Type-safe, lightweight, great migrations
- Prisma - Great DX, but heavier runtime
Caching & Queues: Redis / Upstash
Use Cases:
- Session storage
- Rate limiting (sliding window)
- Pub/sub for real-time updates
- Job queues (with BullMQ)
- Caching frequent queries
Recommendation: Start with Upstash Redis (serverless, pay-per-use)
Time-Series Analytics: ClickHouse or TimescaleDB
For storing and querying millions of check results:
ClickHouse (Recommended):
- Extremely fast aggregations
- Column-oriented storage
- Great for response time analytics
- Use ClickHouse Cloud or Tinybird for managed
Alternative: TimescaleDB
- PostgreSQL extension (simpler ops)
- Good enough for initial scale
Monitoring Workers
Architecture: Distributed Edge Workers
Deploy lightweight workers across multiple regions:
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ US-East │ │ EU-West │ │ Asia-Pac │
│ Worker │ │ Worker │ │ Worker │
└──────┬───────┘ └──────┬───────┘ └──────┬───────┘
│ │ │
└────────────────┬┴─────────────────┘
│
▼
┌─────────────────┐
│ Central API │
│ (Result Store) │
└─────────────────┘Worker Implementation Options
-
Cloudflare Workers (Recommended)
- 200+ edge locations
- Low latency checks globally
- Cron triggers for scheduled checks
- Durable Objects for state
-
Fly.io
- Deploy containers close to users
- Great for custom worker logic
- Easy horizontal scaling
-
AWS Lambda@Edge / Lambda
- Multi-region deployment
- Good for existing AWS infrastructure
Worker Responsibilities
interface CheckResult {
monitorId: string;
timestamp: Date;
region: string;
status: 'up' | 'down' | 'degraded';
responseTime: number;
statusCode?: number;
error?: string;
certExpiry?: Date;
dnsRecords?: DNSRecord[];
}Infrastructure & DevOps
Hosting Options
| Component | Recommended | Alternative |
|---|---|---|
| Frontend/API | Vercel | Fly.io, Railway |
| Database | Neon (Postgres) | Supabase, PlanetScale |
| Redis | Upstash | Redis Cloud |
| Workers | Cloudflare Workers | Fly.io |
| Analytics DB | Tinybird/ClickHouse Cloud | TimescaleDB |
Observability
- Logging: Axiom or Betterstack Logs
- Error Tracking: Sentry
- Metrics: Prometheus + Grafana or Datadog
- Tracing: OpenTelemetry
CI/CD
- GitHub Actions for CI
- Vercel/Fly for automatic deployments
- Terraform for infrastructure as code
Authentication & Authorization
Recommended: Better Auth or Clerk
Better Auth (Self-hosted):
- Open source
- Full control over user data
- Multiple auth methods (email, OAuth, magic link)
Clerk (Managed):
- Fastest to implement
- Great UI components
- Organizations/teams built-in
- More expensive at scale
Authorization
- Row-level security in Postgres
- Team/organization hierarchy
- Role-based access (Admin, Editor, Viewer, Notify-only)
Notification System
Architecture
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Incident │────▶│ Queue │────▶│ Notifiers │
│ Detected │ │ (BullMQ) │ │ │
└─────────────┘ └─────────────┘ └─────────────┘
│
┌──────────────────────────┼──────────────────────────┐
▼ ▼ ▼
┌──────────┐ ┌──────────┐ ┌──────────┐
│ Email │ │ SMS │ │ Slack │
│ (Resend) │ │ (Twilio) │ │ Webhook │
└──────────┘ └──────────┘ └──────────┘Notification Providers
| Channel | Provider |
|---|---|
| Resend, Postmark, or SES | |
| SMS | Twilio, Vonage |
| Voice | Twilio |
| Slack | Slack API |
| Discord | Discord Webhooks |
| Teams | MS Teams Webhooks |
| Telegram | Telegram Bot API |
| Webhooks | Custom HTTP endpoints |
Cost Estimates (Starting Out)
Serverless/Managed Approach
| Service | Free Tier | Estimated Monthly |
|---|---|---|
| Vercel | Hobby free | $20-50 (Pro) |
| Neon (Postgres) | 0.5GB free | $0-25 |
| Upstash Redis | 10K/day free | $0-10 |
| Cloudflare Workers | 100K/day free | $5-25 |
| Tinybird | 10GB free | $0-50 |
| Resend | 3K/mo free | $0-20 |
| Total | - | $25-180/mo |
Self-Hosted Approach (Fly.io/Railway)
| Service | Estimated Monthly |
|---|---|
| App Server (2x) | $20-40 |
| Postgres | $15-30 |
| Redis | $10-20 |
| Workers (3 regions) | $30-60 |
| ClickHouse | $50-100 |
| Total | $125-250/mo |
Technology Decision Matrix
| Requirement | UptimeRobot | IsUp Recommendation |
|---|---|---|
| Backend | PHP + Node.js | TypeScript (Next.js/Hono) |
| Database | MySQL | PostgreSQL |
| Cache | Redis | Redis (Upstash) |
| Workers | Custom servers | Cloudflare Workers / Fly.io |
| Analytics | Unknown | ClickHouse |
| API Style | REST | REST + tRPC (internal) |
Recommended Phase 1 Stack
For rapid MVP development:
Frontend: Next.js 14 + TypeScript + Tailwind + shadcn/ui
API: Next.js API Routes + tRPC
Database: Neon (PostgreSQL) + Drizzle ORM
Cache: Upstash Redis
Workers: Cloudflare Workers (3 regions)
Auth: Better Auth or Clerk
Email: Resend
Hosting: VercelThis gives you:
- ✅ End-to-end type safety
- ✅ Rapid development
- ✅ Low initial costs
- ✅ Easy scaling path
- ✅ Modern developer experience