#
UpPing Documentation
A fast, modern website uptime and performance monitoring tool built with React, TypeScript, and Cloudflare Workers.
#
Overview
UpPing is a comprehensive website monitoring solution that provides real-time uptime checks, performance metrics, SSL validation, and detailed error diagnostics. Built with modern web technologies and powered by Cloudflare's edge network for lightning-fast global performance.
#
Key Features
Check any website's uptime and performance instantly with sub-second response times powered by Cloudflare Workers edge computing.
Get detailed insights including:
- Response Time
- Time to First Byte (TTFB)
- SSL Certificate Status
- Health Score (0-100)
- Content Type Detection
Automatic categorization of issues:
- DNS Resolution Problems
- SSL/TLS Certificate Issues
- Server Errors (5xx)
- Client Errors (4xx)
- Network Timeouts
- Invalid Domains
Full redirect chain analysis with hop-by-hop information showing the complete path from requested URL to final destination.
#
Architecture
┌─────────────────┐ HTTP/HTTPS ┌─────────────────┐
│ │ ────────► │ │
│ Frontend │ │ Cloudflare │
│ (React/Vite) │ ◄──────── │ Workers API │
│ │ JSON │ │
└─────────────────┘ └─────────────────┘
#
Technology Stack
- React 18 - Modern UI library with hooks
- TypeScript - Type-safe development
- Vite - Lightning-fast build tool
- Tailwind CSS - Utility-first styling
- Axios - HTTP client
- Lucide React - Icon library
- Cloudflare Workers - Edge computing platform
- Wrangler - CLI and development tool
- Vitest - Testing framework
#
Getting Started
#
Prerequisites
warning System Requirements
- Node.js v18 or higher
- npm or yarn package manager
- Wrangler CLI (for API deployment)
#
Installation
#
1. Clone Repository
git clone https://github.com/vxrachit/UpPing.git
cd UpPing
#
2. Frontend Setup
cd frontend
npm install
Create .env file:
VITE_API_BASE_URL=https://your-worker-domain.workers.dev/
Start development server:
npm run dev
Frontend available at: http://localhost:5173
#
3. API Setup
cd api
npm install
Start local development:
npm run dev
API available at: http://localhost:8787
#
Project Structure
UpPing/
├── frontend/ # React frontend application
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ │ ├── Header.tsx # Navigation header
│ │ │ ├── Footer.tsx # Footer with links
│ │ │ ├── ResultCard.tsx # Results display
│ │ │ └── RecentChecks.tsx # Recent checks list
│ │ ├── hooks/ # Custom React hooks
│ │ │ ├── useTheme.ts # Dark/light mode
│ │ │ ├── useLocalStorage.ts # Local storage hook
│ │ │ └── useScrollAnimation.ts # Scroll animations
│ │ ├── lib/ # Utilities and API client
│ │ │ └── api.ts # API integration
│ │ ├── pages/ # Page components
│ │ │ ├── Home.tsx # Main monitoring page
│ │ │ ├── Health.tsx # Backend health check
│ │ │ └── About.tsx # About page
│ │ ├── App.tsx # Root component
│ │ ├── main.tsx # Entry point
│ │ └── index.css # Global styles
│ ├── package.json
│ ├── vite.config.ts
│ ├── tailwind.config.js
│ └── tsconfig.json
├── api/ # Cloudflare Workers API
│ ├── src/
│ │ └── index.js # Main worker script
│ ├── package.json
│ └── wrangler.jsonc # Cloudflare config
└── README.md
#
API Documentation
#
Endpoints
#
Health Check
Check API status and version.
GET /api/health
{
"ok": true,
"version": "1.0",
"timestamp": "2025-11-15T10:30:00.000Z"
}
#
Website Check
Perform comprehensive website health check.
GET /api/check?url={website}
Query Parameters:
url(required) - Website URL to check (with or without protocol)
Examples:
/api/check?url=google.com
/api/check?url=https://example.com
/api/check?url=github.com
{
"requestedUrl": "https://google.com",
"finalUrl": "https://www.google.com/",
"redirected": true,
"redirectCount": 1,
"redirectChain": [
{
"from": "https://google.com",
"to": "https://www.google.com/",
"code": 301
}
],
"statusCode": 200,
"responseTime": 245,
"ttfb": 180,
"sslStatus": "valid",
"contentType": "text/html; charset=utf-8",
"responseSize": 12345,
"classification": "Success",
"reason": "ok",
"error": null,
"advice": null,
"healthScore": 95,
"cached": false,
"checkedAt": "2025-11-15T10:30:00.000Z"
}
{
"requestedUrl": "https://invalid-domain-xyz.com",
"finalUrl": "https://invalid-domain-xyz.com",
"redirected": false,
"redirectCount": 0,
"redirectChain": [],
"statusCode": null,
"responseTime": 5234,
"ttfb": 0,
"sslStatus": "unknown",
"contentType": null,
"responseSize": 0,
"classification": "invalid_domain",
"reason": "invalid_domain",
"error": "Domain does not exist or cannot be resolved",
"advice": "This is not a valid website address. Please check the spelling.",
"healthScore": 0,
"cached": false,
"checkedAt": "2025-11-15T10:30:00.000Z"
}
#
Status Classifications
The API automatically classifies website status into the following categories:
#
Caching Strategy
The API implements intelligent caching:
- Cache Duration: 60 seconds
- Cache Key: Full URL
- Cache Storage: Cloudflare edge cache
- Cache Indicator:
cached: true/falsein response
#
Error Handling
The API provides detailed error classification and advice:
Example Error Classifications:
Valid Domain - Slow Response
{
"classification": "Success",
"healthScore": 60,
"advice": null,
"responseTime": 2500
}
Timeout
{
"classification": "timeout",
"reason": "timeout",
"advice": "The site took too long to respond. Possibly under heavy load.",
"healthScore": 25
}
Invalid Domain
{
"classification": "invalid_domain",
"reason": "invalid_domain",
"advice": "This is not a valid website address. Please check the spelling.",
"healthScore": 0
}
#
Performance Features
#
Request Strategy
The API uses a multi-stage request strategy:
- HEAD Request - Initial attempt with minimal data transfer
- Fallback GET Request - With Range header (0-1023 bytes) if HEAD fails
- Redirect Following - Manual handling up to 10 redirects
- Browser Headers - Mimics real browser behavior
#
Timeout Configuration
- Default timeout: 10 seconds
- Configurable per request
- AbortController for proper cancellation
#
Development
#
Available Scripts
#
Frontend Scripts
npm run dev # Start development server (localhost:5173)
npm run build # Build for production
npm run preview # Preview production build
npm run lint # Run ESLint
npm run typecheck # TypeScript type checking
#
API Scripts
npm run dev # Start local development (localhost:8787)
npm run deploy # Deploy to Cloudflare Workers
npm run start # Alias for dev
npm test # Run Vitest tests
#
Environment Configuration
#
Frontend (.env)
VITE_API_BASE_URL=https://your-api-domain.workers.dev/
#
Development Workflow
Local Development
# Terminal 1 - Start API cd api npm run dev # Terminal 2 - Start Frontend cd frontend npm run devTesting Changes
- Frontend: Hot reload at
http://localhost:5173 - API: Available at
http://localhost:8787
- Frontend: Hot reload at
Type Checking
cd frontend npm run typecheckLinting
cd frontend npm run lint
#
Deployment
#
Frontend Deployment
#
Build for Production
cd frontend
npm run build
Output: dist/ folder
#
Deployment Options
- Connect GitHub repository
- Set build command:
npm run build - Set build output:
dist
Use GitHub Actions workflow
#
API Deployment
#
Deploy to Cloudflare Workers
cd api
# Login (first time only)
wrangler login
# Deploy
npm run deploy
#
Post-Deployment
- Note the worker URL:
https://your-worker.workers.dev - Update frontend
.envwith worker URL - Rebuild and redeploy frontend
#
Testing
#
Frontend Testing
Current setup uses TypeScript type checking:
npm run typecheck
#
API Testing
Using Vitest with Cloudflare Workers pool:
cd api
npm test
#
Troubleshooting
#
Common Issues
Frontend Not Connecting to API
Solution:
- Check
.envfile has correctVITE_API_BASE_URL - Ensure API is running
- Check browser console for CORS errors
- Verify API URL format (include trailing slash)
API Deployment Fails
Solution:
- Run
wrangler loginto authenticate - Check
wrangler.jsoncconfiguration - Verify account has Workers enabled
- Check deployment logs:
wrangler tail
Build Errors
Solution:
- Delete
node_modulesand reinstall - Clear build cache:
rm -rf dist .vite - Update dependencies:
npm update - Check Node.js version (v18+)
#
Security
#
Frontend Security
- Input Validation - URL validation before API calls
- XSS Prevention - React automatic escaping
- HTTPS Only - Force secure connections
- Environment Variables - Sensitive data in
.env
#
API Security
- CORS Configuration - Controlled cross-origin access
- Rate Limiting - Cloudflare automatic protection
- Input Sanitization - URL validation and parsing
- Error Handling - No sensitive data in errors
- Timeout Protection - Prevent long-running requests
#
Best Practices
Never Commit
.envfiles- API keys
- Wrangler credentials
- Production URLs
#
Contributing
If you find UpPing useful, please consider:
- ⭐ Starring the GitHub repository
- 🍴 Forking to create your own version
- 📢 Sharing with others who might benefit
#
Development Setup
- Fork the repository on GitHub
Clone your fork locally
git clone https://github.com/YOUR_USERNAME/UpPing.git cd UpPingCreate a feature branch
git checkout -b feature/your-feature-nameInstall dependencies
# Frontend cd frontend && npm install # API cd ../api && npm install- Make your changes and test thoroughly
- Submit a pull request with clear description
#
Code of Conduct
- Be respectful and inclusive
- Provide constructive feedback
- Focus on the code, not the person
- Help others learn and grow
#
Support & Contact
#
Get Help
- Email: [email protected]
- Issues: GitHub Issues
#
Links
- Live Demo: https://upping.vxrachit.is-a.dev
- Repository: https://github.com/vxrachit/UpPing
#
Changelog
#
Version 1.0.0 (Current)
- ✨ Initial release
- ✅ Real-time website monitoring
- ✅ Performance metrics (Response Time, TTFB)
- ✅ SSL validation
- ✅ Health scoring algorithm
- ✅ Redirect chain tracking
- ✅ Recent checks history
- ✅ Cloudflare Workers API
- ✅ Comprehensive error handling
Made with ❤️ by vxRachit