A full-stack website monitoring application with real-time alerts, uptime tracking, and performance metrics.
#Images
-Dashboard

- 🔐 User Authentication (Register/Login)
- 🌐 Website Management (Add, Edit, Delete)
- 📊 Real-time Monitoring with multiple regions
- 📈 Performance Metrics (Uptime, Response Time, Error Rate)
- 📧 Email Alerts for downtime
- 📉 Historical Data (1 hour, 24 hours, 7 days, 30 days)
- 📱 Responsive Dashboard
- Node.js + Express
- Prisma ORM
- PostgreSQL
- Redis (for caching)
- Bull (for job queues)
- JWT Authentication
- React 19
- React Router v6
- Axios
- Recharts (for data visualization)
- Tailwind CSS
- Lucide React (icons)
- Node.js (v18 or higher)
- PostgreSQL
- Redis (optional, for production)
- Install backend dependencies:
npm install- Set up environment variables (create
.envfile):
DATABASE_URL="postgresql://user:password@localhost:5432/watchtower"
JWT_SECRET="your-secret-key"
REDIS_HOST="localhost"
REDIS_PORT=6379
SMTP_HOST="smtp.gmail.com"
SMTP_PORT=587
SMTP_USER="your-email@gmail.com"
SMTP_PASS="your-app-password"- Run Prisma migrations:
npx prisma migrate dev- Generate Prisma Client:
npx prisma generate- Start the backend server:
npm startBackend will run on http://localhost:3000
- Navigate to frontend directory:
cd frontend- Install frontend dependencies:
npm install- Create
.envfile in frontend directory:
VITE_API_BASE_URL=http://localhost:3000/api/v1- Start the frontend dev server:
npm run devFrontend will run on http://localhost:5173
POST /api/v1/users/register- Register new userPOST /api/v1/users/login- Login user
GET /api/v1/websites/websites- Get all websitesGET /api/v1/websites/website/:id- Get website by IDPOST /api/v1/websites/add-website- Add new websitePUT /api/v1/websites/update-website/:id- Update websiteDELETE /api/v1/websites/delete-website/:id- Delete website
POST /api/v1/checks/add-check- Start monitoring a websiteGET /api/v1/checks/checks/:websitename- Get all checks for a websiteGET /api/v1/checks/uptime/:websitename- Get uptime metricsGET /api/v1/checks/latest-check/:websitename- Get latest checkGET /api/v1/checks/last-1-hour/:websitename- Get checks from last hourGET /api/v1/checks/last-24-hours/:websitename- Get checks from last 24 hoursGET /api/v1/checks/last-7-days/:websitename- Get checks from last 7 daysGET /api/v1/checks/last-30-days/:websitename- Get checks from last 30 daysDELETE /api/v1/checks/checks/:websitename- Delete all checks for a website
npm testbetter/
├── models/
│ ├── controller/ # Route handlers
│ ├── service/ # Business logic services
│ └── auth/ # Authentication middleware
├── prisma/
│ ├── schema.prisma # Database schema
│ └── migrations/ # Database migrations
├── testing/ # Test files
├── frontend/
│ ├── src/
│ │ ├── components/ # Reusable components
│ │ ├── pages/ # Page components
│ │ ├── services/ # API services
│ │ ├── context/ # React context
│ │ └── config/ # Configuration files
│ └── public/
└── index.js # Backend entry point
- US_EAST_1 (US East)
- US_WEST_1 (US West)
- EU_WEST_1 (Europe West)
- AP_SOUTHEAST_1 (Asia Pacific Southeast)
MIT
