All Logs

Arena Dashboard Dev Log: Quotes, Document Vaults, and a Demo That Almost Went Wrong

Today

The quote PDF failed during the demo. Right in front of my boss.

I'd been building Arena's internal dashboard for a while now. It's the ops tool for my company. Rate calculator, client management, quote generation, document storage. The whole thing. And I was giving a walkthrough of what was done so far when I hit generate on a quote, the toast popped, and the error showed up. Then the entire /quotes route broke.

I kept my face neutral and started debugging in real time.

The Demo That Broke in Production

My first instinct was the data. I deleted all the dummy records from the database and the route came back. That told me the frontend was expecting a PDF url from the db and getting nothing for some records. Okay, that made sense. But the quote generation itself was still failing. I added retry logic, error fallbacks, went back and forth. Nothing fully fixed it.

Then I opened the Vercel logs and just stared at them for a bit. Scrolled to the environment variables tab. The UploadThing keys weren't there. I had never added them to production.

That was it. A missing env variable. Classic.

The funny thing is that error pushed me to clean up a lot of things I'd been putting off. Error handling that was half-done. States I wasn't managing cleanly. Loading indicators that were missing. The demo breaking was annoying but the code is better now because of it.

How the Quote Flow Works

The app has come a long way. The quote flow works well now. You pick an existing client or create one inline without leaving the page, add a markup, and generate the quote. react-pdf handles the document generation and UploadThing stores it securely. The same quote can then be emailed to the client with the document link attached.

That part felt satisfying to get working end to end.

The Document Vault

One feature I'm actually proud of is the document vault. KYC documents like Aadhaar, PAN, GST just float around in WhatsApp groups and random folders. I've seen this firsthand working here. The vault gives each client a single place where all their documents live.

It's not a complex feature but it solves a real problem I've watched people struggle with daily.

Small UX Decisions That Came From Being in the Office

A lot of the smaller UX things came from just being in the office for a month. You notice things. The way people search for a client, how they compare rates, what slows them down. I tried to build for that.

Sorting, filtering, multiple views on the rate calculator so you can compare carriers side by side. Small stuff but it adds up. The whole client section also has proper CRUD with import and export from Excel and CSV, which the ops team actually needed.

50+ Commits In: Time to Add Sentry

At 50+ commits now, I'm starting to think about Sentry. Error monitoring should have gone in earlier honestly. The codebase is at a size where something breaking in production without any visibility is a real problem. The demo proved that.

I'd rather add it now before it gets harder to trace things. The saying is true — code always breaks in prod when it's going for a demo.

What Building With AI Has Taught Me

One thing I've been thinking about a lot through this build is how to work with AI properly. I use it heavily. But I've noticed it doesn't think about the bigger picture once the codebase grows.

It gives you the code for a feature but it won't tell you about loading states, layout files, whether this is going to cause a performance issue later. It gives you one big file and moves on. You have to stay on top of that yourself.

The real thinking doesn't go away just because you're not typing as much. It shifts. You have to think about state management strategy early. I went with Zustand and that was the right call, but I had to make that decision consciously before things got messy. AI won't make that call for you. It'll just give you another useState and keep going.

You can't just copy-paste your way through a growing codebase. At some point you have to get granular with the AI, think about the architecture yourself, and make the decisions it won't.

What's Next

I've been building this during my exam season. Econometrics paper tomorrow. Once exams are done I'm going back in properly.

Next up is adding tracking features and building adapters for it, which fits naturally into the adapter architecture the whole app is built on. More updates coming.