Skip to content

yuv008/Pingora

Repository files navigation

πŸš€ API Monitor Platform - Production-Ready SaaS

A comprehensive, production-ready API monitoring platform with real-time alerting, multi-tenant support, and beautiful visualizations.

βœ… Implementation Status

Backend: 100% Complete βœ… Frontend: 100% Complete βœ… Workers: 100% Complete βœ… 3D Visualizations: 100% Complete βœ… WebSocket Real-time: 100% Complete βœ… Documentation: 100% Complete βœ…

πŸŽ‰ ALL FEATURES COMPLETE! The platform is production-ready with advanced 3D visualizations and real-time updates!

🌟 Features

Core Monitoring

  • βœ… Multi-Protocol Support: HTTP/HTTPS, TCP, UDP, DNS, WebSocket, gRPC
  • βœ… Global Monitoring: Multi-region checks (US-East, US-West, EU, Asia)
  • βœ… Smart Alerts: Email, Slack, Webhook, SMS, PagerDuty integrations
  • βœ… Real-time Updates: WebSocket-based live monitoring dashboard
  • βœ… Advanced Metrics: P95/P99 response times, uptime tracking, anomaly detection

3D Visualizations

  • 🌍 3D Globe Visualization: Real-time monitoring status across global regions
  • πŸ“Š 3D Network Graph: Interactive service dependency visualization
  • 🎨 Animated Landing Page: Three.js powered immersive experience
  • πŸ“ˆ 3D Charts: Beautiful 3D data visualizations for metrics

Enterprise Features

  • πŸ‘₯ Multi-Tenant Architecture: Workspace-based isolation with Row-Level Security
  • πŸ” Advanced Authentication: JWT tokens, session management, MFA support
  • πŸ’³ Stripe Integration: Complete billing and subscription management
  • πŸ“„ Public Status Pages: Branded status pages with custom domains
  • πŸ”’ Enterprise Security: Rate limiting, RBAC, audit logs

πŸ—οΈ Architecture

Backend

  • Framework: FastAPI (Python 3.11+)
  • Database: PostgreSQL 15+ with TimescaleDB extension
  • Cache/Queue: Redis 7+
  • Task Queue: Celery with Redis broker
  • Monitoring: Prometheus + Grafana

Frontend

  • Framework: Next.js 14 (App Router)
  • Language: TypeScript
  • Styling: Tailwind CSS
  • 3D Engine: Three.js + React Three Fiber
  • State Management: Zustand + React Query
  • Charts: Recharts + Three.js custom charts

Infrastructure

  • Containerization: Docker + Docker Compose
  • Orchestration: Kubernetes (production)
  • CI/CD: GitHub Actions
  • Monitoring: Sentry + Prometheus

πŸ“ Project Structure

api-monitor-platform/
β”œβ”€β”€ backend/                    # FastAPI Backend
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ api/v1/            # API endpoints
β”‚   β”‚   β”œβ”€β”€ core/              # Security, config, utilities
β”‚   β”‚   β”œβ”€β”€ models/            # SQLAlchemy models
β”‚   β”‚   β”œβ”€β”€ schemas/           # Pydantic schemas
β”‚   β”‚   β”œβ”€β”€ services/          # Business logic
β”‚   β”‚   β”œβ”€β”€ workers/           # Celery tasks
β”‚   β”‚   └── utils/             # Helpers
β”‚   β”œβ”€β”€ tests/                 # Backend tests
β”‚   └── alembic/               # Database migrations
β”‚
β”œβ”€β”€ frontend/                   # Next.js Frontend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ app/               # Next.js App Router
β”‚   β”‚   β”œβ”€β”€ components/        # React components
β”‚   β”‚   β”‚   β”œβ”€β”€ 3d/           # Three.js components
β”‚   β”‚   β”‚   β”œβ”€β”€ dashboard/    # Dashboard widgets
β”‚   β”‚   β”‚   β”œβ”€β”€ monitors/     # Monitor components
β”‚   β”‚   β”‚   └── ui/           # UI primitives
β”‚   β”‚   β”œβ”€β”€ lib/              # API client, utilities
β”‚   β”‚   └── hooks/            # Custom React hooks
β”‚   └── public/               # Static assets
β”‚
β”œβ”€β”€ infrastructure/            # Infrastructure as Code
β”‚   β”œβ”€β”€ docker/               # Dockerfiles
β”‚   β”œβ”€β”€ kubernetes/           # K8s manifests
β”‚   └── terraform/            # Terraform configs
β”‚
└── docs/                     # Documentation

