Skip to content

UptimeCheck is a robust monitoring solution that continuously tracks and reports the uptime status of websites and APIs. It provides real-time monitoring, detailed analytics, and instant alerts for downtime detection, ensuring seamless application health tracking.

License

Notifications You must be signed in to change notification settings

AAYUSH412/uptimecheck

Repository files navigation

UptimeCheck

UptimeCheck Logo

πŸš€ Enterprise-Grade Website & API Monitoring Platform

Real-time uptime tracking with distributed architecture and advanced analytics

MIT License TypeScript Next.js Bun

Features β€’ Architecture β€’ Tech Stack β€’ Getting Started β€’ Development β€’ Deployment β€’ Contributing


🌟 Overview

UptimeCheck is a robust, enterprise-grade monitoring solution that continuously tracks and reports the uptime status of websites and APIs. Built with modern microservices architecture, it provides real-time monitoring, detailed analytics, instant alerts, and comprehensive performance insights.

🎯 Key Highlights

  • ⚑ Real-time Monitoring - Sub-second response time tracking
  • 🌍 Global Distribution - Multi-region validator network
  • πŸ“Š Advanced Analytics - Historical trends and performance metrics
  • πŸ” Enterprise Security - Cryptographic authentication and data integrity
  • πŸš€ Modern Stack - Next.js 15, Bun runtime, WebSocket communication
UptimeCheck Dashboard Preview

Modern, intuitive dashboard with real-time monitoring capabilities

οΏ½ Features

πŸ” Monitoring Capabilities

  • πŸ”„ 24/7 Real-time Monitoring – Continuous website and API availability checks
  • ⚑ Sub-second Response Times – Precision latency measurement and tracking
  • 🌍 Global Validator Network – Distributed monitoring from multiple geographic regions
  • πŸ“ˆ Historical Analytics – Long-term uptime trends and performance insights
  • 🚨 Intelligent Alerting – Smart notifications via email, Slack, and webhooks

πŸ—οΈ Architecture & Performance

  • οΏ½ WebSocket Communication – Real-time status updates between validators and hub
  • πŸ›‘οΈ Cryptographic Security – Solana-based authentication and message signing
  • βš–οΈ Load Balancing – Intelligent task distribution across validator network
  • πŸ“Š Advanced Dashboard – Intuitive visualization with performance metrics
  • οΏ½ Enterprise Authentication – Seamless user management with Clerk integration

πŸ”§ Developer Experience

  • 🎨 Modern UI/UX – Beautiful, responsive interface with dark/light themes
  • οΏ½ Fast Development – Hot reload, TypeScript, and modern tooling
  • πŸ“± Mobile Responsive – Optimized for all device sizes and touch interfaces
  • πŸ”§ Easy Configuration – Simple setup with environment variables and Docker

βš™οΈ Tech Stack

🎨 Frontend Excellence

Technology Version Purpose
Next.js 15.2+ React framework with App Router
React 19.0+ UI library with concurrent features
TypeScript 5.8+ Type-safe development
Tailwind CSS 4.1+ Utility-first styling
Shadcn/ui Latest Beautiful component library
Framer Motion 12.6+ Smooth animations
Clerk 6.12+ Authentication service

πŸ”§ Backend Infrastructure

Technology Version Purpose
Bun 1.2+ High-performance JavaScript runtime
Express.js 4.18+ Web application framework
WebSockets Native Real-time bidirectional communication
Prisma 6.5+ Next-generation ORM
PostgreSQL 15+ Robust relational database
Solana Web3.js 1.87+ Cryptographic authentication

πŸ› οΈ Development Tools

Tool Purpose
Turbo Monorepo management and build system
ESLint Code linting and quality enforcement
Prettier Code formatting and style consistency
Husky Git hooks for quality assurance
Docker Containerization and deployment

πŸ” Security & Authentication

  • Solana Cryptography - Ed25519 digital signatures
  • TweetNaCl - Cryptographic library for message signing
  • JWT - JSON Web Tokens for API authentication
  • Clerk - Enterprise authentication provider

πŸ—οΈ Architecture

UptimeCheck is built on a modern microservices architecture designed for scalability, reliability, and global distribution. The system consists of four main components connected through WebSocket communication and shared database access.

UptimeCheck Architecture Diagram

Complete system architecture showing microservices communication flow

πŸ”„ Callback-Based Communication Flow

Callback Communication Flow

WebSocket communication pattern with cryptographic validation

🏒 Core Components

Component Port Technology Purpose
🎨 Frontend 3000 Next.js 15 + React 19 User interface and dashboard
πŸ”Œ API Server 4000 Express.js + Bun REST endpoints and business logic
🎯 Hub Service 4001 WebSocket + Bun Validator coordination and task distribution
⚑ Validators Dynamic Bun + Solana Keys Distributed monitoring workers

πŸ“Š Data Flow Architecture

graph TB
    Frontend[🎨 Frontend App] --> API[πŸ”Œ API Server]
    API --> Database[(πŸ—„οΈ PostgreSQL)]
    
    Hub[🎯 Hub Service] --> Database
    Hub <--> Validator1[⚑ Validator 1]
    Hub <--> Validator2[⚑ Validator 2]
    Hub <--> ValidatorN[⚑ Validator N]
    
    Validator1 --> Website1[🌐 Website 1]
    Validator2 --> Website2[🌐 Website 2]
    ValidatorN --> WebsiteN[🌐 Website N]
Loading

πŸ” Security & Authentication

  • Solana Cryptography - Ed25519 signatures for validator authentication
  • JWT Tokens - Secure API access and session management
  • Clerk Integration - Enterprise-grade user authentication
  • Message Signing - All validator communications cryptographically verified

πŸ“ Project Structure

πŸ“¦ uptimecheck/
β”œβ”€β”€ πŸš€ apps/
β”‚   β”œβ”€β”€ 🎨 frontend/         # Next.js 15 web application
β”‚   β”œβ”€β”€ πŸ”Œ api/              # Express.js REST API server
β”‚   β”œβ”€β”€ 🎯 hub/              # WebSocket hub coordinator
β”‚   └── ⚑ validator/        # Distributed monitoring workers
β”œβ”€β”€ πŸ“š packages/
β”‚   β”œβ”€β”€ πŸ”— common/           # Shared TypeScript types
β”‚   β”œβ”€β”€ πŸ—„οΈ db/               # Prisma database client
β”‚   β”œβ”€β”€ πŸ“‹ eslint-config/    # Shared linting rules
β”‚   └── πŸ”§ typescript-config/ # Shared TS configurations
β”œβ”€β”€ πŸ“„ docs/                 # Documentation files
β”œβ”€β”€ πŸ”’ .env.example          # Environment variables template
β”œβ”€β”€ πŸ“œ LICENSE               # MIT License
└── πŸ“– README.md             # This file

πŸš€ Getting Started

πŸ“‹ Prerequisites

Before you begin, ensure you have the following installed:

Requirement Version Download
Node.js 18.0+ nodejs.org
Bun 1.0+ bun.sh
Docker Latest docker.com
Git Latest git-scm.com

⚑ Quick Start

Get UptimeCheck running locally in under 5 minutes:

# 1️⃣ Clone the repository
git clone https://github.com/AAYUSH412/uptimecheck.git
cd uptimecheck

# 2️⃣ Install dependencies
bun install

# 3️⃣ Start PostgreSQL database
docker run --name uptimecheck-postgres \
  -e POSTGRES_USER=postgres \
  -e POSTGRES_PASSWORD=password \
  -e POSTGRES_DB=uptimecheck \
  -p 5432:5432 \
  -d postgres:15

# 4️⃣ Set up environment variables
cp .env.example .env
# Edit .env with your configuration

# 5️⃣ Initialize database
cd packages/db
bunx prisma generate
bunx prisma migrate dev
bun run seed
cd ../..

# 6️⃣ Start all services
bun run dev

πŸ”§ Detailed Setup

1. Environment Configuration

Create environment files for each service:

# packages/db/.env
DATABASE_URL="postgresql://postgres:password@localhost:5432/uptimecheck"

# apps/validator/.env (generate keys first)
cd apps/validator
bun generate-key.ts
# Copy the generated private key to .env
PRIVATE_KEY=[your_generated_private_key_array]

# apps/frontend/.env.local
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY="your_clerk_key"
CLERK_SECRET_KEY="your_clerk_secret"
NEXT_PUBLIC_API_URL="http://localhost:4000"

2. Database Setup

# Navigate to database package
cd packages/db

# Generate Prisma client
bunx prisma generate

# Run database migrations
bunx prisma migrate dev

# (Optional) Seed with sample data
bun run seed

# (Optional) Open Prisma Studio
bunx prisma studio

3. Service Startup

Start each service in separate terminal windows:

# Terminal 1: API Server (Port 4000)
cd apps/api && bun run dev

# Terminal 2: Hub Service (Port 4001)
cd apps/hub && bun index.ts

# Terminal 3: Validator Service
cd apps/validator && bun index.ts

# Terminal 4: Frontend (Port 3000)
cd apps/frontend && bun run dev

4. Verify Installation

Once all services are running, verify the setup:

🎯 Quick Commands

# Install all dependencies
bun install

# Start all services at once
bun run dev

# Build for production
bun run build

# Run linting
bun run lint

# Format code
bun run format

# Type checking
bun run check-types

πŸ”¨ Development

πŸ—οΈ Development Environment

UptimeCheck uses a modern development setup with hot reload, TypeScript, and comprehensive tooling.

Service Overview

Service Port Command Purpose
🎨 Frontend 3000 bun run dev Next.js web application
πŸ”Œ API Server 4000 bun run dev Express.js REST API
🎯 Hub Service 4001 bun index.ts WebSocket coordinator
⚑ Validator Dynamic bun index.ts Monitoring workers

Running Individual Services

# Frontend Development (with Turbopack)
cd apps/frontend && bun run dev

# API Server (with hot reload)
cd apps/api && bun run dev

# Hub Service (WebSocket server)
cd apps/hub && bun index.ts

# Validator Worker
cd apps/validator && bun index.ts

πŸ› οΈ Development Workflow

Database Development

# After schema changes
cd packages/db
bunx prisma generate
bunx prisma migrate dev --name your_migration_name

# Reset database (development only)
bunx prisma migrate reset

# View/edit data
bunx prisma studio

Adding New Validators

# Generate unique cryptographic keys
cd apps/validator
bun generate-key.ts

# Copy private key to .env
echo 'PRIVATE_KEY=[generated_key_array]' >> .env

Code Quality

# Lint all packages
bun run lint

# Format code
bun run format

# Type checking
bun run check-types

# Run all quality checks
bun run lint && bun run check-types

πŸ§ͺ Testing & Debugging

Service Health Checks

# Test API endpoints
curl http://localhost:4000/

# Check WebSocket connection
wscat -c ws://localhost:4001

# Monitor database
docker exec -it uptimecheck-postgres psql -U postgres -d uptimecheck

Common Development Tasks

Adding a New Website to Monitor:

  1. Start all services (API, Hub, Validator, Frontend)
  2. Open dashboard at http://localhost:3000
  3. Click "Add Website" and enter URL
  4. Validators automatically begin monitoring

Performance Monitoring:

  • Check service logs in terminal windows
  • Use browser DevTools for frontend debugging
  • Monitor database queries with Prisma Studio

🚨 Troubleshooting

Database Connection Issues
# Check PostgreSQL container
docker ps | grep uptimecheck-postgres

# Verify database connectivity
docker exec -it uptimecheck-postgres psql -U postgres -c "\l"

# Reset database if needed
cd packages/db && bunx prisma migrate reset
Validator Connection Problems
# Verify Hub service is running
curl -I http://localhost:4001

# Check validator private key format
cat apps/validator/.env

# Test WebSocket connection
wscat -c ws://localhost:4001
Port Conflicts
# Check what's using ports
lsof -i :3000  # Frontend
lsof -i :4000  # API
lsof -i :4001  # Hub

# Kill processes if needed
pkill -f "next dev"
pkill -f "bun.*api"

πŸš€ Deployment

🌐 Production Deployment

Frontend (Vercel)

# Build and deploy
bun run build
vercel deploy

# Environment variables for Vercel
NEXT_PUBLIC_API_URL=https://your-api-domain.com
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_live_...
CLERK_SECRET_KEY=sk_live_...

Backend Services (Docker)

# Dockerfile.api
FROM oven/bun:latest
WORKDIR /app
COPY package.json bun.lockb ./
RUN bun install
COPY . .
EXPOSE 4000
CMD ["bun", "run", "dev"]

Database (PostgreSQL)

# Production database setup
docker run -d \
  --name uptimecheck-prod \
  -e POSTGRES_USER=your_user \
  -e POSTGRES_PASSWORD=secure_password \
  -e POSTGRES_DB=uptimecheck_prod \
  -p 5432:5432 \
  postgres:15-alpine

# Run migrations
DATABASE_URL="postgresql://user:pass@host:5432/db" bunx prisma migrate deploy

☁️ Cloud Deployment Options

Platform Service Recommendation
Vercel Frontend ⭐ Recommended for Next.js
Railway Backend Services ⭐ Easy deployment
DigitalOcean Database Managed PostgreSQL
AWS Full Stack Enterprise deployment
Google Cloud Validators Global distribution

πŸ”’ Production Security

  • Environment Variables: Use secure secret management
  • SSL/TLS: Enable HTTPS for all services
  • Database: Use connection pooling and SSL
  • Authentication: Production Clerk keys
  • Monitoring: Set up logging and alerting

