Skip to content

About

Slack clone with threaded conversations using Velt inline comments, presence and notifications. Next.js.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Slack-Style Threads with Velt: A Slack-style chat with threaded conversations powered by Velt

Slack-Style Threads with Velt

A Slack-style chat with threaded conversations powered by Velt

A Next.js Slack clone with channels, multiple demo users and threaded replies. Velt provides inline comments for threads, presence, a comments sidebar and notifications.


Built by Studio1 Built with Velt Live demo

Velt docs  ·  Velt  ·  More examples  ·  studio1hq.com


Overview

This is a Slack-style chat app built with Next.js, Tailwind CSS, shadcn/ui and Velt. It has channels, predefined users you can switch between, and threaded conversations on messages.

Velt provides the collaboration layer. Threads use VeltInlineCommentsSection, and the top bar adds presence, a comments sidebar and notifications.

Features

  • Thread conversations: Reply to a message in a side thread panel backed by Velt inline comments.
  • Presence: VeltPresence shows who is online.
  • Notifications: VeltNotificationsTool gives in-app notifications.
  • Comments sidebar: VeltCommentsSidebar with a VeltSidebarButton in the top bar.
  • Multi-user support: Switch between predefined users with avatars. The Velt user is re-identified on every switch.
  • Channel sidebar: Navigate between channels, with unread message counts.
  • Dark and light theme: Toggle between modes.
  • Reusable UI: Built from shadcn/ui and Radix primitives.

Tech stack

Layer Tool
Framework Next.js (App Router), React, TypeScript
Collaboration Velt (@veltdev/react)
UI Tailwind CSS, shadcn/ui, Radix UI, Lucide
State Zustand
Deployment Vercel

Getting started

Prerequisites

  • Node.js 16 or later
  • npm 8 or later
  • A Velt API key from the Velt console

Installation

git clone https://github.com/Studio1HQ/slack-thread-velt.git
cd slack-thread-velt
npm install

Environment variables

Create a .env.local file in the project root.

Variable Description
NEXT_PUBLIC_VELT_ID Your Velt API key.

Run

npm run dev

Open http://localhost:3000. Other scripts: npm run build, npm run start.

How it works

app/(app)/         layout
components/chat/   chat-container, message, message-input, sidebar, thread-panel, topbar
components/ui/     UI primitives
helper/            users DB
hooks/             theme provider hooks
lib/               utilities and types

VeltProvider wraps the app. In components/chat/topbar.tsx the selected user is passed to client.identify(...) and the document slack-thread-velt is set with client.setDocuments(...). thread-panel.tsx renders VeltInlineCommentsSection for each thread.

Troubleshooting:

  • API key problems: check .env.local and that the key is active in the Velt console.
  • Collaboration not working: check the browser console, network and browser support.
  • Build issues: remove .next and node_modules, then run npm install again.

Resources



Studio1

Built by Studio1, the technical content and DevRel partner for devtool teams. Made with Velt.
Browse more open-source examples at github.com/Studio1HQ.

Website Book a call X LinkedIn

studio1hq.com · Technical content, docs, video and DevRel for devtools

About

Slack clone with threaded conversations using Velt inline comments, presence and notifications. Next.js.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages