Revornix Architecture Overview
Last verified against the repository: 2026-04-06
This page is based on the current monorepo layout, docker-compose-local.yaml, and the runtime entrypoints that are actually used today.
1. Top-level repository layout
Revornix/
├── gateway/ # Unified public-entry gateway service
├── web/ # Main product frontend (Next.js App Router)
├── api/ # Main FastAPI service
├── celery-worker/ # Background workflows and heavy async jobs
├── hot-news/ # Trending aggregation microservice
├── docs/ # This Nextra documentation site
├── assets/ # Shared static assets used by repository docs/branding
├── volumes/ # Local persisted data for docker-compose-local
└── docker-compose-local.yaml2. Runtime services and responsibilities
web
- Next.js 16 frontend for the real product UI.
- Owns authentication pages, dashboard, documents, sections, Revornix AI, settings, billing entrypoints, and notification UI.
- Reads
web/.envand exposes selected values throughnext.config.ts.
gateway
- Unified public-entry gateway service implemented in Go under
gateway/cmd/gatewayandgateway/internal/*. - Routes public traffic to
web, the domestic mainapi, the overseas authapi, andhot-news. - Supports HTTP proxying, WebSocket tunneling, upstream pools, cooldown after failures, and health endpoints.
api
- FastAPI application with entrypoint at
api/main.py. - Owns user/auth flows, documents, sections, graph APIs, AI routing, MCP server routes, notifications, payment-facing integration, and public/share endpoints.
- Acts as the main synchronous orchestration layer for the product.
- In split deployments, a separate overseas API slice can be used specifically for Google / GitHub login while the gateway routes only those paths abroad.
celery-worker
- Handles long-running or expensive background jobs.
- Owns workflows such as document conversion, embedding, summarization, graph building, section rendering, podcast generation, and notification delivery.
- Runs from
celery-worker/common/celery/app.py.
hot-news
- Separate Node/Hono service for trending-topic aggregation.
- Frontend consumes it through
NEXT_PUBLIC_HOT_NEWS_API_PREFIX. - The code is kept in-repo under
hot-news/, but it is still deployed and started as an independent service.
docs
- Independent Nextra documentation app.
- It is not part of the end-user product runtime path.
- Its job is to describe the repo, features, deployment, and developer guidance.
3. Data stores and shared infrastructure
- PostgreSQL: primary relational business data.
- Redis: cache plus Celery broker/backend.
- Milvus: vector storage and retrieval.
- Neo4j: graph storage and graph queries.
file-backend(MinIO): default built-in file system for uploaded/generated assets.- Milvus also has its own internal
minio+etcdcontainers in local bootstrap.
In local development, these infrastructure services are started through docker-compose-local.yaml. The application services themselves are still started manually.
4. Core request and processing flow
User-facing request path
- The browser talks to
gateway. gatewayforwards page traffic toweb.webcalls the publicapientrypoint.gatewayroutes the API request to the domestic or overseas API by path.apireads or writes PostgreSQL / Redis / Milvus / Neo4j and returns the immediate response.
Async content workflow path
- A user action in
webtriggers an API mutation. apirecords state and enqueues work for Celery.celery-workerperforms parsing, chunking, embedding, graph generation, illustration or podcast workflows, and writes results back.webpolls or refetches API state and presents the updated result.
Hot-news path
webcalls thehot-newsservice directly through the configured public prefix.hot-newsaggregates upstream ranking data and returns a normalized list.
5. Current local deployment model
The current repo does not use a single full-stack Docker Compose path for all app services.
What exists today:
- Local infrastructure bootstrap:
docker-compose-local.yaml - Manual startup for:
apicelery-workerwebhot-newsdocswhen you want to run the docs site locally
That means the most common local loop is:
- Start Postgres / Redis / Neo4j / Milvus / MinIO with
docker-compose-local.yaml - Initialize baseline data from
api - Start
api,celery-worker,hot-news, andweb
6. Important implementation boundaries
AI and official hosted resources
- The official hosted model and engine seed logic lives in
api/data/sql/create.py. - The API controls access checks and usage recording.
- The worker performs many of the actual downstream heavy jobs.
MCP support
- Revornix acts as both MCP client and MCP server.
- Server-side MCP routes live under
api/mcp_router/*. - Product-facing MCP management UI lives in
web/src/app/(private)/setting/mcp.
File systems
- The built-in file backend is MinIO/S3-compatible.
- The codebase also supports Aliyun OSS, AWS S3, and generic S3 adapters.
- File-system abstractions exist in both
api/file/*andcelery-worker/file/*.
7. What changed from older documentation
Compared with earlier docs versions, the current repo no longer matches an “all services in one application compose file” mental model.
The practical baseline now is:
- infra with
docker-compose-local.yaml - application services started manually
docs/as a separate Nextra apphot-news/as a separate Node service inside the same monorepo
Last updated on