CommonGround System Architecture

Overview

CommonGround is a local-first, federated governance system composed of modular services.


Architecture Layers

[Client / UX]

[Application Services]

[Governance Engine]

[Protocol Layer]

[Storage + Sync]

Core Services

Identity Service

Governance Engine

Deliberation Service

Federation Layer


Data Model


Smart Contract (Example)

contract Governance {

    struct Proposal {
        address proposer;
        uint256 support;
        uint256 createdAt;
        bool executed;
    }

    mapping(uint256 => Proposal) public proposals;

    function createProposal() public {
        require(rateLimit(msg.sender));
        proposals[id] = Proposal(msg.sender, 0, block.timestamp, false);
    }

    function supportProposal(uint256 id) public {
        proposals[id].support += 1;
    }

    function executeProposal(uint256 id) public {
        require(proposals[id].support >= threshold);
        require(quorumReached(id));
        proposals[id].executed = true;
    }
}

Design Principles