PeerPay Architecture Overview¶
Welcome to the documentation for the PeerPay Blockchain infrastructure. This ecosystem is a set of interconnected repositories that together form a secure, highly available, and scalable enterprise blockchain solution built on Hyperledger Fabric.
This site explains how the following repositories work together:
| Repository | Role |
|---|---|
peerpay-fabric |
Core Fabric network: orderer, peers, CAs, channels, chaincodes |
peerpay-saas-fabric-api |
Node.js REST API & integration backend |
peerpay-saas-blockchain-explorer |
Vue + TypeScript frontend (Explorer UI) |
peerpay-enterprise-orderer |
Secondary Raft orderer for high availability |
peerpay-enterprise-blockchain |
Remote enterprise peer onboarding package |
High-Level Topology¶
The diagram below illustrates how the components of the PeerPay network interact with each other.
Diagram Legend¶
The labels in the diagram above (U, FE, API, etc.) are short node IDs used by Mermaid so the arrows can reference each box. They map to real components as follows:
| ID | Stands for | Component |
|---|---|---|
U |
Users | Users / Operators interacting with the system |
FE |
Frontend | peerpay-saas-blockchain-explorer (Vue + TypeScript UI) |
API |
API / Backend | peerpay-saas-fabric-api (Node.js REST + Fabric client) |
DB |
Database | PostgreSQL |
KAFKA |
Event Bus | Kafka / MSK |
SMTP |
Mail Server | SMTP / Email |
FABRIC |
Ledger Network | peerpay-fabric (orderer + peers + CAs + channels) |
ENT |
Enterprise Peer | peerpay-enterprise-blockchain (remote enterprise peer) |
HA |
High Availability Orderer | peerpay-enterprise-orderer (secondary orderer) |
Repository Roles¶
peerpay-saas-blockchain-explorer (Blockchain Explorer Frontend)¶
- Frontend UI for blockchain monitoring and operator actions.
- Calls Fabric API endpoints for loans, transfers, channels, blocks, and transactions.
- Default local endpoint:
http://localhost:3000. - See: Blockchain Explorer.
peerpay-saas-fabric-api (Fabric SaaS API)¶
- Main integration hub and backend.
- Handles authentication, request validation, business logic, explorer APIs, and Fabric interactions.
- Connects to:
- Fabric network (chaincode invoke / query)
- PostgreSQL (app / user / explorer metadata)
- Kafka / MSK (event ingestion and publishing)
- SMTP (notifications)
- Default endpoints:
http://localhost:5000orhttp://localhost:8080depending on the Compose setup. - See: Fabric SaaS API.
peerpay-fabric (Main Blockchain Network)¶
- Core Hyperledger Fabric network stack.
- Provides orderer, peers, CAs, channels, and deployed chaincodes.
- Main channels:
bankloan-channelp2p-channel
- Chaincodes:
bankloanp2ptransfer
- See: Main Fabric Network.
peerpay-enterprise-blockchain (Remote Enterprise Peer)¶
- Package for deploying a remote enterprise peer.
- Receives crypto material generated by the master network and joins existing channels.
- Allows federated org/peer participation without exposing CA internals publicly.
- See: Remote Enterprise Node.
peerpay-enterprise-orderer (High Availability Secondary Orderer)¶
- Standalone setup for deploying secondary orderer nodes (e.g.
orderer2.example.com). - Provides fault tolerance for the Raft consensus mechanism so the network has no single ordering point of failure.
- See: High Availability Orderer.
Communication Paths¶
-
Explorer → Fabric API
- Protocol: HTTP/HTTPS REST
- Purpose: UI actions and data retrieval
-
Fabric API → Fabric Network
- Protocol: Fabric SDK (gRPC + TLS)
- Purpose: submit / evaluate transactions and query ledger data
-
Fabric API → PostgreSQL
- Protocol: SQL / TCP
- Purpose: authentication and application state persistence
-
Fabric API → Kafka / MSK and SMTP
- Protocol: SASL/TLS (Kafka), SMTP
- Purpose: ingest async events and send notifications
-
Enterprise Peer → Master Fabric
- Protocol: Fabric peer / orderer communication (gRPC + TLS)
- Purpose: channel join, block replication, endorsement, gossip
-
Secondary Orderer → Master Fabric
- Protocol: Raft consensus over gRPC + mTLS
- Purpose: replicate the ordering state and provide fault-tolerant block production
End-to-End Runtime Flow¶
- A user triggers an action in
peerpay-saas-blockchain-explorer. - The frontend calls
peerpay-saas-fabric-api(/api/...) with a JWT where required. - The API authenticates the request and routes it to the matching controller / service.
- The service invokes or queries chaincode on
bankloan-channelorp2p-channel. - Fabric peers endorse the transaction; the orderer cluster (primary + secondary) sequences it into a block.
- The block propagates to all participating peers, including any remote enterprise peers joined to the channel.
- The API returns a response to the frontend and may persist side metadata in PostgreSQL.
Enterprise Peer Onboarding Flow¶
- The master node (
peerpay-fabric) generates a remote-peer crypto bundle. - The bundle is transferred securely to the enterprise host.
peerpay-enterprise-blockchainextracts the crypto and applies environment configuration.- The remote peer starts and joins channels via the master orderer.
- The remote peer participates in ledger sync and transaction endorsement (subject to channel policy).
For step-by-step instructions, see Remote Enterprise Node.
Architectural Note¶
In this architecture, peerpay-saas-fabric-api is the control and integration plane, while peerpay-fabric is the ledger plane. The explorer is the user-facing view, and the enterprise blockchain package extends network participation across external nodes. The secondary orderer keeps the ordering service highly available even if the primary node is offline.