English | 简体中文
URL: https://webmonitor.qfpqhyl.top/
The backend service is currently hosted on the maintainer's MacBook M4 Air. Availability may vary depending on the local Docker runtime. For stable use, self-hosting is recommended.
WebMonitor is a web content monitoring and email notification platform built with a React frontend and FastAPI backend. It can monitor specific areas of a page with XPath, detect content changes, and send email alerts automatically.
- Monitor web page content changes with XPath-based targeting
- Send email notifications when changes are detected
- Support public tasks and user subscriptions
- Provide a visual management dashboard for tasks, logs, users, and settings
- Support Docker-based deployment
- Support Chinese and English in the frontend UI
Frontend
- React
- Material UI
- React Query
- Axios
- react-i18next
Backend
- FastAPI
- SQLAlchemy
- APScheduler
- Selenium WebDriver
Deployment
- Docker
- Docker Compose
- SQLite by default, PostgreSQL supported in production
git clone https://github.com/webmonitor/WebMonitor.git
cd WebMonitor
docker-compose up -dThen open:
- Web UI: http://localhost:8000/
- API docs: http://localhost:8000/docs
The frontend is served by the same FastAPI process as the API, so the browser only talks to one origin and no CORS configuration exists.
Default admin account:
- Username:
admin - Password:
admin123
Backend:
# 依赖清单在仓库根目录(pyproject.toml 为源,requirements.txt 由 uv pip compile 生成)
# 工作区共用 conda 环境(Python 3.12),见 ../.github/env/environment.yml
conda activate webmonitor
pip install -r requirements.txt
cd backend && python main.pyFrontend:
cd frontend
pnpm install
pnpm startCopy .env.example to .env and update the values as needed.
| Variable | Description | Default |
|---|---|---|
SECRET_KEY |
JWT signing key. Required, at least 32 characters; example values are rejected. | - |
ADMIN_USERNAME |
Bootstrap admin username (used only when no admin exists) | admin |
ADMIN_PASSWORD |
Bootstrap admin password. Required on first start; startup fails if no admin exists and this is empty. Never resets an existing admin. | - |
ADMIN_EMAIL |
Bootstrap admin email | admin@example.com |
DATABASE_URL |
Database connection string | sqlite:///./data/webmonitor.db |
SMTP_SERVER |
Deployment-level SMTP fallback host (used only for users with no email config) | - |
SMTP_PORT |
SMTP port | 465 |
SMTP_USER |
SMTP username | - |
SMTP_PASSWORD |
SMTP password or app password | - |
RECEIVER_EMAIL |
Fallback notification recipient | - |
LOG_LEVEL |
Log level written to stdout | INFO |
FRONTEND_DIST |
Directory containing the built SPA | web |
Generate a signing key with:
python -c "import secrets; print(secrets.token_hex(32))"See .env.example for the current full configuration template.
- Track product price changes
- Watch website announcements or policy updates
- Monitor competitor pages
- Follow any page region that matters to your workflow
backend/ FastAPI API, database models, services, scheduler
frontend/ React application, pages, components, i18n resources
image/ Screenshots and assets used in documentation
- FastAPI serves the built React frontend and the API from one origin; the React app calls
/api/...through Axios with relative URLs. - Authentication is handled with JWT.
- Monitoring tasks are stored in the database through SQLAlchemy.
- APScheduler triggers monitoring jobs in the background.
- Selenium loads and checks target pages.
- Email notifications are sent when content changes are detected.
- Chinese documentation: README.zh-CN.md
- Backend API docs:
http://localhost:8000/docs
CC BY-NC 4.0 - Personal and non-commercial use only.
Made by 秋风飘起黄叶落
