mohd-faraz

_blogs

// blogs / 20260511.md

Dev Log: May 11 Wrap-up

2026-05-11
#FullStack#Auth#Firebase#API#Frontend

Overview

Today was all about closing the loop on the registration portal. I spent most of my time building out the bridge between the admin dashboard and the user-facing forms, making sure the data flows correctly from an invite email to a saved record in the database.

What I Worked On

Building the Admin Command Center

I spent a good chunk of the morning getting the admin side of the backend into shape. I needed a way to manage global portal settings and, more importantly, a way to see who has actually registered. I built out a few REST API endpoints to handle fetching registration lists and updating statuses.

One of the more satisfying parts was automating the user creation process. Now, when an admin sends out an invitation form via email, the system automatically provisions a temporary user in our authentication provider. If the user already exists, it just handles it gracefully rather than crashing. It’s one of those "hidden" features that makes the admin’s life much easier.

Refining the Registrant Flow

Once the admin side could send invites, I had to make sure the receiving end worked. I implemented a new flow where users can submit their specific details via a public endpoint. The logic looks up their registration by email, updates their record, and moves their status to "Details Received." It sounds simple, but getting the database queries to be both secure and efficient took a bit of back-and-forth.

Smoothing out the Frontend & Auth

On the frontend, things were getting a bit messy with how we tracked user state. I updated the main app logic to better handle user roles and unique identifiers.

I also finally tackled the refresh token logic. There’s nothing more annoying than being logged out in the middle of a task because a token expired. I added an interceptor that catches 401 Unauthorized errors and automatically attempts to swap a refresh token for a new session. It makes the whole experience feel a lot more robust. I also tweaked the routing to use hash-based navigation more reliably—it's a bit old-school, but it keeps the state in sync without a lot of overhead.

Wrapping Up

The core plumbing is mostly there now. It's starting to feel like a real product rather than just a collection of scripts. Tomorrow, I'll probably dive deeper into the form validation and maybe some UI polish for the dashboard.