Part 1 · 2 chapters · ~15 min

The Architecture Deep-Dive, Drawn Live

The two drawings round one asked for, rehearsed for a shared screen: the application state-machine refactor in six beats with its unhappy paths and a small machine in code, and the platform picture of shell, micro-frontends, design system and BFF with a trade-off per box and a bridge to Deriv's real-time product.

2

The state-machine refactor, drawn

five minutes, six beats
  1. The problem in one sentence, before you draw anything.
  2. Before: shared flags and one impossible combination.
  3. After: states, events and guards.
  4. Unhappy paths: failure, retry with the same key, 4xx routing, timeouts, resume.
  5. Migration and result, with only numbers you measured yourself.
  6. What you would do differently, offered unprompted.
code
// keep a small, correct version ready to type or paste while sharing the screen
type State = 'business' | 'address' | 'photos' | 'guarantors' | 'income' | 'review' | 'submitting' | 'submitted' | 'failed';
type Event = { type: 'NEXT' } | { type: 'BACK' } | { type: 'SUBMIT' } | { type: 'RETRY' }
           | { type: 'SERVER_OK' } | { type: 'SERVER_ERR'; status: number; field?: string };

const order: State[] = ['business', 'address', 'photos', 'guarantors', 'income', 'review'];
const guards: Partial<Record<State, (d: Draft) => boolean>> = {
  photos: d => d.photos.length >= 2, guarantors: d => d.guarantors.every(g => g.bvnVerified),
};

function next(s: State, e: Event, d: Draft): State {
  const k = order.indexOf(s);
  switch (e.type) {
    case 'NEXT':   return k >= 0 && k < order.length - 1 && (guards[s]?.(d) ?? true) ? order[k + 1] : s;
    case 'BACK':   return k > 0 ? order[k - 1] : s;
    case 'SUBMIT': return s === 'review' ? 'submitting' : s;
    case 'SERVER_OK': return s === 'submitting' ? 'submitted' : s;
    case 'SERVER_ERR':
      if (s !== 'submitting') return s;
      return e.status >= 400 && e.status < 500 && e.field ? stepOwning(e.field) : 'failed';   // 4xx → the field's step
    case 'RETRY':  return s === 'failed' ? 'submitting' : s;                                 // same idempotency key
  }
}
rehearse it
Use Excalidraw or tldraw on a shared screen with a timer. Draw it three times. The first time takes twelve minutes and the third takes five. Practise switching from the diagram to the code above and back, because interviewers often ask "what does that look like in code?".
DRAWN LIVE: THE APPLICATION STATE MACHINE
the refactor you were asked about in round one, as you would draw it on a shared screen in five minutes
swipe the figure sideways, or tap expand for full screen
1/6
the problem
The problem, one sentence: "The application flow (business details, address, photos, guarantors, income, review, submit) was driven by scattered conditionals and flags across components, so which screen a user saw, and what data was valid, depended on a combination nobody could enumerate. Bugs came from impossible combinations."
3

The platform picture, drawn

outside in, with a trade-off for each box
  1. The shell, marking which parts you built.
  2. Micro-frontends, and their costs.
  3. The shared platform: the design system and the auth and API clients.
  4. The BFF, and why the frontend never calls services directly.
  5. Cross-cutting concerns: observability, flags, gates.
  6. The Deriv bridge: a shared real-time socket and a WebView strategy.
precision again
In round one you said "what I do mostly: build the shell, build the design systems". In the technical round, be exact about which components of the shell and the design system you built, which you contributed to, and which others owned. The Head of Frontend will ask follow-up questions on exactly those boundaries.
DRAWN LIVE: THE PLATFORM PICTURE
shell, micro-frontends, design system and a BFF, drawn in the order an interviewer can follow
swipe the figure sideways, or tap expand for full screen
1/6
the shell
Start with the user and the shell: the app shell owns routing between product areas, authentication and session, the navigation chrome and loading of each area. Draw it as the outer box. Say which parts of it you built.