Bundle geoexport-premium (Docker, docs, Next.js) alongside the working static site mirror; production VPS install still uses site/. Co-authored-by: Cursor <cursoragent@cursor.com>
8.2 KiB
GeoExport
Self-hosted platform to browse, export, and generate routing rules from geoip and geosite databases — built for VPN stacks: Xray, 3x-ui, V2Ray, Mihomo, Sing-box.
GeoExport is an open-source, API-first alternative to hosted geo list tools: fast UI, privacy-friendly defaults, and a deployment model you control.
Status: This repository is the premium Next.js rewrite (
geoexport-premium). The UI scaffold is active; PostgreSQL, Prisma, Redis, and full API routes are on the roadmap. For a working static mirror today, see andrey271192/Domain_web.
Table of contents
- Why GeoExport
- Features
- Architecture
- Screenshots
- Quick start
- Configuration
- Docker
- API
- Deployment
- Security
- Performance
- Roadmap
- Contributing
- License
Why GeoExport
| Hosted geo tools | GeoExport | |
|---|---|---|
| Data location | Third-party SaaS | Your VPS / private cloud |
| API access | Opaque or limited | REST-first, documented |
| UI | Functional | Linear-grade layout, dark/light |
| Stack | Unknown | Next.js, TypeScript, Prisma, Redis |
| Scale | Shared tenancy | Horizontal app + cache layer |
GeoExport does not replace community rule repos (Loyalsoldier, RuNet Freedom, v2fly, etc.) — it indexes them, maps services to categories, and gives you export and routing helpers in one place.
Features
Presets & sources
- 9 preset groups, 59 curated services (messengers, video, social, AI, games, work, CDN, RU-blocked lists, …)
- 4 rule sources: RuNet Freedom, Loyalsoldier, DanielLavrushin (b4geoip), v2fly — with per-source
geoip.dat/geosite.datlinks
Discovery & export
- Full-text search across geoip/geosite categories
- DNS lookup: resolve domains to IPs/subdomains and cross-check against loaded databases
- One-click export to
.txtfor client import - Routing generator with saved routing presets (Xray / Mihomo / Sing-box oriented)
Platform
- Dark / light theme
- REST API for automation (GraphQL optional on roadmap)
- Self-hosted via Docker or bare Node
- Edge-ready Next.js deployment (Vercel, Cloudflare, or nginx reverse proxy)
Architecture
High-level layout:
┌─────────────┐ ┌──────────────┐ ┌─────────────────┐
│ Browser │────▶│ Next.js │────▶│ PostgreSQL │
│ (React) │ │ App Router │ │ (Prisma) │
└─────────────┘ │ + API routes│ └─────────────────┘
│ │────▶┌─────────────────┐
│ │ │ Redis (cache) │
└──────┬───────┘ └─────────────────┘
│
▼
┌──────────────┐
│ Geo workers │──▶ upstream .dat / GitHub releases
└──────────────┘
Details: docs/ARCHITECTURE.md
Stack
| Layer | Technology |
|---|---|
| Frontend | Next.js 16, React 19, TypeScript, Tailwind CSS 4, Framer Motion, shadcn/ui |
| API | Next.js Route Handlers (REST); GraphQL optional later |
| Data | PostgreSQL + Prisma |
| Cache | Redis |
| Ops | Docker, docker-compose, nginx (production) |
Screenshots
| Presets browser | DNS lookup | Routing generator |
|---|---|---|
Coming soon — add docs/images/presets.png |
Coming soon | Coming soon |
Place assets under docs/images/ and reference them here before release.
Quick start
Requirements
- Node.js 20+ (22 LTS recommended)
- npm, pnpm, or bun
Local development
git clone https://github.com/andrey271192/geoexport.git
cd geoexport # or geoexport-premium while the repo is being renamed
cp .env.example .env
npm install
npm run dev
Open http://localhost:3000.
Production build
npm run build
npm run start
Lint
npm run lint
Configuration
Copy .env.example to .env and adjust:
| Variable | Description |
|---|---|
DATABASE_URL |
PostgreSQL connection string (Prisma) |
REDIS_URL |
Redis for API/cache layers |
NEXT_PUBLIC_APP_URL |
Public URL (CORS, auth callbacks) |
GEOEXPORT_UPSTREAM |
Upstream host for mirror/proxy mode during migration |
Full reference: .env.example
Docker
Run the full stack (app + PostgreSQL + Redis):
cp .env.example .env
docker compose up -d --build
| Service | Port (host) | Notes |
|---|---|---|
web |
3000 | Next.js (npm run start in container) |
postgres |
5432 | Persistent volume postgres_data |
redis |
6379 | Cache / rate limit |
Health check: curl -f http://localhost:3000
Prisma migrations and geo data seeding are not wired in Docker yet — track progress in Roadmap.
API
Base path: /api
| Method | Path | Description |
|---|---|---|
GET |
/api/presets |
Service preset groups |
GET |
/api/sources |
Rule source metadata |
GET |
/api/last-update |
Last database refresh timestamp |
GET |
/api/routing/presets |
Saved routing templates |
POST |
/api/routing/generate |
Generate routing config |
GET |
/api/search?q= |
Search categories |
GET |
/api/export?... |
Export list as plain text |
GET |
/api/lookup?domain= |
DNS + geodb cross-check |
GET |
/api/update/status |
Background update job status |
Contract details: docs/API.md
Deployment
- Docker Compose — single VPS, see docs/DEPLOYMENT.md
- Vercel / edge — frontend + serverless API routes (Redis/Postgres via managed providers)
- nginx — terminate TLS, proxy to
127.0.0.1:3000(pattern used in Domain_web)
Security
- Run behind HTTPS in production
- Do not commit
.envor API keys - Rate-limit public
/api/*when exposed to the internet - Report issues: docs/SECURITY.md
Performance
- Static preset JSON can be CDN-cached (
Cache-Controlon read-only catalog endpoints) - Redis backs hot search/export paths
- Next.js App Router + edge caching for public pages
- Geo
.datparsing runs in workers — not on the request thread
Roadmap
- Port Domain_web UI into Next.js App Router
- Prisma schema + PostgreSQL seed from geoexport.org catalogs
- Self-contained geo workers (no upstream proxy)
- API keys + rate limiting
- GraphQL read API (optional)
- Helm chart / Terraform module
Contributing
See docs/CONTRIBUTING.md. Marketing copy and launch templates: docs/MARKETING.md.
Related projects
| Repo | Role |
|---|---|
| andrey271192/Domain_web | Production VPS mirror (nginx + Node static server) |
| geoexport-clone | Local dev mirror of geoexport.org UI |
License
MIT — Copyright (c) 2026 GeoExport Contributors