I built a self-hosted Slack + Notion clone solo. Here's how I handled real-time WebRTC, Y.js CRDTs, and local AI.

Showoff Saturday

Hey r/webdev,

Over the last few months, I've been building an open-source frontend and a self-hosted workspace that basically combines chat, kanban boards, and collaborative docs into one Docker deploy.

I wanted to share some of the biggest architectural challenges I ran into building this solo, because tying these specific technologies together was a massive headache.

  1. The Dual Database Headache (Postgres + Dgraph) I initially started with just Postgres, but modeling the complex relationships (Users -> Teams -> Channels -> Threads) got messy fast. I ended up moving all the relationship-heavy graph data to Dgraph, while keeping Auth, Config, and Users in Postgres. Keeping them in sync required strict domain-driven design in the Go backend.

  2. Collaborative Docs with Y.js I wanted Notion-style docs. I ended up using Tiptap with the Y.js CRDT (Conflict-free Replicated Data Type) and a Hocuspocus server. The hardest part was handling offline states and resolving merge conflicts when a user reconnects after typing offline.

  3. Video Calls (LiveKit + WebRTC) I integrated LiveKit for the WebRTC layer. Setting up the TURN/STUN servers so video calls work across strict corporate firewalls was brutal.

  4. Local AI I baked Ollama into the Docker compose so teams can have a "second brain" that searches their chats and docs without sending data to OpenAI.

The Stack:

  • Frontend: Next.js 16 (App Router), React 19, Tailwind
  • Backend: Go (Chi Router)
  • Real-time: EMQX (MQTT broker)

I open-sourced the entire Next.js frontend if anyone wants to look at the code or use the UI components. It's over at https://github.com/OneMana-Soft/OneCamp-fe.

For the backend, I decided to try a different model: the frontend is open, but I sell the production-ready backend binary for a $19 one-time fee to keep the lights on.

Would love any feedback on the architecture or if anyone else here has experience scaling Dgraph alongside Postgres!

Posted May 1, 2026, 9:19 PM UTC

014
Loading comments…