Show HN: CodeCafé – A real-time collaborative code editor in the browser

81 pointsposted 6 days ago
by mrktsm__

14 Comments

omneity

6 days ago

Great job, congrats for the release! A little feedback, it could be nice to auto-generate a unique url on page load (the one you generate after clicking on "share"). Bonus is that it gives the user a certain confidence to reload the page for example.

Side note, I am wondering if this could be used as a better way to collaborate with coding agents. "Pair with me" instead of the typical "Code for me".

mrktsm__

6 days ago

Thanks for the feedback! I clear the session URL after joining because I thought it looked cleaner, but I might start leaving it in if it helps with reload confidence.

tpae

6 days ago

Question for you, how come you didn't use CDRT like yjs? It could simplify the codebase

mrktsm__

6 days ago

Good question — before diving into the project, I did have the chance to choose. I looked into both OT and CRDTs and found that OT is widely used in collaborative editors like Google Docs, so I leaned that way. I wouldn’t say it was a deeply informed decision — I just had more reference points for OT at the time. I think with more hands-on experience with CRDTs, I’d be better equipped to weigh the trade-offs more clearly

ggap

6 days ago

Well done on this! I will keep an eye on the project

indigodaddy

5 days ago

Does the preview work for dynamic server content eg python, nodejs, php etc?

mrktsm__

5 days ago

Currently, the JS, HTML, and CSS are rendered client-side, which was relatively straightforward to implement. However, I’m in the process of moving these files to the server and serving them from there, which will enable me to execute languages that aren’t natively supported by the browser

nanna

6 days ago

I would love this for Emacs!

n3storm

6 days ago

[flagged]

mrktsm__

6 days ago

Yeah, you're very correct actually. I chose Java because I'm most comfortable with it, but in retrospect, Node might have been a better choice. There’s some shared logic for the collaboration part, and it was a bit of a hassle to ensure the client and backend had the same logic. Having both in JavaScript would have made things smoother

spruce_tips

6 days ago

java 23+ kicks ass. it's come a long way

user

6 days ago

[deleted]