Skip to main content

Architecture Overview

ReactPress uses a Monorepo + multi-process model: content management, visitor presentation, and API are decoupled; Toolkit unifies types and API contracts.

Full details: repo ARCHITECTURE.md.

Architecture diagram

Package responsibility matrix

PackagenpmResponsibilityRenderingSEO
server@fecommunity/reactpress-server¹Business logic, persistence, auth
web@fecommunity/reactpress-webAdmin UIVite CSRNo
themes/per-theme packagesVisitor siteNext SSR/ISRYes
toolkit@fecommunity/reactpress-toolkitAPI client, types
plugins/per-plugin packagesHook logic + Admin slotsMixedPlugin-related
desktopElectron shell + local APIloads web/distNo
cli@fecommunity/reactpressinit / doctor / orchestration

¹ Standalone npm package deprecated; end users use CLI bundled API.

Design principle priority

Maintainability → Extensibility → Tech fit → Low cost

DecisionChoiceReason
API accessToolkit onlySingle client, OpenAPI codegen
AdminVite SPAInteraction-heavy, no SSR needed
Visitor siteNext.jsSSR/ISR, SEO
ExtensionsHook + manifestWordPress-style, no core edits
List stateURL searchParamsShareable, refreshable

Data flow rules

  1. Admin / Theme / Plugin UI → Toolkit HTTP → Server
  2. Server fires Hooks → Plugin server modules
  3. Server must not depend on any frontend package
  4. Theme must not connect to database directly

Runtime ports

ProcessDefault port
Admin3000
Theme3001
API3002
Theme preview3003

Extension points

ExtensionRegistryDocs
Themetheme.json / npm catalogTheme development
Pluginplugin.jsonPlugin development
HeadlessREST + API KeyHeadless API