All jobs / Full-stack developer / End-to-End Architecture
Full-stack developer interview question · 1–3 years
UI and API live in one repo. Both need the `Invoice` shape.
How do you share the shape?
The strongest answer
A shared package or generated types from the spec, imported by UI and API — not a pasted interface in both repos
Why it works
Exactly. The point of a monorepo (or a spec package) is one change, two compile errors. Paste is drift.
What a good answer covers
- Share or generate; do not paste.
- The spec is the language-neutral join.
- A broken typecheck on either side is the win.
- Wiki tables are not a build step.
Answers that fall short
- Close, but not the strongest: Paste the TypeScript interface into the API repo when it changes
The paste is already stale in the other pull request. - Weak: Keep types only in the UI; the API is Java / C# anyway
Different languages still share a spec. Generate both. - Red flag: A wiki table we screenshot into PRs
A wiki is not type-checked.
Who gets asked this
More End-to-End Architecture questions
- Web and iOS will read overlapping but different slices of the same customer graph. Which do you pick?
- You are launching 'scheduled send'. The API route is new; the button is new. How do you ship the flag?
- The web app must accept a large training video. How should a 200MB video get to storage?
- The page needs a user, their last three invoices and a permission set. Those live on three internal services…
- The same `/projects` powers the website and a native app that ships through an app store. How do you keep one…
- The server needs to push status updates to the browser, and the client never sends anything back on that…
- You deploy API and UI. Support still sees errors from a field you renamed. What do you assume after a deploy?
- You need to change `amount` from a string to a number. How do you version without stranding the UI?