We onboarded a client with an unusual shape: they wouldn’t send many bills, but the bills they did send carried thousands of line items each.
We weren’t built for that. Loading a bill with that many line items surfaced a whole range of issues, and it became a crash course in scaling the front end — getting React to render everything smoothly in both the display and the edit views.
On the front end, I found the editor was hydrating with the entire bill when it only needed a slice to edit. I stood up a new endpoint that returns just what the editor actually uses.
On the back end, I decoupled the joins so they ran separately from the line items, then streamed the line items in with IAsyncEnumerable, appending them back onto the Bill as they arrived.