Customer sign-in portal
The front door to an industrial software suite. I built self-service account recovery, then re-skinned every screen around one token contract.
- Role
- Recovery flows · rebrand author
- When
- 2022–2026
- Where
- Detechtion.AI
- Platforms
- Web · Next.js · TypeScript
The unified sign-in portal in front of the company's monitoring and analytics web apps. People sign in, complete verification steps, recover a forgotten username or password, then land on a launcher showing the apps they can use. One codebase produces more than one visual theme, chosen at build time.
My part. I worked on it in two periods: building the account-recovery flows in 2022, and in 2026 re-skinning the whole portal around a single semantic token contract and fixing the rough edges that came with it. In 2022: all three recovery flows (forgot password, reset password, forgot username), their data hooks, pages and tests. In 2026: the portal-wide re-skin across all 12 routes, a shared auth-page shell and brand header, both theme token sheets and the theme-flash fix.
Core sign-in, the verification screens, the framework upgrades and all identity and federation work were built by colleagues.
Theme Forge
A fictional software suite's sign-in flow that re-skins itself from one token contract. Reproduce the wrong-theme flash, the autofill mismatch and the missing web font, then flip each one to the fix.
Loading demo…
Stories
Self-service account recovery, built and tested from scratch
All three flows landed incrementally over about six weeks, with 9 tests across the three forms, covering render, validation and submit. Teammates later generalized the forgot-password form into a shared recovery form, and the screens were re-skinned in 2026.
People using the software suite needed to recover a forgotten username or reset a password without calling support, with clear feedback at every step.
- Built three flows end to end, each with a form component, a data hook and a routed page.
- Inline validation with a hooks-based form library: required fields, password rules and confirmation matching, plus inline success and error alerts. A successful reset returns people to sign-in with a confirmation banner.
- Tried a separate schema-validation layer first, then simplified to the form library's built-in rules two days later and removed that layer.
- Covered each form with React Testing Library tests, including router mocking and async submit handling.
- Made the recovery screens theme-aware from the start, so they follow whichever visual theme a build uses.
One codebase, more than one theme and no flash
All 12 routes were re-skinned, the duplicated CSS shrank by about 270 lines and both themes come from one contract. The wrong-theme flash is gone.
After the company rebrand, all 12 screens needed a new look, and the per-page stylesheets had drifted into near-copies of each other. People also saw a brief flash of the light default theme before the dark theme loaded.
- Designed one shared set of semantic custom properties (surfaces, borders, muted greys, glow, on-primary). Each theme fills the same names with its own values, so shared components never know which theme they're in.
- Introduced a common auth-page shell and brand-header component, and moved duplicated layout rules into them.
- Traced the flash to the theme stylesheet being chosen and loaded at runtime. Moved the choice to build time with an environment-driven bundler alias, configured for both webpack and Turbopack, so the theme CSS is a static import that ships with first paint.
Red means danger, so it shouldn't also mean “continue”
Every primary action picked up the new style from a single token change, and only one component needed an edit.
Every primary action was filled in alarm red. The new design system keeps red for irreversible or high-consequence actions, and in an industrial product suite red usually means an alarm.
- Paired with an AI coding assistant to audit the app against the design system, then reviewed and prioritized the six areas of drift it surfaced.
- Retokenized the primary button to a neutral fill with its own hover and active shades, and added a destructive variant that keeps the red.
- An audit of every button showed the forms already used the semantic variant, so only the final sign-in button needed a code change. The spec allows that one to keep the accent.
The drift audit was AI-assisted. I reviewed the findings, set priorities and made the calls.
The input that looked different when autofilled
The field looks the same typed, autofilled or unfocused, and the typeface renders the same on every machine. The browser's own suggestion dropdown is native UI outside the page's control, and that limit is documented.
On the dark sign-in screen, the username field looked different depending on whether you typed, picked a browser autofill suggestion or clicked away: a different background and a slightly different font size.
- The app had no autofill styling, so the browser painted its own light treatment over the dark input. The fix repaints autofilled fields in the theme's surface colour and pins text colour and size.
- Chasing the size shift found a second, hidden cause: the brand typeface was named in the font stack but never actually loaded, so everyone without it installed got a fallback with different metrics. Proper font-face declarations fixed it.
I raised the symptom and directed the investigation; an AI coding assistant ran the searches and found both causes. I reviewed and committed the fixes.
What I took away
- Themes should differ only in values. The moment a component knows which brand it's in, you've lost.
- Do anything that has to be right on first paint at build time.
- Colour has meaning. Audit what it means, not just what hex it is.
Stack
- Front end
- Next.js (static export), TypeScript, React, React-Bootstrap, react-hook-form
- Styling
- CSS Modules, CSS custom-property tokens, Build-time theme aliases
- Quality
- Jest, React Testing Library, ESLint