Stop guessing if your services are down. Get instant alerts when they go offline.
PingMonitor is a straightforward uptime monitoring tool that watches your URLs and APIs around the clock. Every 60 seconds, it pings each of your monitored services, logs response times and status codes, and emails you the moment something goes wrong without spamming you with duplicate alerts.
Think of it as a lightweight alternative to paid uptime monitoring services, completely open source and ready to run on free tiers (MongoDB Atlas, Resend, Render, Netlify).
Clone the repo, install dependencies, and run both the backend and frontend locally:
git clone https://github.com/omjaisatya/PingMonitor.git
cd PingMonitor
# Terminal 1: Start the backend
cd server
npm install
npm run dev
# Terminal 2: Start the frontend
cd ../client
npm install
npm run dev
# Open http://localhost:5173 in your browserThat's it. You're ready to create your first monitor.
- How It Works
- Features at a Glance
- Tech Stack
- Full Setup Guide
- Environment Variables
- API Endpoints
- Cron Workflow
- Data & Storage
- Contributing
Backend: A scheduled cron job wakes up every 60 seconds, checks all your active monitors in parallel, records the results, and fires off email alerts if anything changed status from up → down.
Frontend: A clean React dashboard lets you manage monitors, view uptime, and toggle monitoring on/off without ever touching a terminal.
Secure Authentication: JWT-based login with bcrypt password hashing
Real-Time Monitoring : Concurrent pings every 60 seconds with 10-second timeouts
Detailed Logging : HTTP status codes, response times (ms), exact timestamps
Smart Alerts : Email notifications only on status changes (no spam)
Auto Cleanup : Delete a monitor, and all its logs disappear with it
Auto Data Purge : Logs older than 7 days are automatically removed
Free & Open Source : Run entirely on free tiers; no credit card needed
| Component | Technology |
|---|---|
| Frontend | React.js + Vite + Axios + React Router |
| Backend | Node.js + Express.js + MongoDB (Mongoose) |
| Authentication | JWT + bcryptjs |
| Scheduler | node-cron |
| Resend |
All services used are free tier with no credit card required (except MongoDB Atlas, which is genuinely free up to 512 MB).
Additional technologies and frameworks will be integrated in the future. Please refer to the actual repository for the latest stack.
- Node.js v18+ - Install here
- MongoDB - Either local or free cloud via MongoDB Atlas
- Resend Account - For email alerts via Resend
git clone https://github.com/omjaisatya/PingMonitor.git
cd PingMonitorcd server
npm installCreate a .env file in the /server directory (see the Environment Variables section below), then start the development server:
npm run devYou should see:
Server running on http://localhost:<your-PORT>
Connected to MongoDBOpen a new terminal, then:
cd client
npm install
npm run devNavigate to http://localhost:5173 in your browser. You should see the PingMonitor login page.
- Sign up with any email and password
- Click "Create Monitor" and add your first URL (e.g.,
https://google.com) - Watch the dashboard update as monitors are pinged
- You'll receive email alerts when services go down
Copy .env.example to .env in each directory and fill in your values. All services are free tier.
| Variable | Example | Notes |
|---|---|---|
PORT |
5000 |
Express server port |
MONGO_URI |
mongodb+srv://user:pass@cluster.mongodb.net/pingmonitor |
MongoDB Atlas connection string |
JWT_SECRET |
your-random-secret-key-here |
Keep this private; used to sign JWTs |
RESEND_API_KEY |
re_xxxxxxxxxxxxxx |
Get from Resend Dashboard |
SENDER_EMAIL |
noreply@yourdomain.com |
Must be verified in Resend |
NODE_ENV |
development |
Set to production when deployed |
FRONTEND_URL |
http://localhost:5173 |
Where your React app runs |
Email Setup: By default, PingMonitor uses Resend. If you prefer SMTP (e.g., Gmail, other mail provider), see ./docs/nodemailer-setup.md.
| Variable | Example | Notes |
|---|---|---|
VITE_SERVER_URL |
http://localhost:5000 or https://api.yourdomain.com |
Full URL of your backend |
VITE_APP_TITLE |
PingMonitor |
Title shown in browser tab |
All endpoints except /auth/signup and /auth/login require:
Authorization: Bearer <your-jwt-token>| Method | Endpoint | Purpose |
|---|---|---|
POST |
/api/auth/signup |
Create a new account |
POST |
/api/auth/login |
Log in and receive JWT |
| Method | Endpoint | Purpose |
|---|---|---|
POST |
/api/monitors |
Create a new monitor |
GET |
/api/monitors |
List all your monitors |
GET |
/api/monitors/:id |
Get details of one monitor |
PUT |
/api/monitors/:id |
Update monitor settings |
PATCH |
/api/monitors/:id/toggle |
Turn monitoring on/off |
DELETE |
/api/monitors/:id |
Delete monitor + all logs |
For request/response examples, see ./docs/apiReference.md.
The following diagram describes the backend ping cycle, which runs every 60 seconds:
Every 60 seconds
│
▼
Fetch all active monitors from DB
│
▼
Ping each URL concurrently (10s timeout)
│
├── 2xx / 3xx → status: "up"
└── 4xx / 5xx / timeout / error → status: "down"
│
▼
Was previous status NOT "down"?
│ │
Yes No
│ │
Send email alert Skip (already notified)
│
▼
Save log entry + update monitor statusThis approach ensures you get notified immediately when something breaks, but not spammed if it stays broken.
- Retention period: 7 days
- Scope: Only ping logs are purged; monitor configurations and user accounts persist forever
- Why 7 days?: It's enough time to spot trends and patterns in uptime without consuming too much storage (important for the free MongoDB Atlas tier)
- Delete a monitor → All its associated logs are deleted immediately
- Logs older than 7 days → Automatically removed every day via MongoDB TTL index
This keeps your database lean and your dashboard snappy.
- Push your code to GitHub
- Create a new Web Service on Render.com
- Connect your GitHub repo
- Add the environment variables from
.env - Deploy (Render auto-rebuilds on push)
- Build the React app:
npm run buildin/client - Deploy the
dist/folder to Netlify (drag & drop or connect GitHub) - Set
VITE_SERVER_URLto your Render backend URL in Netlify's environment variables
Contributions, bug reports, and feature requests are welcome. Please open an issue before submitting a pull request so the proposed change can be discussed first.
Built and maintained by @omjaisatya.Licensed under MIT.