---
title: "Architecture Overview of Decentralized Applications Using GenLayer"
description: "GenLayer DApp architecture covers frontend, GenLayerJS, Optimistic Democracy, GenVM, and Ghost Contracts."
source: https://docs.genlayer.com/developers/decentralized-applications/architecture-overview
last_updated: 2026-06-11
---

# Architecture Overview of Decentralized Applications Using GenLayer

A decentralized application (DApp) on GenLayer is an application architecture that connects a frontend to the GenLayer protocol through coordinated components, including AI-powered Intelligent Contracts. These DApps leverage GenLayer's unique blockchain architecture so the components can work together for seamless protocol interaction.

## Key Components

### Frontend Application
The user interface of the DApp is typically built with web technologies like HTML, CSS, and JavaScript. It communicates with the backend using the GenLayerJS SDK, enabling interaction with the GenLayer protocol and handling user inputs to trigger blockchain transactions.

### GenLayerJS SDK
A TypeScript/JavaScript library that abstracts the complexities of blockchain interactions. The SDK provides APIs to read from and write to Intelligent Contracts, manages accounts and queries transactions, and acts as the bridge between the frontend and GenLayer's protocol.

### Consensus Layer
The consensus layer implements GenLayer's Optimistic Democracy mechanism to ensure reliable and secure execution of transactions using a validator-driven commit-reveal scheme. It also handles appeals and transaction finality to maintain integrity and fairness.

It is built on ZK-stack rollups to provide scalability and cost-efficiency, secure state updates, and anchoring to Ethereum's security model.

### Execution Environment
The execution environment (the GenVM) is the engine that executes Intelligent Contracts. It supports both deterministic and non-deterministic operations, enabling AI integration and web data access.

### Ghost Contracts
Ghost contracts are proxy smart contracts on the consensus layer that facilitate interactions between accounts and Intelligent Contracts. They also manage external messages and asset bridging.

## Architecture Diagram

```mermaid
flowchart TD
 subgraph s1["Frontend Application"]
        n1["GenLayerJS"]
  end
 subgraph s2["Consensus Layer."]
        n2["Consensus Smart Contracts"]
        n3["Ghost Contracts"]
  end
 subgraph s3["GenLayer Node"]
        n4["Execution Environment - GenVM"]
  end
    s1 <--> s3
    s3 <--> s2
```
