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.
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.
- Thread conversations: Reply to a message in a side thread panel backed by Velt inline comments.
- Presence:
VeltPresenceshows who is online. - Notifications:
VeltNotificationsToolgives in-app notifications. - Comments sidebar:
VeltCommentsSidebarwith aVeltSidebarButtonin 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.
| 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 |
- Node.js 16 or later
- npm 8 or later
- A Velt API key from the Velt console
git clone https://github.com/Studio1HQ/slack-thread-velt.git
cd slack-thread-velt
npm installCreate a .env.local file in the project root.
| Variable | Description |
|---|---|
NEXT_PUBLIC_VELT_ID |
Your Velt API key. |
npm run devOpen http://localhost:3000. Other scripts: npm run build, npm run start.
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.localand that the key is active in the Velt console. - Collaboration not working: check the browser console, network and browser support.
- Build issues: remove
.nextandnode_modules, then runnpm installagain.
- Live demo: the deployed app.
- Velt documentation: SDK guides.
- Velt: product site.
- shadcn/ui: component library.
Built by Studio1, the technical content and DevRel partner for devtool teams. Made with Velt.
Browse more open-source examples at github.com/Studio1HQ.
studio1hq.com · Technical content, docs, video and DevRel for devtools