πŸ›£οΈ Roadmap

🎯 Current Version (v1.0)

  • βœ… Core Monitoring - Real-time website uptime tracking
  • βœ… Distributed Architecture - Multi-service microservices setup
  • βœ… WebSocket Communication - Real-time validator coordination
  • βœ… Modern UI - Next.js 15 dashboard with dark/light themes
  • βœ… Cryptographic Security - Solana-based validator authentication

πŸš€ Next Release (v1.1)

  • πŸ”„ SSL Certificate Monitoring - Track certificate expiration
  • πŸ”„ Advanced Alerting - Email, Slack, and webhook notifications
  • πŸ”„ Performance Analytics - Enhanced response time tracking
  • πŸ”„ Mobile App - iOS and Android monitoring applications
  • πŸ”„ API Documentation - Interactive Swagger/OpenAPI docs

🌟 Future Features (v2.0+)

  • πŸ“± Mobile Applications - Native iOS and Android apps
  • οΏ½ Advanced Notifications - PagerDuty, OpsGenie integrations
  • οΏ½ Team Collaboration - User roles and team management
  • 🌍 Global CDN Monitoring - Edge location performance tracking
  • πŸ€– AI-Powered Insights - Predictive analytics and recommendations
  • πŸ“Š Custom Dashboards - Personalized monitoring views
  • πŸ”— Third-party Integrations - Zapier, IFTTT, and workflow automation

🀝 Contributing

We love contributions from the community! UptimeCheck is open source and welcomes developers of all skill levels.

πŸš€ Quick Contribution Guide

  1. 🍴 Fork the repository
  2. 🌿 Create your feature branch: git checkout -b feature/amazing-feature
  3. πŸ’‘ Make your changes with tests
  4. βœ… Commit your changes: git commit -m 'feat: add amazing feature'
  5. πŸš€ Push to the branch: git push origin feature/amazing-feature
  6. πŸ“ Open a Pull Request

πŸ› οΈ Areas We Need Help

Area Skills Needed Difficulty
🎨 UI/UX Design React, Tailwind, Figma Beginner-Intermediate
πŸ”§ Backend Features Node.js, Bun, TypeScript Intermediate
πŸ“± Mobile Development React Native, Expo Intermediate-Advanced
πŸ”’ Security Audits Cryptography, WebSockets Advanced
πŸ“– Documentation Technical Writing Beginner
πŸ§ͺ Testing Jest, Playwright, Cypress Intermediate

πŸ“‹ Contribution Guidelines

  • Code Style: Follow ESLint and Prettier configurations
  • Commits: Use conventional commit messages (feat:, fix:, docs:)
  • Testing: Add tests for new features and bug fixes
  • Documentation: Update README files for significant changes

Read our detailed Contributing Guide for more information.


πŸ“ž Support & Community

πŸ†˜ Getting Help

  • πŸ“š Documentation: Check our comprehensive README files
  • πŸ› Bug Reports: Open an issue on GitHub
  • πŸ’‘ Feature Requests: Discuss in GitHub Discussions
  • πŸ“§ Direct Contact: [email protected]

🌟 Show Your Support

If you find UptimeCheck helpful, please consider:

  • ⭐ Star the repository on GitHub
  • οΏ½ Share on social media and spread the word
  • πŸ”— Contribute to the codebase
  • πŸ“ Write about your experience using UptimeCheck

οΏ½πŸ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.

Copyright Β© 2025 Aayush Vaghela


πŸ™Œ Acknowledgements

πŸ› οΈ Built With Amazing Technologies

Technology Description Website
Next.js React framework for production nextjs.org
Bun Fast all-in-one JavaScript runtime bun.sh
Prisma Next-generation Node.js and TypeScript ORM prisma.io
Tailwind CSS Utility-first CSS framework tailwindcss.com
Clerk Authentication and user management clerk.dev
Solana High-performance blockchain for cryptography solana.com

🎯 Special Recognition

  • Open Source Community - For the amazing tools and libraries
  • Early Contributors - Helping shape the project direction
  • Beta Testers - Providing valuable feedback and bug reports

πŸš€ Ready to monitor your websites like a pro?

Get Started β€’ View on GitHub β€’ Visit Developer

Made with ❀️ by Aayush Vaghela

⭐ Star this repo if you find it helpful!

About

UptimeCheck is a robust monitoring solution that continuously tracks and reports the uptime status of websites and APIs. It provides real-time monitoring, detailed analytics, and instant alerts for downtime detection, ensuring seamless application health tracking.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published