# Architecture overview · Build with zero-knowledge proofs on Chromia · Learn Chromia

> This ZKP demo is a Chromia application that shows you how to build confidential transactions with zero-knowledge proofs. The source describes it as a…

Source: https://chromia.com/learn/zero-knowledge-proof/architecture-overview/

Build with zero-knowledge proofs on ChromiaLesson 4 of 19

1. [01Introduction to the course](https://chromia.com/learn/zero-knowledge-proof/introduction/)
2. [02Zero-knowledge proof](https://chromia.com/learn/zero-knowledge-proof/zero-knowledge-proof/)
3. [03Project setup](https://chromia.com/learn/zero-knowledge-proof/setup/)
4. [04Architecture overview](https://chromia.com/learn/zero-knowledge-proof/architecture-overview/)

Module 1: Writing Circom circuits

1. [05Overview](https://chromia.com/learn/zero-knowledge-proof/circom-circuits/)
2. [06Circom circuits: introduction](https://chromia.com/learn/zero-knowledge-proof/circom-circuits/circom-circuits-introduction/)
3. [07Circom files overview](https://chromia.com/learn/zero-knowledge-proof/circom-circuits/circom-circuits-project/)
4. [08Circom circuits: compile](https://chromia.com/learn/zero-knowledge-proof/circom-circuits/circom-circuits-compile/)

Module 2 – Dapp

1. [09Overview](https://chromia.com/learn/zero-knowledge-proof/dapp/)
2. [10Dapp: setup and run](https://chromia.com/learn/zero-knowledge-proof/dapp/dapp-setup-run/)
3. [11Dapp overview](https://chromia.com/learn/zero-knowledge-proof/dapp/dapp-overview/)
4. [12Dapp entities](https://chromia.com/learn/zero-knowledge-proof/dapp/dapp-entities/)
5. [13PLONK verification](https://chromia.com/learn/zero-knowledge-proof/dapp/dapp-verification/)
6. [14Dapp operations overview](https://chromia.com/learn/zero-knowledge-proof/dapp/dapp-operations/)
7. [15Dapp queries overview](https://chromia.com/learn/zero-knowledge-proof/dapp/dapp-queries/)

Module 3 – Frontend

1. [16Overview](https://chromia.com/learn/zero-knowledge-proof/frontend/)
2. [17Frontend: setup and run](https://chromia.com/learn/zero-knowledge-proof/frontend/frontend-setup-run/)
3. [18Frontend architecture](https://chromia.com/learn/zero-knowledge-proof/frontend/frontend-explore/)
4. [19Frontend: test](https://chromia.com/learn/zero-knowledge-proof/frontend/frontend-test/)

[Learn](https://chromia.com/learn/)[Build with zero-knowledge proofs on Chromia](https://chromia.com/learn/zero-knowledge-proof/)

04 / 19Advanced

# Architecture overview

## What is the demo dapp?

This ZKP demo is a Chromia application that shows you how to build confidential transactions with zero-knowledge proofs. It demonstrates a **privacy-preserving token system**. It runs two token forms side by side, public and private. You can switch your balance between them, and your transactions stay private.

### Core concept

Privacy here rests on a **UTXO-based privacy model** with these parts:

* **Public tokens** are FT4 tokens, and anyone can see them on chain.
* **Private tokens** are cryptographic commitments whose amounts stay hidden.
* **Shield operations** turn your public tokens into private commitments.
* **Private transfers** send private tokens from one user to another anonymously.
* **Unshield operations** turn private tokens back into public ones.

Together, these operations add a **confidential transaction layer** above the Chromia blockchain. For each transaction, you decide whether it is public or private.

## Technical architecture

### Multi-layer architecture

Three closely connected layers make up the dapp:

### 1. Circom zero-knowledge circuits

**Technology stack**: Circom, the PLONK proof system, and Groth16 as a fallback

**Key features**:

* **PLONK proofs** keep verification efficient.
* **Poseidon hashing** supplies cryptography suited to circuits.
* **Nullifier generation** stops the same note from being spent twice.
* **Commitment schemes** conceal token amounts.

### 2. Rell dapp (blockchain layer)

**Technology stack**: [Rell](https://docs.chromia.com/rell/rell-intro),
[Chromia Postchain](https://docs.chromia.com/get-started/about/architecture/node/#overview-of-postchain),
[FT4 Framework](https://docs.chromia.com/build/ft4/intro/),
ZKPGTXModule

#### Security features

* **ZKP verification**: ZKPGTXModule checks every private operation.
* **Double-spending prevention**: the chain records nullifiers and rejects reused ones.
* **Input validation**: a commitment can be spent only if it is valid.
* **State consistency**: the UTXO sets are kept accurate.

### 3. Next.js client (frontend layer)

**Technology stack**: Next.js, React, TypeScript, MetaMask integration, and the Chromia FT4Client

**Key features**:

* **SecureNoteManager** handles keys and encrypts notes on the client side.
* **FT4Client integration** connects the frontend to the blockchain.
* **MetaMask wallet connection** authenticates users and signs their transactions.
* **ZKP proof generation** happens in your browser through WebAssembly circuits.
* **Private key derivation** builds the note-decryption key from a wallet signature.
* **A straightforward UI** lets you shield, unshield, and transfer privately.

Written for this site from Chromia’s public course. Code samples are the course’s own.

[← Previous**Project setup**](https://chromia.com/learn/zero-knowledge-proof/setup/)[Next →**Module 1: Writing Circom circuits**](https://chromia.com/learn/zero-knowledge-proof/circom-circuits/)

On this page

* [What is the demo dapp?](#what-is-the-demo-dapp)
* [Technical architecture](#technical-architecture)
