Menu

I built a social network with a single HTML file
📰

I built a social network with a single HTML file

DEV Community: webdev·Abdo Hbd·4 days ago
#vg2TwKNM
#devtowebdev#devto#dev#relay#pages
Reading 0:00
15s threshold

I've been building Relay, a small social network. It's live and free to use: https://relay-4vm.pages.dev

What it has so far:

For you and Following feeds

Direct messages with images and GIFs

Notifications

Editable profiles

Dark mode

Password reset with email codes

The frontend is a single HTML file, now past 13,000 lines. The backend is TypeScript, and the frontend is hosted on Cloudflare Pages.

A few things I ran into:

One file works until it doesn't. Past roughly 10k lines, every change touches the same file, searching gets slow, and parallel changes conflict. I'm keeping it for now, but the CSS and JS are the first things I'd split out.

Small UI details take longer than features. Getting a message action bar to sit beside an image instead of on top of it, without resizing the image when it appears, took more effort than adding the feature itself.

Security belongs on the server. For password reset, the code check and the single-use reset token live in the backend.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.