Backend

Designing a webhook endpoint that survives bad input
Backend
Designing a webhook endpoint that survives bad input

Every webhook endpoint I have written eventually receives something it did not expect. A truncated JSON body. A signature computed over different bytes than the ones that arrived. A 40 MB payload from a provider that decided to batch a year of events into one POST. The endpoint that handles the happy path is easy; the one that survives the garbage is the one you actually ...

By BrainSoft  |   17 September 2026
Multi-tenant SaaS: one shared database or one per customer
Backend
Multi-tenant SaaS: one shared database or one per customer

Every SaaS product eventually hits the same fork in the road. You have ten customers, then fifty, then a few hundred, and someone in sales asks whether customer data lives in the same database as everyone else's. The answer you give that day shapes your backups, your migrations, your support tickets and your pricing for years. I have built both models and migrated betwee ...

By BrainSoft  |   16 September 2026
Handling file uploads without hosting your own storage
Backend
Handling file uploads without hosting your own storage

Someone asks for avatar uploads. Then it is PDF attachments. Then a customer wants to send 200 MB video files from a phone on hotel wifi. The naive version of this feature is a multipart POST to your API, the file lands in a temp directory, and now your app server is also a storage server. Disk fills up, requests tie up worker threads, and you are suddenly responsible fo ...

By BrainSoft  |   15 September 2026