Skip to content

quali.chat

quali.chat is a chat app that extends the decentralised Matrix communication protocol with blockchain-based authentication and token-gated access control based on on-chain balances, enabling secure and permissioned communication across multiple blockchain networks.


Repositories Structure


Prerequisites

Installation and configuration of:

  • Synapse: Matrix homeserver (element-hq/synapse)
  • SIWE: Sign in with Ethereum OIDC server (spruceid/siwe-oidc)
    • Set CLIENT_ID and CLIENT_SECRET as defined in the homeserver setup, and set REDIRECT_URI to https://MATRIX_HOMESERVER_URL/_synapse/client/oidc/callback.

Both SIWE-OIDC and Matrix homeserver require secure (HTTPS) connections. You must use TLS keys to ensure encrypted communication.


Setup

Once you have your Matrix homeserver and SIWE OIDC provider running, you can immediately set up and use the quali.chat components. Prerequisites:

  • Node.js (latest LTS)
  • Docker & Docker Compose
  • Alchemy API key (get one)
  • Redis (for caching/session management)

1. Setup quali-chat-core

In a new terminal, clone and set up the core:

git clone https://github.com/quali-chat/quali-chat-core.git
cd quali-chat-core
npm install
cp .env.example .env
# Edit .env with your API keys and configuration
docker run --name redis -p 6379:6379 -d redis
npm run start

2. Setup quali-chat-web

In a new terminal, clone and set up the web client:

git clone https://github.com/quali-chat/quali-chat-web.git
cd quali-chat-web
yarn install
cp config.sample.json config.json # edit the Matrix homeserver URL
yarn start

3. Setup native clients

Setup custom Android and iOS client as per the README.

Quick Start Guide for local development

The following guide helps you set up a local development environment running all components.

1. Setup SIWE OIDC Provider

  • Clone the official SIWE OIDC provider:

    git clone https://github.com/spruceid/siwe-oidc.git
    cd siwe-oidc
  • Follow the instructions in the README.

  • Install dependencies and configure your PROJECT_ID environment variable with your WalletConnect(reown now) project ID.

  • Follow the Development section of the spruceid/siwe-oidc README to set up a local development environment.

  • Check environment variables: CLIENT_ID, CLIENT_SECRET, REDIRECT_URI.

  • If using the docker-compose file:

    • In test/docker-compose.yml, add your Matrix homeserver callback URLs (https://MATRIX_HOMESERVER_URL/_synapse/client/oidc/callback) to redirect_uris under SIWEOIDC_DEFAULT_CLIENTS.
  • Important: Both the OIDC and Matrix servers require secure (HTTPS) connections. You must use TLS keys to ensure encrypted communication.

  • Ensure the OIDC provider is running and accessible.


2. Setup Synapse Server (synapse-homeserver-patch)

  • Clone the Synapse patch repository:

    git clone https://github.com/quali-chat/synapse-homeserver-patch.git
    cd synapse-homeserver-patch
  • Create and activate a Python virtual environment:

    make venv && . ./env/bin/activate
  • Reset and set up the Matrix server:

    make reset
  • Start the server in development mode:

    make dev
  • Ensure the Synapse server is running and configured for OIDC.


3. Setup quali.chat

Refer to the earlier section Setup


Troubleshooting

  • Invalid access token: Clear the data directory in quali-chat-core.
  • Password login disabled: Ensure password_config is set to enabled: true in your Matrix server config.
  • Redis/Database issues: Ensure Redis is running and accessible.
  • SIWE OIDC build errors: Uncomment the RUN apk add --no-cache python3 make g++ line in the Dockerfile.

References


Popular repositories Loading

  1. quali-chat-synapse-patch quali-chat-synapse-patch Public

    Custom Synapse modules/configs for quali.chat

    HTML

  2. .github .github Public

  3. quali-chat-web quali-chat-web Public

    Forked from element-hq/element-web

    quali.chat Web Client

    TypeScript

  4. quali-chat-core quali-chat-core Public

    Core backend for quali.chat: token-gated Matrix rooms based on blockchain balances.

    TypeScript

  5. element-x-ios element-x-ios Public

    Forked from element-hq/element-x-ios

    Next generation Matrix client for iOS built with SwiftUI on top of matrix-rust-sdk.

    Swift

  6. element-x-android element-x-android Public

    Forked from element-hq/element-x-android

    Android Matrix messenger application using the Matrix Rust Sdk and Jetpack Compose

    Kotlin

Repositories

Showing 9 of 9 repositories

Top languages

Loading…

Most used topics

Loading…