mirror of
https://github.com/andrey271192/Domain_web.git
synced 2026-09-20 14:41:58 +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:
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
|
||||
Reference in New Issue
Block a user