Skip to content

Repository files navigation

efelant — The communication layer for PostgreSQL

efelant

The communication layer for PostgreSQL applications.
A messenger and an embeddable conversation layer. Core is SQL.
There is no application server.

GitHub · Docs · Website · API · Repository · Packages · AGPL-3.0


Most chat stacks add Redis, Kafka, and an application server before the first message lands. Efelant is built for people who already have PostgreSQL and want conversations, activity feeds, and status events to live next to the data they already trust.

Features

  • 🐘 PostgreSQL is the API — stored functions, RLS, LISTEN/NOTIFY. No Node, Nest, FastAPI, or GraphQL in Core.
  • 💬 Messenger and embeddable layer — standalone chat, or a thread next to a ticket, claim, or order.
  • 🔐 Keys stay on the device — X25519 + AES-GCM. PostgreSQL stores ciphertext, never private keys.
  • 🌐 Web without an app server — nginx or Caddy serves Flutter web; /ws is a protocol adapter only.
  • 🔌 REST and gRPC as extensionsefelant_rest and efelant_grpc call the same SQL as native clients.
  • 🎨 Style Dictionary tokens — one command writes CSS, JS, Dart, Stencil, and the marketing site.
  • 🧩 SDKs you can regenerate — TypeScript, bundled JS, Stencil <efelant-*>, Flutter facades.
  • 🚀 Zero extra runtime — if Compose works on your machine, so does Efelant.

Get started

cp .env.example .env
./scripts/up.sh

Open http://localhost:8080. The browser talks same-origin ws://localhost:8080/ws.

username password
alice password123
bob password123
charlie password123

Seeded only on first init when EFELANT_SEED=1 (the default in .env.example). Self-host with EFELANT_SEED=0 and use create an account.

Native Flutter (optional):

asdf install          # Flutter from .tool-versions
cd app && flutter run

Android emulator host is usually 10.0.2.2 instead of localhost. Set it in the app (login or settings → efelant host) or at compile time:

flutter run --dart-define=EFELANT_DB_HOST=10.0.2.2

Design tokens, components, SDKs

Need Node 20+. From the repository root:

./scripts/packages.sh

That is the whole pipeline: Style Dictionary → TypeScript / JS clients → Stencil → Flutter facades.

you want command
Style Dictionary only ./scripts/packages.sh tokens
@efelant/client + JS bundle ./scripts/packages.sh clients
<efelant-*> + Flutter widgets ./scripts/packages.sh components

Edit packages/tokens/tokens/*.json and packages/web-components/src/. Generated CSS, Dart, and dist/ are outputs — do not hand-edit them.

Full map: packages/README.md.

Self-host

Run it on hardware or a VM you control. Paths: Docker, Compose, Swarm, Helm, or Kustomize. Full steps: docs/deployment.md.

./scripts/new-secrets.sh
# edit .env: EFELANT_DOMAIN=chat.example.com
#            EFELANT_WS_ORIGINS=https://chat.example.com
docker compose -f docker-compose.yml -f docker-compose.caddy.yml up -d --build

Caddy obtains TLS for EFELANT_DOMAIN and reverse-proxies the web client. Postgres is not published. Users register in the app. Do not ship the development passwords.

Traefik overlay: docker-compose.traefik.yml. Swarm: tag GHCR images to the Compose names, then docker stack deploy. Kubernetes: helm install from oci://ghcr.io/tafaust/efelant/charts/efelant or kubectl apply -k deploy/kustomize/overlays/{dev,prod,prod-no-stackgres}. GHCR tags: 0, 0.1, 0.1.0, latest.

Tests

docker compose up -d --build
./database/tests/run.sh
cd app && flutter test

Repository

efelant/
├── app/                 Flutter messenger
├── database/            Core SQL, extensions, web-gateway, tests
├── packages/            tokens · clients · Stencil · Flutter SDK
├── site/                landing + HTML docs
├── deploy/              nginx, Caddy, Traefik, Helm, Kustomize
├── docs/                markdown source of truth
└── scripts/             up, migrate, secrets, packages

How the folders fit together: docs/repository.md.
Architecture, security, function API: docs/core.md.

Where to look

📚 Docs docs/
🌐 Website site/
🎨 Tokens & SDKs docs/styles.md · docs/sdk.md · packages/
🚀 Commands scripts/
🔌 REST / gRPC docs/api.md
🚢 Self-host docs/deployment.md

License

GNU Affero General Public License v3.0 or later. Full text: LICENSE. Details: docs/license.md.

Using Efelant? Read the use cases and tell a colleague.

About

The communication layer for PostgreSQL applications. A messenger whose only backend is PostgreSQL.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages