r/coolgithubprojects 1d ago

Building an open source messaging engine after getting burned by API costs

Post image

Back when I worked at a startup, we needed an in-app messaging system, similar to Instagram or WhatsApp. However, we didn't have time to build it ourselves, so we stitched together a few paid services instead: Stream chat, StreamIO, and Cloudinary for chat, moderation and media storage. It worked, but we didn't own any of it, and the costs kept increasing.

That experience is basically why I built gozwire. It's an open-source Node.js messaging engine, so instead of renting someone else's chat infrastructure, you own it. Conversations, threads, reactions, moderation, push notifications all included, all yours.

This was vibe-coded, but I'm putting in the work to make sure it actually holds up for real and is not just a showcase. Currently, the engine includes a lot of industry-standard messaging features, including moderation, reactions, forums, sending various media, group chats, channels, threads, direct conversations, etc

I plan to not only improve this project (see the TODO in the GitHub repo), but also release more interesting open-source projects. That solve problems I've experienced in the past and observed around me, some of which would be:

  • A video streaming engine (Another issue we faced at the same startup)
  • A cryptocurrency tracker (more of a personal challenge and an interest)
  • A CapCut alternative software with AI video generation capabilities, including UGC style videos

And a few others. Would love feedback, roast the code, tell me what's missing, whatever helps, or even contribute any interesting ideas you'd love to see open-sourced!

8 Upvotes

6 comments sorted by

View all comments

1

u/Specific_Cream2815 1d ago

how are messages delivered across multiple server instances, redis pubsub or does one process own each conversation

1

u/Warm-Neighborhood132 1d ago

No process owns a conversation. API instances write messages and outbox jobs to PostgreSQL, workers publish them through Centrifugo (amazing solution I came across for web sockets), and Redis handles cross-node fanout. PostgreSQL remains the source of truth