frontend / README.md

Project Structure — Senior Interview Prep

1 min read index source

Project Structure — Senior Interview Prep

How to lay out a frontend codebase so it scales with the team: folder organization, monorepo shape, import boundaries, App Router patterns, and the linting/formatting baseline. The senior question is rarely “where does file X go” — it’s “what convention scales when 20 people commit to this repo daily?”

Files

# Topic
01 Feature vs layer architecture — when each wins
02 Monorepo layout — apps, packages, tooling
03 Barrels (index.ts) — when helpful, when harmful
04 Next.js App Router layout — segments, parallel routes, intercepts
05 Module boundaries — eslint-plugin-boundaries, dependency-cruiser
06 Linting and formatting — ESLint flat config, Prettier, husky, lint-staged

The senior framing

A junior asks “what should I name this folder?” A senior asks “what’s the rule that decides where any file goes, and what stops the team from breaking it?” The conventions in this folder are about:

  • Discoverability — can someone new find a file by guessing.
  • Locality — code that changes together lives together.
  • Boundaries — explicit interfaces, no cross-feature dependency creep.
  • Enforcement — lint rules + CI gates that catch violations before review.

Cross-references