πŸš€ Quick Start

Prerequisites

  • Docker & Docker Compose
  • Node.js 18+ (for local frontend development)
  • Python 3.11+ (for local backend development)

Development Setup

  1. Clone the repository
git clone https://github.com/your-org/api-monitor-platform.git
cd api-monitor-platform
  1. Configure environment variables
cp .env.example .env
# Edit .env with your configuration
  1. Start services with Docker Compose
docker-compose up -d
  1. Access the application

Manual Setup (Development)

Backend

cd backend
poetry install
poetry run alembic upgrade head
poetry run uvicorn app.main:app --reload

Frontend

cd frontend
npm install
npm run dev

πŸ“Š Features Breakdown

Monitor Types

  1. HTTP/HTTPS Monitoring

    • Custom headers, body, query parameters
    • Authentication (Basic, Bearer, OAuth2, API Key)
    • Response validation (status codes, body content, JSON path)
    • SSL certificate monitoring
  2. TCP/UDP Port Monitoring

    • Port availability checks
    • Connection time tracking
  3. DNS Monitoring

    • DNS resolution checks
    • Record validation
  4. WebSocket Monitoring

    • Connection establishment
    • Message exchange validation

Alerting System

  • Channels: Email, Slack, Webhook, SMS (Twilio), PagerDuty
  • Smart Rules: Consecutive failures, cooldown periods, recovery notifications
  • Alert Templates: Customizable email and message templates
  • Escalation: Multi-level alert escalation

Analytics & Reporting

  • Uptime Tracking: 24h, 7d, 30d, custom ranges
  • Response Times: Average, P50, P95, P99
  • Incident Reports: MTTR (Mean Time To Recovery)
  • SLA Compliance: Track SLA violations
  • Custom Dashboards: Build custom monitoring dashboards

🎨 3D Visualizations

Landing Page

  • Animated particle network showing global connectivity
  • Interactive 3D globe with monitoring locations
  • Smooth camera transitions and effects

Dashboard

  • 3D Status Globe: Real-time monitoring status by region
  • Network Graph: Service dependencies in 3D space
  • Metric Visualizations: 3D bar charts, line graphs
  • Alert Timeline: 3D timeline of incidents

πŸ” Security Features

  • Authentication: JWT-based with refresh tokens
  • Session Management: Redis-backed session store
  • Rate Limiting: Token bucket algorithm per user/tier
  • Row-Level Security: PostgreSQL RLS for multi-tenancy
  • Encryption: Passwords (bcrypt), sensitive data (AES-256)
  • Audit Logs: Complete audit trail of user actions

πŸ’³ Pricing Tiers

Feature Free Starter Pro Business Enterprise
Monitors 10 50 200 1000 Unlimited
Check Interval 5 min 1 min 30 sec 10 sec Custom
Team Members 1 5 15 50 Unlimited
Data Retention 30 days 90 days 1 year 2 years Custom
Alert Channels 2 5 15 Unlimited Unlimited
Price/Month $0 $29 $79 $299 Custom

πŸ§ͺ Testing

Backend Tests

cd backend
poetry run pytest --cov=app tests/

Frontend Tests

cd frontend
npm run test
npm run test:e2e

🚒 Deployment

Docker Production Build

docker-compose -f docker-compose.prod.yml up -d

Kubernetes Deployment

kubectl apply -f infrastructure/kubernetes/

πŸ“š Documentation

🀝 Contributing

Contributions are welcome! Please read our Contributing Guide for details.

πŸ“„ License

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

πŸ™ Acknowledgments

πŸ“§ Support


Built with ❀️ by the API Monitor Team

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors