Page Navigation

epress world protocol

Open

Collapsed while browsing epress node docs.

epress node Architecture

epress node composes command entrypoints, a Fastify-based server, GraphQL and REST transport, and persistence models.

Request Lifecycle

Every request flows through a consistent pipeline from HTTP to response.

Request LifecycleHTTP RequestRoutesAuth LayerBusiness LogicModelsDatabaseResponse PrepSerializationHTTP ResponseAuth Layer: JWT verification, SIWE session, request.cani() permission checksBusiness Logic: GraphQL resolvers, REST handlers, EWP protocol operationsModels: Sequelize/Objection ORM, database queries, data validation

Request Path (Yellow)

Incoming requests are routed, authenticated, processed by business logic, and persisted via models.

Response Path (Blue)

Data flows back through serialization and response preparation before returning to the client.

Runtime Boundaries

  • JWT and request context are attached in server preHandler hooks.
  • GraphQL routes are mounted under /api/graphql via GraphQL plugin prefix /api.
  • EWP endpoints are mounted under /ewp and perform their own installation and trust checks.
  • App operational endpoints are mounted under /api and support installation and node operation workflows.

Key Directories

DirectoryPurpose
/commandsCLI entrypoints (start, migrate, sync)
/serverFastify server, routes, GraphQL, models
/clientNext.js frontend application
/dataRuntime data (database, uploads, logs)
/testTest files and fixtures