From d8de0a973a28b58bfa8e7f72cdc8cb28f8d8679e Mon Sep 17 00:00:00 2001 From: Dennis Date: Fri, 6 Mar 2026 00:52:48 +0100 Subject: [PATCH] docs: update README with all implemented features, API routes, and tier system Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- README.md | 44 +++++++++++++++++++++++++++++++++++--------- 1 file changed, 35 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 7ecbcfa..75c0ffc 100644 --- a/README.md +++ b/README.md @@ -30,12 +30,15 @@ Full-stack website monitoring platform that uses **Google Lighthouse** to audit | **Dashboard** | ✅ Real | Overview with charts, metrics, and website list | | **Performance Monitoring** | ✅ Real | Track scores over time with Recharts | | **SEO Analysis** | ✅ Real | SEO score tracking and recommendations | -| **Uptime Monitoring** | ✅ Real | Periodic uptime checks with alerting | -| **Team/Organization** | ✅ Real | Multi-user orgs with role-based access | -| **Alerts** | ✅ Real | Configurable alerts for downtime, performance, SSL | -| **Competitor Analysis** | ✅ Real | Compare your site metrics against competitors | +| **Uptime Monitoring** | ✅ Real | HTTP HEAD checks every 5 min, response time + SSL tracking | +| **Alert Engine** | ✅ Real | Evaluates scans against thresholds, auto-resolves on recovery | +| **Notifications** | ✅ Real | Email (Resend) + webhook delivery with debouncing | +| **Admin Dashboard** | ✅ Real | System stats, user CRUD, org management (role-protected) | +| **Billing & Usage** | ✅ Real | 4 tiers (free/starter/pro/enterprise), usage bars, limit enforcement | +| **Competitor Analysis** | ✅ Real | Lighthouse comparison + response time benchmarking | +| **Team/Organization** | ✅ Real | Multi-user orgs with 4-level RBAC | | **Authentication** | ✅ Real | Supabase Auth (email, OAuth) | -| **Scheduled Scans** | ✅ Real | Cron-based automated Lighthouse scans every 6 hours | +| **Scheduled Scans** | ✅ Real | Cron-based Lighthouse scans (6h) + uptime checks (5min) | | **Website Crawler** | ✅ Real | Crawl and discover pages on your websites | ## 🛠 Tech Stack @@ -52,7 +55,8 @@ Full-stack website monitoring platform that uses **Google Lighthouse** to audit | Containers | Docker + Docker Compose | Free | | Linting | ESLint + Prettier | Free (OSS) | | Testing | Jest + Supertest + Testing Library | Free (OSS) | -| Pre-commit | Husky + lint-staged | Free (OSS) | +| Email | Resend | Free tier (3000/mo) | +| Pre-commit | Husky | Free (OSS) | ## 🚀 Quick Start @@ -141,13 +145,13 @@ website-monitoring/ ## 🧪 Testing ```bash -# Run all tests +# Run all tests (22 total) npm test -# Backend only (3 tests: health, API info, validation) +# Backend only (11 tests: health, routes, validation, CORS, 404) npm run test:backend -# Frontend only (component tests) +# Frontend only (11 tests: tier limits, chart components) npm run test:frontend ``` @@ -159,6 +163,28 @@ npm run test:frontend | `frontend.yml` | Push/PR to frontend | Lint → Test → Build (Node 18 & 20) | | `docker.yml` | Push/PR to main | Docker Compose build → Backend health check | +## 🔑 Key API Routes + +| Route | Method | Description | +|-------|--------|-------------| +| `/api/cron/uptime` | GET | Runs uptime checks on all active websites | +| `/api/cron/scan` | GET | Triggers Lighthouse scans for due websites | +| `/api/notifications/process` | POST | Processes pending alerts and sends notifications | +| `/api/admin/stats` | GET | System-wide stats (admin only) | +| `/api/admin/users` | GET/PATCH/DELETE | User management (admin only) | +| `/api/admin/organizations` | GET/PATCH | Organization management (admin only) | +| `/api/billing/usage` | GET | Current org usage vs tier limits | +| `/api/competitor-analysis` | GET/POST | Competitor benchmarking | + +## 🏗 Tier System + +| Tier | Websites | Scans/mo | Members | Price | +|------|----------|----------|---------|-------| +| Free | 3 | 50 | 2 | $0 | +| Starter | 10 | 500 | 5 | $9/mo | +| Professional | 50 | 5,000 | 25 | $29/mo | +| Enterprise | ∞ | ∞ | ∞ | $99/mo | + ## 🤝 Contributing See [CONTRIBUTING.md](./CONTRIBUTING.md) for branch strategy, code style, and PR process.