Menu

Post image 1
Post image 2
Post image 3
1 / 3
0

The Media Architecture Problem: How I Went from 80,000 Lines to 1,895

DEV Community·mathavan jeyadev·19 days ago
#Hom2ncbW
#webdev#systemdesign#code#every#file#security
Reading 0:00
15s threshold

Not a refactor. Not a rewrite. A rethink. And the security improvement was not something I planned. It was a consequence of thinking about the problem correctly. The Mess That Grew in Silence Our platform handles media for everything. User profile pictures. Maintenance job photos. Lease agreements. Inspection reports. Tenancy documents. Contract files. Management agreements. Entry condition reports. Exit condition reports. Each one slightly different. Some allow multiple files. Some allow only one. Some need a featured image. Some need ordering. Some go to FTP. Some display as a gallery. Some render inline as a PDF. Some generate secure download links. Over ten years, every developer who touched a new media requirement wrote new code for it. Nobody ever stopped to ask whether there was a single thing underneath all these cases. By the time I looked properly, the media handling code scattered across the codebase was over 80,000 lines. But here is the part that troubled me more than the line count.…

Continue reading — create a free account

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

Read More