Back to Architecture Explorer

microsoft / vscode

Visual Studio Code - Code editing. Redefined.

165.0k
TypeScript
Architecture: electron-app
main
vscode
.github
build
lib
windows
darwin
linux
extensions
cpp
css-language-features
emmet
git
html-language-features
typescript-language-features
src
vs
base
browser
common
node
worker
editor
platform
workbench
test
automation
integration
smoke
package.json
yarn.lock
Structural Architecture

VSCode is a massive Electron-based application structured around a highly generalized dependency injection container. Its structure meticulously splits the codebase into 'base', 'platform', 'editor', and 'workbench' layers to enforce unidirectional dependencies across its millions of LOC.

  • Unidirectional layering: 'base' → 'platform' → 'editor' → 'workbench'.
  • Target environment scoping using specific file suffixes (e.g. *.browser.ts, *.electron.ts).
  • Deeply integrated dependency injection core.

Notable Directories

/src/vs/base

Fundamental utilities with no external dependencies.

/src/vs/platform

Services used across both the UI and the node environment.

/src/vs/editor

The Monaco editor core implementation.

/src/vs/workbench

The full IDE shell wrapping the editor with views and sidebars.

/extensions

Over 80 built-in default extensions.

Build Your Own Ecosystem

Learn from vscode's structure and craft your own software scaffolding.