Skip to content
@e-GNH

e-GNH

Egypt CBDC Intermediary System


Welcome

We are CMP 26 graduation group that made the first CBDC system prototype in egypt, second in africa completely from scratch


Table of Contents

  1. System Architecture
  2. Core Services & Features
  3. Security & Cryptography
  4. Project Structure
  5. Prerequisites
  6. Quick Start & Deployment
  7. API & Communication protocols
  8. Testing
  9. Contributors

System Architecture

Component Diagram


Core Services & Features

1. Identity & Onboarding (KYC)

2. Anti Money Laundering (AML)

3. Online Payments

3. Offline Payments

3. Merchant Payment Gateaway

3. Point-of-Sale


Security & Cryptography

TLS

mTLS & Secure Channel

Hardware-Backed Keys

Rotational Keys

Rachet Chain-of-Trust

Digital Signatures


Project Structure

├── proto/                  # Protobuf definitions
├── proto_gen/              # Generated proto files (Go/Python)
├── backend/                # Go server code, middleware, handlers
├── ml-nodes/               # C++ gRPC servers (Vision, Liveness, Matching)
│   ├── vision_node/
│   ├── liveness_node/
│   └── matching_node/
├── mobile/                 # Flutter/Android client code
└── docs/                   # Architecture notes, manuals

Prerequisites

  • Languages/Compilers: Go 1.x, Python 3.x, C++ (CMake, Make), Dart/Flutter, Kotlin
  • Tools: protoc (Protocol Buffers)
  • Databases: PostgreSQL, Redis
  • Environment Variables: .env file requirements

Quick Start & Deployment

1. Generating Proto Files

2. Building and Running ML Nodes

3. Running the Go Backend


API & Communication Protocols

  • Public Endpoints (Plain HTTPS): e.g., /onboarding/create-account
  • Authenticated Endpoints (mTLS): e.g., /online/send, /online/balance
  • Internal Microservices (gRPC): * Vision Node (Port 50051)
    • Liveness Node (Port 50052)
    • Matching Node (Port 50053)

Testing


How to run

Requirements

  1. Python installed 3.12.x
  2. Open cv installed
  3. uv installed
  4. go installed
  5. Flutter installed
  6. Java

Ledger DB

starting step

bash

cd LedgerDB

bash

make run-all

Intermediary

starting step

bash

cd Intermediary

run the server

bash

make run-server

Onboarding Nodes

make build-all BASE_DIR=.
make run-all BASE_DIR=.

Windows Users

cd Intermediary
"online_wallets.sql","offline_wallets.sql","tamper.sql","pos.sql" | ForEach-Object { Get-Content ".\db\migrations\$_" | docker exec -i intermediary-postgres psql -U test -d intermediary } 

mobile app

notes: must run on an actual android phone not an emulator

First thing

cd mobile-app

you then need to run this

cat > android/local.properties << 'EOF'
SERVER_IP=[YOUR IP CONNECTED ON THE SAME NETWORK]
ONBOARDING_PORT=8081
MTLS_PORT=8443
ONBOARDING_ENDPOINT=/onboarding/create-account
ONBOARDING_KEY_ALIAS=secure_onboarding_client_key
TLS_KEY_ALIAS=secure_tls_client_key
BANK_NAME=CIB
TEE_ALIAS=TEE_KEY
DATA_KEY=offline_blob
DEPOSIT_COUNTER_KEY=deposit_counter
DEPOSIT_SIGNATURE_KEY=deposit_signature
DEPOSIT_KEY_ALIAS=deposit_key
OFFLINE_SIG=offline_signature
OFFLINE_ALIAS=offline_key_v0
TEE_CERT=tee_cert_key
EOF
make run

Contributors

  • Ziad Samer - [Onboarding and LedgerDB]
  • Zeyad Mohamed - [AML and LedgerDB]
  • Fatma Zenhom - [Online and Offline Wallets]
  • Hana Mostafa - [Online and Offline Wallets]

Confidential — Graduation Project Documentation

Popular repositories Loading

  1. LedgerDB LedgerDB Public

    This is the repository responsible for the implementation of our core ledger

    Jupyter Notebook

  2. mobile-app mobile-app Public

    Flutter e-GNH user application

    Dart

  3. Intermediary Intermediary Public

    Go

  4. .github .github Public

Repositories

Showing 4 of 4 repositories

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Loading…

Most used topics

Loading…