A comprehensive full-stack application for monitoring website availability, performance, and sending alerts when issues are detected.
- Website Monitoring: Track uptime and response times for your websites
- Real-time Dashboard: View the status of all monitored websites at a glance
- Detailed Analytics: Analyze response time trends and historical data
- Smart Alerting: Get notified via email when a website goes down
- Custom Alerts: Configure alert settings for each website
- User Authentication: Secure login system with role-based access control
- Node.js with Express
- MongoDB with Mongoose
- JWT Authentication
- Nodemailer for email alerts
- React with Vite
- Material-UI for UI components
- React Router for navigation
- Chart.js for data visualization
- Axios for API communication
website-monitor/
├── backend/ # Node.js backend code
│ ├── config/ # Configuration files
│ ├── controllers/ # Request handlers
│ ├── middleware/ # Express middleware
│ ├── models/ # Mongoose data models
│ ├── routes/ # API route definitions
│ ├── services/ # Business logic
│ ├── utils/ # Helper utilities
│ ├── server.js # Main server file
│ └── package.json # Backend dependencies
│
└── frontend-vite/ # React frontend code
├── public/ # Static assets
├── src/ # Source code
│ ├── components/ # Reusable UI components
│ ├── context/ # React context providers
│ ├── pages/ # Page components
│ ├── App.jsx # Main app component
│ └── main.jsx # Entry point
├── index.html # HTML template
└── package.json # Frontend dependencies
- Node.js (v14+)
- MongoDB
- npm or yarn
- Navigate to the backend directory
cd backend - Install dependencies
npm install - Create a
.envfile with the following variables:PORT=5001 MONGODB_URI=mongodb://localhost:27017/website-monitor JWT_SECRET=your_jwt_secret EMAIL_USER=your_email@example.com EMAIL_PASSWORD=your_email_password FRONTEND_URL=http://localhost:3000 - Start the server
npm run dev
- Navigate to the frontend directory
cd frontend-vite - Install dependencies
npm install - Create a
.envfile with the following variables:VITE_API_URL=http://localhost:5001/api - Start the development server
npm run dev - Open your browser and navigate to
http://localhost:3000
POST /api/auth/register- Register a new userPOST /api/auth/login- Login a user
GET /api/websites- Get all websitesPOST /api/websites- Add a new websiteGET /api/websites/:id- Get a specific websitePUT /api/websites/:id- Update a websiteDELETE /api/websites/:id- Delete a websiteGET /api/websites/:id/history- Get status historyGET /api/websites/:id/downtime- Get downtime incidents
GET /api/alerts/:websiteId- Get alert settingsPUT /api/alerts/:websiteId- Update alert settingsPOST /api/alerts/:websiteId/test- Send a test alert
GET /api/analytics/response-time- Get overall response time dataGET /api/analytics/response-time/:websiteId- Get website response time data
GET /api/users/me- Get current user infoPUT /api/users/profile- Update user profilePUT /api/users/password- Change passwordGET /api/users/notifications- Get notification settingsPUT /api/users/notifications- Update notification settings
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with the MERN stack (MongoDB, Express, React, Node.js)
- UI designed with Material-UI
- Charts powered by Chart.js