mirror of
https://github.com/andrey271192/Domain_web.git
synced 2026-09-21 14:51:57 +00:00
feat: rebrand to Domain Scanner platform
Replace GeoExport static site with Next.js domain intelligence app: real DNS/WHOIS/SSL/HTTP/geo scans, SSE progress, Docker stack, updated install/uninstall scripts, and full documentation. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
51
docs/API.md
Normal file
51
docs/API.md
Normal file
@@ -0,0 +1,51 @@
|
||||
# API Reference
|
||||
|
||||
Base URL: your deployment origin (e.g. `http://SERVER_IP`)
|
||||
|
||||
## POST /api/scan
|
||||
|
||||
Start a domain scan.
|
||||
|
||||
**Body**
|
||||
|
||||
```json
|
||||
{ "domain": "example.com" }
|
||||
```
|
||||
|
||||
**Response**
|
||||
|
||||
```json
|
||||
{ "id": "clx...", "domain": "example.com" }
|
||||
```
|
||||
|
||||
## GET /api/scan/:id
|
||||
|
||||
Poll scan status and full result.
|
||||
|
||||
## GET /api/scan/:id/stream
|
||||
|
||||
Server-Sent Events. Each event:
|
||||
|
||||
```json
|
||||
{ "id": "...", "status": "RUNNING", "progress": 45, "domain": "example.com" }
|
||||
```
|
||||
|
||||
## GET /api/export?id=:scanId&format=json|csv
|
||||
|
||||
Download completed scan.
|
||||
|
||||
## GET /api/scan
|
||||
|
||||
List recent scans (public metadata).
|
||||
|
||||
## POST /api/monitors
|
||||
|
||||
Requires session. Body: `{ "domain": "example.com", "type": "DNS" }`
|
||||
|
||||
## GET /api/health
|
||||
|
||||
Database connectivity check.
|
||||
|
||||
## Rate limits
|
||||
|
||||
Default 30 scans/hour per IP (`SCAN_RATE_LIMIT_PER_HOUR`).
|
||||
44
docs/ARCHITECTURE.md
Normal file
44
docs/ARCHITECTURE.md
Normal file
@@ -0,0 +1,44 @@
|
||||
# Architecture
|
||||
|
||||
## Overview
|
||||
|
||||
Domain Scanner is a Next.js 15 application with PostgreSQL (Prisma) and optional Redis caching. Scans run in-process on the web server using Node.js built-ins and public APIs.
|
||||
|
||||
## Components
|
||||
|
||||
```
|
||||
┌─────────────┐ ┌──────────────┐ ┌─────────────┐
|
||||
│ Browser │────▶│ Next.js App │────▶│ PostgreSQL │
|
||||
│ (SSE/REST) │ │ scan worker │ │ scans │
|
||||
└─────────────┘ └──────┬───────┘ └─────────────┘
|
||||
│
|
||||
┌──────▼───────┐
|
||||
│ Redis │
|
||||
│ scan cache │
|
||||
└──────────────┘
|
||||
```
|
||||
|
||||
## Scan pipeline
|
||||
|
||||
1. `POST /api/scan` validates domain, checks rate limit, creates `Scan` row
|
||||
2. Async `runDomainScan()` updates progress in DB
|
||||
3. Client subscribes to `GET /api/scan/:id/stream` (SSE)
|
||||
4. Completed results cached in Redis (1h) and stored as JSON in Postgres
|
||||
|
||||
## Data model
|
||||
|
||||
- **User** — credentials auth (NextAuth)
|
||||
- **Scan** — domain, status, progress, result JSON
|
||||
- **Monitor** — per-user DNS/SSL/uptime watch (cron stub)
|
||||
- **ApiRateLimit** — hourly per-IP counters
|
||||
|
||||
## Competitive positioning
|
||||
|
||||
Tools like DNSChecker and SecurityTrails focus on single-record lookups or enterprise datasets. Domain Scanner targets unified infrastructure snapshots with export and self-hosting — not a clone of their UI patterns.
|
||||
|
||||
## Roadmap
|
||||
|
||||
- BullMQ worker container for monitors
|
||||
- GraphQL server (schema placeholder in `src/lib/graphql/schema.ts`)
|
||||
- Blacklist checks (Spamhaus, etc.)
|
||||
- DNS diff history
|
||||
43
docs/DEPLOYMENT.md
Normal file
43
docs/DEPLOYMENT.md
Normal file
@@ -0,0 +1,43 @@
|
||||
# Deployment
|
||||
|
||||
## Docker (recommended)
|
||||
|
||||
```bash
|
||||
docker compose up -d --build
|
||||
docker compose exec web npx prisma db push
|
||||
```
|
||||
|
||||
## VPS one-liner
|
||||
|
||||
```bash
|
||||
curl -fsSL https://raw.githubusercontent.com/andrey271192/Domain_web/main/install.sh | sudo bash
|
||||
```
|
||||
|
||||
Install path: `/opt/domain_web`
|
||||
Service: Docker Compose (`web`, `postgres`, `redis`)
|
||||
Nginx site: `domain-scanner` on port 80 → app `:3000`
|
||||
|
||||
## Environment on server
|
||||
|
||||
Edit `/opt/domain_web/.env`:
|
||||
|
||||
- `NEXTAUTH_SECRET` — auto-generated on first install
|
||||
- `NEXTAUTH_URL` / `NEXT_PUBLIC_APP_URL` — public IP or domain
|
||||
|
||||
## Manual Node deploy
|
||||
|
||||
```bash
|
||||
npm ci && npm run build
|
||||
DATABASE_URL=... npx prisma db push
|
||||
PORT=3000 npm start
|
||||
```
|
||||
|
||||
## SSL / HTTPS
|
||||
|
||||
Place certbot in front of nginx or terminate TLS at a reverse proxy.
|
||||
|
||||
## Upgrades
|
||||
|
||||
```bash
|
||||
cd /opt/domain_web && git pull && docker compose up -d --build
|
||||
```
|
||||
32
docs/MARKETING.md
Normal file
32
docs/MARKETING.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# Marketing
|
||||
|
||||
## GitHub About
|
||||
|
||||
Modern domain intelligence and infrastructure analysis platform with premium UX, real-time monitoring, and scalable self-hosted architecture.
|
||||
|
||||
## Tagline
|
||||
|
||||
See every layer of your domain.
|
||||
|
||||
## Product Hunt (draft)
|
||||
|
||||
**Title:** Domain Scanner — self-hosted domain intelligence
|
||||
**Subtitle:** DNS, WHOIS, SSL, security headers, and exports in one premium dashboard.
|
||||
|
||||
**First comment outline:** Built for SREs and indie hackers who want SecurityTrails-grade signals without SaaS lock-in. Docker + Postgres + real scans via Node.
|
||||
|
||||
## Twitter / X
|
||||
|
||||
Shipped Domain Scanner — open-source domain intel with cinematic UI, live SSE scans, JSON/CSV export. Self-host on your VPS in one command.
|
||||
|
||||
## Dev.to outline
|
||||
|
||||
1. Why unified domain scans beat tab-hopping
|
||||
2. Architecture: Next.js + Prisma + Redis
|
||||
3. Implementing SSL checks with Node tls
|
||||
4. SSE for scan progress
|
||||
5. One-line VPS deploy
|
||||
|
||||
## SEO keywords
|
||||
|
||||
domain scanner, dns lookup tool, ssl checker, whois api, self-hosted security tools
|
||||
Reference in New Issue
Block a user