Installation

Comms installs the same way every ARK product does. This page covers the Comms-specific steps. For the generic Supabase + Vercel setup, head to Installation.

Comms's database schema

After the shared platform schema, run Comms's schema:

# from your local Comms repo
supabase db push --file supabase/schema.sql

This creates channels, messages, threads, mail_accounts, and related tables. See Database Reference.

Environment variables

Standard ARK variables (see Environment Variables) plus:

VITE_COMMS_REALTIME_URL

What it is: the Supabase Realtime endpoint URL. Defaults to deriving from VITE_SUPABASE_URL — set explicitly only if you route realtime through a custom domain.

Required? No.

VITE_RESEND_API_KEY

What it is: Resend API key for outbound email (replies sent from Comms, digest emails, password resets).

Required? Yes, if you want to send email from Comms.

COMMS_INBOUND_EMAIL_DOMAIN

What it is: the domain that routes incoming email into Comms inboxes. E.g., mail.acme.com.

Required? Only if you use the Mail feature.

COMMS_INBOUND_SIGNING_SECRET

What it is: HMAC secret used to verify inbound-email webhook payloads from your mail provider.

Generate: openssl rand -hex 32.

Required? Yes, if Mail is enabled. Never run inbound email without signature verification.

VITE_TURN_SERVER_URL / VITE_TURN_USERNAME / VITE_TURN_CREDENTIAL

What they are: coordinates for a TURN relay, used by huddles when peers can't connect directly.

Required? Only if your users are on restrictive networks. Defaults to STUN-only (works for most teams).

VITE_SLACK_BOT_TOKEN / COMMS_SLACK_SIGNING_SECRET

What they are: credentials for the optional Slack bridge (mirror a Slack channel into Comms or vice versa).

Required? Only if you're using the Slack integration.

Edge Functions

Comms ships with these Edge Functions:

FunctionPurpose
comms-inbound-emailReceives webhook POSTs from your mail provider, verifies signatures, inserts messages.
comms-notification-dispatcherFans out in-app + email + mobile-push notifications with per-user rules.
comms-huddle-signalingWebRTC signaling for huddles (SDP offer/answer exchange).
comms-retention-sweeperNightly cron that enforces per-channel retention policies.

Deploy:

supabase functions deploy comms-inbound-email
supabase functions deploy comms-notification-dispatcher
supabase functions deploy comms-huddle-signaling
supabase functions deploy comms-retention-sweeper

Schedule the retention sweeper (daily, 3 AM):

select cron.schedule(
  'comms-retention-sweeper',
  '0 3 * * *',
  $$select net.http_post(
    url := 'https://<project-ref>.functions.supabase.co/comms-retention-sweeper',
    headers := jsonb_build_object('Authorization', 'Bearer ' || current_setting('app.settings.service_role_key'))
  );$$
);

Third-party integrations

Email (Resend + inbound provider)

Outbound email is Resend. Inbound is any provider that can POST a parsed-email webhook — SendGrid Inbound Parse, Postmark, Mailgun Routes all work. Point their webhook at:

https://<your-comms-domain>/api/mail/inbound

Include the signing secret header x-comms-signature. The function rejects anything without a valid signature.

Slack bridge (optional)

If you want to mirror a Slack channel into a Comms channel (e.g., during migration), install the Comms Slack app from Settings → Integrations → Slack, authorize the workspace, and pair channels from the bridge settings.

Calendar (optional)

Huddle invites can create calendar events via Google Calendar or Microsoft 365 OAuth per user. Configured under Account → Integrations.

Verify your install

  1. Sign up as the first user — you become workspace admin.
  2. Create a channel; send a message.
  3. Invite a teammate; @-mention them and confirm the notification fires (check Notifications in the sidebar and the email if Resend is configured).
  4. Start a huddle. Two users should be able to connect.
  5. If Mail is enabled, send a test email to your configured inbound address and confirm it lands in the Mail inbox channel within a few seconds.