All blocks

App template

Team chat

Channels, DMs, threads, calls and apps for a team that keeps chat open all day: quick to switch, quiet unless it's you, and nothing lost.

general

Company-wide news and questions. Everyone's here.

This is the very beginning of #general. Company-wide news and questions. Everyone's here.

Monday, November 30

  1. DR

    Reminder: offices are closed Thursday. Please ship nothing risky Wednesday afternoon 🙏

Today

  1. App

    Monday standup

    What did you finish, what's next, and is anything in your way?

    6 of 14 answered
  2. PN

    Welcome @Lena Fischer from Studio Brava! She's drawing the Q3 launch visuals. Say hi in #launch-q3 👋

  3. App

    Team lunch on Wednesday

    Pick one. The poll closes Tuesday at noon.

    15 votes
  4. DR

    Heads up: the third-floor Wi-Fi gets swapped this afternoon. Expect a few drops around 3.

Use this template

Installs the whole app into your project: its pages, routes, services with sample data, agent tools and the browser entry. Every file is yours to edit.

npx shadcn@latest add checkfu/uicontext/team-chat
  1. Run itLoad from your page’s script. It builds the app with createApp: the browser’s router, the agent tools, an offline notice, and sign-in when you turn it on. Inside an app that already routes, render TeamChat, which brings its own in-memory router.
  2. Connect your backendEvery read and write goes through Chat in . Implement it over your API and point ChatLive at your Layer.
  3. Make it yoursPages are one file per route. Delete the ones you don’t need, and the sample data in .

Screens

  • Home

    /

    The conversation list on a phone; the last conversation on a wide screen.

  • Conversation

    /c/:id

    A channel or DM: opens at the New line, with reactions, threads, files, pins and calls.

  • Thread

    /c/:id/t/:thread

    A thread beside its conversation, or its own screen on a phone.

  • Activity

    /activity

    Mentions, thread replies and reactions, with filters and mark read.

  • Search

    /search

    Messages, files, channels and people, narrowed with from:, in: and has:.

  • DMs

    /dms

    Direct and group messages.

  • You

    /you

    Your status, availability and paused notifications.

Where your backend plugs in

Pages never call a backend. They read through the queries in queries/ and write through Commands kept beside the component that runs them; both capture the Chat service. Implement its interface in over HTTP, a sync engine or a database client, then change one line:

export const ChatLive = Chat.sample
// becomes your Layer, such as
export const ChatLive = Layer.effect(Chat, makeHttpChat)

The root provides it once, so every page shares one instance. Sign-in is one line: delete auth: false in once your backend serves the session routes, and the sidebar shows who signed in.

What to delete

  • services/seed.ts, and Chat.sample in services/Chat.ts
  • replyFor in services/seed.ts and the AwaitAnswer command, which stand in for real people

To drop a screen, delete its file in pages/ and its route in ; TypeScript points at every link that still prints it. The agent tools are in .