feat: lightweight static PCA Lab site with domain groups

Replace Next.js scanner deploy with static React CDN pages: student
VPN cabinet, regional setup, curated blocked-domain lists, and nginx
one-line install on port 80 without touching Amnezia/Docker services.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Андрей Бобырев
2026-05-28 03:34:31 +03:00
parent caa3391952
commit 311e501561
96 changed files with 1951 additions and 14542 deletions

121
README.md
View File

@@ -1,107 +1,66 @@
# Domain Scanner
# Domain Web (PCA Lab)
Modern domain intelligence and infrastructure analysis platform with premium UX, real-time monitoring, and scalable self-hosted architecture.
Лёгкий статический сайт: кабинет студента (VPN Amnezia), смена региона магазинов, кураторские списки заблокированных в РФ доменов.
![Domain Scanner](https://img.shields.io/badge/Next.js-15-black?style=flat-square)
![TypeScript](https://img.shields.io/badge/TypeScript-5-blue?style=flat-square)
![Docker](https://img.shields.io/badge/Docker-ready-2496ED?style=flat-square)
**Без поиска доменов** на сайте (crt.sh и API сканера отключены). Списки — статические пресеты.
## Features
## Возможности
- **DNS** — A, AAAA, CNAME, MX, TXT, NS resolution
- **WHOIS** — Registrar and domain metadata
- **SSL** — Certificate validity, issuer, expiry
- **HTTP** — Status, redirects, response headers
- **Geo/IP** — Location via ip-api.com (or IPinfo with token)
- **Security** — Header scoring and grade
- **Tech/CDN** — Server, Cloudflare, Vercel signals
- **Export** — JSON and CSV downloads
- **Live progress** — Server-Sent Events during scans
- **Monitoring** — DNS change + SSL expiry checks via background worker
- **Analytics** — 7-day charts from scan history (Recharts)
- **Auth** — Register / sign-in (NextAuth credentials)
- **Главная** — обложка PCA Lab (исследования AI и кибербезопасности)
- **Кабинет студента** — пошаговое подключение WireGuard / Amnezia VPN
- **VPN по региону** — инструкции смены региона App Store / Google Play / Microsoft Store
- **Группы доменов** — карточки по категориям:
- Медиа (Netflix, YouTube, …)
- Социальные сети (Instagram, Facebook, X, …)
- Искусственный интеллект (ChatGPT, Claude, …)
- Мессенджеры (Telegram, WhatsApp, …)
- Другое / VPN / Dev (GitHub, Steam, …)
- Копирование списка доменов / IP, скачивание **Keenetic .bat** (статические маршруты)
## Roadmap status
Связанный Telegram-бот (поиск доменов): [domain-finder-bot](https://github.com/andrey271192/domain-finder-bot) — на сайте только статика.
| Area | Status |
|------|--------|
| Premium UI (glass, motion, dark/light) | Done |
| Scan API + SSE progress + CDN/WAF heuristics | Done |
| Analytics from DB | Done |
| Monitor worker (DNS/SSL MVP) | Done |
| Auth register + optional admin seed | Done |
| Email/Slack alert delivery | Planned |
| GraphQL public API | Planned |
| Paid tiers / billing | Planned |
## Quick start (Docker)
```bash
git clone https://github.com/andrey271192/Domain_web.git
cd Domain_web
cp .env.example .env
docker compose up -d
docker compose exec web npx prisma db push
open http://localhost:3000
```
## One-line VPS install
## Установка на VPS (одна строка)
```bash
curl -fsSL https://raw.githubusercontent.com/andrey271192/Domain_web/main/install.sh | sudo bash
```
On small VPS disks (&lt;4GB free), the install script uses a **lite path**: Postgres/Redis in Docker, Next.js built on the host. For full container deploy on larger machines: `docker compose up -d && docker compose exec web npx prisma db push`.
Переменные окружения (опционально):
If `npm ci` / `npm run build` OOM on a ~1GB RAM VPS, build on your Mac (`npm run build`), then rsync `.next/` and `.next/standalone/` to the server and run `node .next/standalone/server.js` (systemd unit in production). Always run `npx prisma db push` on the VPS after schema changes.
| Переменная | По умолчанию |
|------------|----------------|
| `DOMAIN_WEB_ROOT` | `/var/www/domain-web` |
| `DOMAIN_WEB_INSTALL_SRC` | `/opt/domain-web-src` |
| `DOMAIN_WEB_BRANCH` | `main` |
Legacy GeoExport mirror in `site/` is **not** deployed (see `site/ARCHIVED.md`).
Скрипт:
## Uninstall
- ставит **nginx** и отдаёт каталог `web/` на **порту 80**;
- **не останавливает** Amnezia (443), Docker и `domain-finder-bot`;
- отключает legacy-сервис `domain-scanner` (Node), если был установлен ранее.
## Удаление
```bash
curl -fsSL https://raw.githubusercontent.com/andrey271192/Domain_web/main/uninstall.sh | sudo bash
```
## Development
## Локальный просмотр
```bash
npm install
cp .env.example .env
# Start Postgres + Redis (docker compose up postgres redis -d)
npm run db:push
npm run dev
cd web && python3 -m http.server 8080
# http://127.0.0.1:8080/
```
## Environment
## Структура
| Variable | Description |
|----------|-------------|
| `DATABASE_URL` | PostgreSQL connection string |
| `REDIS_URL` | Redis for scan cache |
| `NEXTAUTH_SECRET` | Auth signing secret |
| `NEXTAUTH_URL` | Public app URL |
| `IPINFO_TOKEN` | Optional IPinfo token |
| `SCAN_RATE_LIMIT_PER_HOUR` | Per-IP scan limit (default 30) |
| `MONITOR_INTERVAL_MS` | Monitor worker interval (default 300000) |
| `SEED_ADMIN_EMAIL` | Optional admin email on install |
| `SEED_ADMIN_PASSWORD` | Optional admin password on install |
```
web/ — HTML + React (CDN) + JSX
nginx/ — шаблон vhost
install.sh — деплой на сервер
uninstall.sh
```
## API
## Лицензия
See [docs/API.md](docs/API.md) and the in-app `/api-docs` page.
## Docs
- [Architecture](docs/ARCHITECTURE.md)
- [API](docs/API.md)
- [Deployment](docs/DEPLOYMENT.md)
- [Marketing](docs/MARKETING.md)
## License
MIT — see [LICENSE](LICENSE)
## Topics
`domain-scanner` `dns` `whois` `ssl` `networking` `cybersecurity` `nextjs` `typescript` `self-hosted` `monitoring` `analytics` `infrastructure` `devtools` `open-source` `docker` `postgresql` `redis` `webapp` `dashboard` `security`
См. [LICENSE](LICENSE).