Swn Chat, a pure elixir alternative to discord, for self hosting.
  • Elixir 97.2%
  • HTML 1.3%
  • CSS 0.7%
  • JavaScript 0.6%
  • Dockerfile 0.2%
Find a file
Niki Wix Skaarup 4e514dd078
All checks were successful
Build and push image / docker-build-push-action (push) Successful in 30s
formatting
2026-02-16 00:32:12 +01:00
.forgejo/workflows formatting 2026-02-16 00:32:12 +01:00
assets role management and server management 2026-02-15 07:14:44 +01:00
config init 2026-02-15 04:27:41 +01:00
lib made the ui more compact 2026-02-15 11:44:27 +01:00
priv fixes 2026-02-15 11:33:27 +01:00
test releases! 2026-02-15 11:52:29 +01:00
.dockerignore releases! 2026-02-15 11:52:29 +01:00
.editorconfig init 2026-02-15 04:27:41 +01:00
.formatter.exs init 2026-02-15 04:27:41 +01:00
.gitignore init 2026-02-15 04:27:41 +01:00
AGENTS.md init 2026-02-15 04:27:41 +01:00
ARCHITECTURE.md milestone 2 2026-02-15 05:30:31 +01:00
CHAT_CONTRIBUTING.md v1.1 2026-02-15 10:58:21 +01:00
DB_INDEX_REVIEW.md remaining items 2026-02-15 06:32:14 +01:00
Dockerfile releases! 2026-02-15 11:52:29 +01:00
mix.exs markdown with syntax highlight 2026-02-15 09:31:15 +01:00
mix.lock markdown with syntax highlight 2026-02-15 09:31:15 +01:00
PERMISSION_CATALOG.md v1.1 2026-02-15 10:58:21 +01:00
README.md readme 2026-02-15 11:48:51 +01:00
V1.1_COMPLETION_GUARDRAILS.md v1.1 2026-02-15 10:58:21 +01:00
V1.1_TASK_LIST.md v1.1 2026-02-15 10:58:21 +01:00
V1_COMPLETION_GUARDRAILS.md guardrails 2026-02-15 09:43:49 +01:00
V1_TASK_LIST.md remaining items 2026-02-15 06:32:14 +01:00

Swn

Swn aims to be a live chat app with servers and channels, inspired by Discord-style permissions.

Product goals

  • Users can belong to multiple servers.
  • Servers are invite-only. The creator auto-joins as owner and cannot leave without transferring ownership or deleting the server.
  • Each channel is a separate chat stream.
  • A new server starts with a General channel.
  • The primary app UI is a 4-column layout:
    • a slim server icon rail (50px) with join/create server controls
    • a wider channels column
    • a chat/messages column
    • a member presence column (online/offline), hideable for wider chat view
  • Users can have avatars generated from display-name initials by default.
  • Users set a display_name during registration and can update it later in account settings.
  • Chat identity display uses server nickname when present, otherwise user display_name.
  • User email addresses are account credentials and are not shown to other users in chat surfaces.

V1 implementation tracking

The complete V1 checklist and architecture tasks are tracked in V1_TASK_LIST.md.

Practical "done means done" guardrails (especially UI parity checks) are tracked in V1_COMPLETION_GUARDRAILS.md.

Architecture decisions and system design are documented in ARCHITECTURE.md.

Permission bit assignments are documented in PERMISSION_CATALOG.md.

Contributor implementation guidance for chat domain changes is documented in CHAT_CONTRIBUTING.md.

Chat message markdown rendering uses mdex with syntax highlighting enabled and markdown images disabled in rendered output for V1 safety.

V1.1 permission capability changelog

Newly active permission-gated capabilities:

  • manage_messages: message delete moderation controls in channel message list.
  • mention_everyone: @everyone/@here mention enforcement with denial feedback.
  • send_tts_messages: composer TTS toggle with permission gating.
  • change_nickname and manage_nicknames: nickname editing in member management dialog.
  • timeout_members: apply/update/clear timeout controls with message-send blocking.
  • create_invite: server-wide and channel-scoped invite creation from settings.
  • add_reactions: reaction toggle controls on messages.
  • attach_files: composer file uploads with permission gating.
  • embed_links: URL send enforcement and inline link preview cards.

Identity and privacy updates:

  • Registration now requires display_name in addition to email.
  • Account settings include display-name editing.
  • Member/message labels in chat prefer server nickname, then fallback to display name.
  • Peer-facing chat UI no longer exposes user email addresses.

Key decisions already locked for V1:

  • Multi-server memberships from day one.
  • Discord-like role permissions using integer bitsets (targeting fewer than 40 permissions for now).
  • Hidden owner semantics via servers.owner_id.
  • Non-deletable server-level @everyone role.
  • Member-specific channel overwrites plus role overwrites.
  • ADMINISTRATOR permission semantics and role hierarchy enforcement.
  • Audit logs stored in the same database for V1 (focused on admin/security actions, not per-message events).

Dev

To start your Phoenix server:

  • Run mix setup to install and setup dependencies
  • Start Phoenix endpoint with mix phx.server or inside IEx with iex -S mix phx.server

Now you can visit localhost:4000 from your browser.

Ready to run in production? Please check our deployment guides.

Learn more