Thank you for your interest. WatchTower AI was built for the UC Berkeley AI Hackathon 2026 and is maintained as an open-source project. Bug fixes, documentation improvements, and small, focused enhancements are welcome.
Before you contribute:
- Read CODE_OF_CONDUCT.md.
- Read SECURITY.md — never file public issues with exploit details or real API keys.
- Skim the README for architecture, quick start, and environment variables.
| Audience | Also read |
|---|---|
| Human contributors | This file + README |
| AI coding agents (Cursor, Claude Code, etc.) | frontend/AGENTS.md — Next.js 16 conventions |
Maintainers use pull requests to main; direct pushes to main are
discouraged even when permissions allow.
| Component | Requirement |
|---|---|
| Frontend | Node.js 20+, npm 9+ (package-lock.json in frontend/) |
| Backend | Python 3.11+, venv recommended |
| Optional | Provider API keys (Anthropic, OpenAI, Gemini) for live probing |
| Optional | Playwright Chromium (playwright install chromium) for Gemini official-status browser adapter |
git clone https://github.com/kaiiiichen/WatchTower-AI.git
cd WatchTower-AIcd backend
python3 -m venv .venv
.venv/bin/pip install -r requirements.txt
.venv/bin/playwright install chromium # only if using Gemini status browser
cp .env.example .env
# Edit .env — add keys you have; missing keys -> provider reported as "unknown"
.venv/bin/uvicorn app.main:app --reload --port 8000cd frontend
npm install
echo 'BACKEND_URL=http://localhost:8000' > .env.local
npm run devOpen http://localhost:3000. Without BACKEND_URL, the
dashboard serves mock data for UI-only work.
Never commit .env, .env.local, API keys, or backend/data/watchtower.db.
Run the same checks you would expect in CI:
Frontend (frontend/):
npm run lint
npm run buildBackend (backend/):
PYTHONPATH=. .venv/bin/python tests/test_discovery.py
# Full suite (requires pytest: pip install pytest)
PYTHONPATH=. .venv/bin/python -m pytest tests/ -qBoth services connected (manual smoke test):
curl http://localhost:8000/health | jq .
curl http://localhost:3000/api/health | jq .-
Branch from up-to-date
main:git checkout main && git pull --ff-only git checkout -b <type>/<short-description>
Prefix examples:
fix/,feat/,chore/,docs/,refactor/. -
Commit with clear messages (conventional style is appreciated:
type: summary). -
Push and open a PR against
main. GitHub will suggest the pull request template. -
Describe what changed and why. Link issues with
Fixes #123when applicable. -
Update README.md and/or
backend/.env.example/frontend/.env.localdocumentation if you change user-visible behavior, API routes, or required/optional environment variables.
backend/— FastAPI probe engine, SQLite history, VU dataset backtest, community signals, Sentry integration.frontend/— Next.js 16 dashboard;/api/*routes proxy the backend.- Shared contract —
frontend/src/lib/types.tsmirrorsbackend/app/models.pyJSON shapes. Keep them aligned when changing API responses.
- Frontend: Next.js 16 (App Router), React 19, TypeScript, Tailwind CSS 4.
- Backend: FastAPI, asyncio, httpx, stdlib
sqlite3. - Tests: Backend unit tests in
backend/tests/; frontend semantic-color lint vianpm run lint:colors.
- Match existing naming, component patterns, and Tailwind usage in each package.
- Prefer small, reviewable diffs over large refactors unless discussed in an issue first.
- Dark mode: new UI should work in light and dark (see
theme-provider.tsxandsemantic-colors.ts).
- Add variable names (and short comments) to
backend/.env.examplewhen introducing new backend configuration — never real secrets. - Document frontend env vars in frontend/README.md and the root README when they change.
When touching backend/app/probes.py or diagnostics:
- Distinguish service faults (
down,degraded) from account/config faults (rate_limited,misconfigured). - Missing API keys must remain
unknown, never crash the probe loop. - Do not claim measured lead-time over official status pages without historical probe data — see README "Detection gap" section.
Open a GitHub Issue for bugs and feature requests. For security issues, follow SECURITY.md instead of posting exploit details in public issues.
For small questions, open a GitHub Issue. This is a hackathon-born side project; response time may vary.