A comprehensive website uptime monitoring application built with Go (backend) and React (frontend).
- Group Management: Organize websites into logical groups
- Real-time Monitoring: Continuous monitoring of website availability
- Response Time Tracking: Track and visualize response times over time
- Status Dashboard: Visual status indicators (green/yellow/red)
- Charts & Analytics: Response time charts with daily, weekly, and monthly views
- Easy Website Addition: Add multiple websites when creating groups
The easiest way to run Sitewatch is using the provided Makefile:
# Show all available commands
make help
# Install all dependencies
make install
# Run both frontend and backend in development mode
make dev
# Quick start (install + dev)
make quick-start
If you prefer to run services manually:
cd server
go mod download
go run cmd/api/main.go
cd frontend
pnpm install
pnpm run dev
make help
- Show help message with all available commandsmake install
- Install dependencies for both frontend and backendmake dev
- Run both services in development modemake build
- Build both frontend and backend for productionmake run
- Run the production buildmake test
- Run all testsmake clean
- Clean build artifactsmake stop
- Stop running processes
make frontend-dev
- Run only the frontend development servermake frontend-build
- Build frontend for productionmake frontend-install
- Install only frontend dependencies
make backend-dev
- Run only the backend development servermake backend-build
- Build backend binarymake backend-test
- Run backend testsmake backend-watch
- Run backend with live reload (using air)
make docker-up
- Start services using Docker Composemake docker-down
- Stop Docker services
make deploy
- Clean, build, and prepare for deploymentmake quick-start
- Install dependencies and start development servers
The application now supports adding websites directly when creating a new group, saving you time and steps:
- Click the "Add Group" button
- Enter a group name
- Optionally add one or more websites:
- Fill in the website name and URL
- Click "Add Website" to add more website fields
- Use the trash icon to remove website fields (minimum 1 required)
- Click "Add Group" to create the group with all specified websites
- Default Website Field: One website field is shown by default
- Dynamic Fields: Add or remove website fields as needed
- Optional Websites: You can create a group without any websites
- Validation: Only websites with both name and URL filled will be added
- Batch Creation: All valid websites are added automatically after group creation
The backend provides a RESTful API:
GET /api/groups
- Get all groups with their websitesPOST /api/groups
- Create a new groupPUT /api/groups/{id}
- Update a groupDELETE /api/groups/{id}
- Delete a groupPOST /api/groups/{id}/websites
- Add a website to a groupPUT /api/groups/{groupId}/websites/{websiteId}
- Update a websiteDELETE /api/groups/{groupId}/websites/{websiteId}
- Delete a websiteGET /api/chart/{period}
- Get chart data (today/weekly/monthly)POST /api/check
- Force a monitoring check
sitewatch/
├── frontend/ # React frontend application
│ ├── app/
│ │ ├── routes/ # React Router routes
│ │ └── components/ # Reusable UI components
│ └── package.json
├── server/ # Go backend application
│ ├── cmd/api/ # Application entry point
│ ├── internal/ # Internal packages
│ │ ├── database/ # Database operations
│ │ ├── models/ # Data models
│ │ ├── monitor/ # Monitoring logic
│ │ └── server/ # HTTP server and routes
│ └── go.mod
└── Makefile # Build and development commands
Frontend:
- React 18 with TypeScript
- React Router for navigation
- Recharts for data visualization
- Tailwind CSS for styling
- shadcn/ui component library
- Vite for build tooling
Backend:
- Go 1.19+
- Chi router for HTTP routing
- SQLite database
- CORS support for frontend integration
The application continuously monitors all configured websites and updates their status based on:
- Green: Website is responding normally (< 5 seconds)
- Yellow: Website is slow or has minor issues (5-10 seconds)
- Red: Website is down or not responding (> 10 seconds or error)
Response times and status changes are tracked and stored for historical analysis and charting.
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests:
make test
- Submit a pull request
This project is licensed under the MIT License.