Commit Graph

5 Commits

Author SHA1 Message Date
Dennis 4607af8def feat: local dev setup with SSR fix and one-command dev script
- Add Next.js instrumentation.ts to polyfill Node.js v25+ broken localStorage
- Add dev-setup.sh for one-command local development setup
- Disable Supabase analytics in config.toml (avoids slow logflare image pull)
- Switch backend dev script to tsx watch for better DX

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-06 22:31:11 +01:00
Dennis 1c545c93b4 feat: production hardening + smart subpage scanning with layout dedup
Security:
- Add CRON_SECRET auth to /api/cron/* endpoints
- Add admin role verification to /api/admin/* routes
- Add org membership check to /api/billing/usage
- Add security headers (HSTS, X-Frame-Options, CSP, etc.)
- Add env variable validation at startup
- Add rate limiting to backend API (30 req/min per IP)

Infrastructure:
- Multi-stage Dockerfiles with non-root user + healthchecks
- Updated cron workflow to pass CRON_SECRET header
- Updated .env.example with all optional vars

Smart subpage scanning:
- Crawler now computes template_hash (DOM structure without content)
- Scanner scans ALL unique-layout pages, not just main page
- Pages with same layout (e.g. product pages) scanned only once
- Deduplication by template_hash, fallback to content_hash
- Main page always scanned with high priority
- Re-checks subscription limits before each page scan

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-06 07:44:32 +01:00
Dennis d8de0a973a docs: update README with all implemented features, API routes, and tier system
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-06 00:52:48 +01:00
Dennis 0d2aef07bc feat: implement real uptime monitoring, alerts, admin dashboard, billing & usage tracking
- Uptime service: real HTTP HEAD checks with response time tracking
- Alert engine: evaluates scan results, auto-resolves recovered alerts
- Notifications: Resend email + webhook delivery
- Admin dashboard: system stats, user CRUD, org management (role-protected)
- Billing: tier limits (free/starter/pro/enterprise), usage tracking API
- Competitor analysis: real Lighthouse comparison + response time
- Tests: 11 backend + 11 frontend = 22 total tests passing
- Database: added competitor_metrics, alert_configurations tables

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-06 00:51:54 +01:00
Dennis 14a32bdc0d feat: initialize monorepo with full dev team best practices
- Unified monorepo with backend (Express), frontend (Next.js), and devops
- Backend: ESLint, Prettier, Jest tests (3 passing), health endpoint, .env.example
- Frontend: Fixed build errors, fixed all lint errors (0 remaining), tests passing
- DevOps: Docker Compose with PostgreSQL, backend, frontend + healthchecks
- CI/CD: 3 GitHub Actions workflows (backend, frontend, docker integration)
- DX: Husky pre-commit hooks with smart change detection
- Docs: Root README with architecture, CONTRIBUTING.md, PR template

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-06 00:05:50 +01:00