Introduction to WebStorm Project Management
WebStorm, JetBrains' flagship JavaScript IDE, is more than just a code editor — it is a full-fledged project management environment designed to help developers organize, configure, and ship modern web applications efficiently. Whether you are working on a small single-page application or a large monorepo with dozens of packages, WebStorm provides a unified workspace where files, dependencies, version control, build tools, and run configurations all live together in a coherent structure.
This tutorial walks through everything you need to know about managing projects in WebStorm, from creating your first project to advanced techniques like multi-module setups, workspace sharing, and integration with modern toolchains such as npm, Yarn, pnpm, Vite, and Git.
What Is WebStorm Project Management?
At its core, a WebStorm project is a folder on your filesystem that the IDE treats as a self-contained unit of work. WebStorm associates this folder with a set of metadata stored in a hidden .idea directory. This metadata includes project structure, code style settings, run configurations, version control mappings, and plugin-specific configuration.
Project management in WebStorm refers to the set of tools and workflows the IDE provides to:
- Create, open, and import projects from various sources
- Configure project structure, SDKs, and language services
- Manage dependencies through package managers
- Set up and share run/debug configurations
- Integrate version control systems like Git
- Organize large codebases with modules and workspaces
- Share settings across teams for consistency
Why Project Management Matters
Many developers treat their IDE as a glorified text editor, but leveraging WebStorm's project management capabilities delivers concrete benefits:
- Reproducibility: Shared run configurations and code styles mean every teammate runs the project the same way.
- Speed: Properly configured indexing, excluded folders, and language services keep the IDE responsive even on large codebases.
- Accuracy: Correct module resolution and dependency awareness power reliable autocompletion, refactoring, and navigation.
- Onboarding: A well-structured project lets new contributors clone, open, and run code in minutes.
- Integration: Built-in Git, test runners, and build tools reduce context switching between terminal and editor.
Creating and Opening Projects
Creating a New Empty Project
To create a new project, go to File > New > Project. WebStorm offers several templates including Empty Project, React, Vue, Next.js, and Node.js apps. For full control, choose Empty Project and add tooling manually.
After creation, WebStorm generates the .idea folder. A typical structure looks like this:
my-project/
├── .idea/
│ ├── misc.xml
│ ├── modules.xml
│ ├── vcs.xml
│ ├── workspace.xml
│ └── my-project.iml
├── src/
│ └── index.js
└── package.json
The .iml file is the module descriptor. It describes source roots, excluded folders, and SDK bindings. Here is a simplified example:
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/node_modules" />
<excludeFolder url="file://$MODULE_DIR$/dist" />
</content>
</component>
</module>
Opening an Existing Project
Use File > Open and select the project root folder. WebStorm detects the project type by inspecting package.json, tsconfig.json, framework config files, and existing .idea metadata. If the folder already contains a .idea directory, WebStorm reuses those settings; otherwise it creates fresh metadata.
Importing from Version Control
Choose File > New > Project from Version Control. Paste a Git URL and WebStorm clones the repository and opens it as a project in one step. This is the fastest path for joining an existing codebase.
Configuring Project Structure
Project Structure Dialog
Open File > Project Structure (or press Ctrl+Alt+Shift+S). Here you can configure:
- Project SDK: The Node.js interpreter used for running and debugging.
- Modules: Source roots, test roots, resource roots, and excluded folders.
- Facets: Framework-specific configuration like TypeScript, Vue, or Angular.
- Artifacts: Build outputs (less common in JS projects but useful for bundling).
Marking Folders
Right-click any folder in the Project tool window and choose Mark Directory as:
- Sources Root: Treated as the root of your source tree.
- Test Sources Root: Marked for test files; excluded from production indexing rules.
- Resources Root: Files here are resolved relative to this folder.
- Excluded: Skipped by indexing — essential for
node_modules,dist, andbuildfolders.
Excluding heavy folders is one of the most impactful performance optimizations. A typical exclude list:
node_modules/
dist/
build/
coverage/
.next/
.nuxt/
.cache/
*.log
Managing Node.js and Package Managers
Selecting the Node.js Interpreter
Go to Settings > Languages & Frameworks > Node.js. Choose a system Node.js install or a version manager path such as nvm, fnm, or volta. WebStorm displays the selected version in the status bar for quick reference.
Package Manager Configuration
WebStorm supports npm, Yarn (Classic and Berry), and pnpm. Configure the default under Settings > Languages & Frameworks > Node.js. You can also override per-project by editing package.json:
{
"name": "my-app",
"version": "1.0.0",
"packageManager": "pnpm@8.15.0",
"scripts": {
"dev": "vite",
"build": "vite build",
"test": "vitest"
}
}
WebStorm reads the packageManager field and uses the correct binary for install and run actions in the npm tool window.
Installing Dependencies
Right-click package.json and choose Run 'npm install', or use the npm tool window to search and install packages interactively. WebStorm also highlights missing dependencies and offers a quick-fix to install them.
Run and Debug Configurations
Creating Run Configurations
Run configurations define how your project is executed. Click the dropdown in the top-right toolbar and select Edit Configurations. Common types include:
- npm: Runs a script defined in
package.json. - Node.js: Runs a specific JS/TS file with arguments.
- JavaScript Debug: Attaches the debugger to a browser URL.
- Vite/Vue/Next.js: Framework-aware templates.
- Compound: Runs multiple configurations together.
Example npm run configuration equivalent in the run config XML (.idea/runConfigurations/dev.xml):
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="dev" type="js.build_tools.npm">
<package-json value="$PROJECT_DIR$/package.json" />
<command value="run" />
<scripts>
<script value="dev" />
</scripts>
<node-interpreter value="project" />
<package-manager value="pnpm" />
</configuration>
</component>
Sharing Run Configurations
By default, run configurations are stored locally. To share them with your team, check Store as project file in the configuration dialog. WebStorm writes the file under .idea/runConfigurations/ so it can be committed to version control.
Debugging Node.js Applications
Set breakpoints by clicking in the gutter next to a line of code. Use a Node.js run configuration with the --inspect flag (WebStorm handles this automatically when you click Debug). The debugger pauses at breakpoints and exposes variables, call stack, and watches.
Version Control Integration
Binding a Git Repository
When you open a folder containing a .git directory, WebStorm automatically enables Git integration. Verify under Settings > Version Control. For multi-repo projects, you can bind multiple directories using the + Add button.
Common Git Workflows
- Commit:
Ctrl+Kopens the Commit tab with a diff view and commit message field. - Push:
Ctrl+Shift+Kpushes committed changes. - Pull:
Ctrl+Tupdates the local branch. - Branches: Click the branch name in the status bar to switch, create, or rebase.
- History: Right-click a file and choose
Git > Show Historyfor a per-file log.
Handling Merge Conflicts
WebStorm provides a three-way visual merge tool. When a conflict occurs, the IDE highlights conflicting sections and lets you accept yours, theirs, or merge manually with a side-by-side editor.
.gitignore for WebStorm Projects
Commit shared configuration but ignore machine-specific files:
# WebStorm
.idea/
*.iml
.idea/workspace.xml
.idea/tasks.xml
.idea/usage.statistics.xml
.idea/shelf/
.idea/httpRequests/
# Keep shared run configs and code styles
!.idea/runConfigurations/
!.idea/codeStyles/
!.idea/inspectionProfiles/
Working with TypeScript
If your project includes a tsconfig.json, WebStorm uses the TypeScript language service for type checking, navigation, and refactoring. Enable the service under Settings > Languages & Frameworks > TypeScript.
A typical tsconfig.json for a Vite project:
{
"compilerOptions": {
"target": "ES2020",
"module": "ESNext",
"moduleResolution": "bundler",
"strict": true,
"jsx": "preserve",
"baseUrl": ".",
"paths": {
"@/*": ["src/*"]
}
},
"include": ["src"]
}
WebStorm respects the paths alias, so imports like import { foo } from '@/utils' resolve correctly in navigation and autocompletion.
Multi-Module and Monorepo Projects
Attaching Multiple Projects
For monorepos, open the root folder and use File > Attach to add sub-projects. Each attached project retains its own .idea configuration but appears in the same Project tool window. This is useful for full-stack setups with separate frontend and backend folders.
Workspace Configuration
For pnpm workspaces, define pnpm-workspace.yaml:
packages:
- 'apps/*'
- 'packages/*'
WebStorm detects the workspace and resolves cross-package imports automatically, including TypeScript project references when configured in each package's tsconfig.json.
TypeScript Project References
{
"files": [],
"references": [
{ "path": "./tsconfig.app.json" },
{ "path": "./tsconfig.node.json" }
]
}
With references in place, WebStorm provides accurate type information across the entire monorepo without manual path mapping.
Code Style and Inspections
Sharing Code Styles
Configure formatting under Settings > Editor > Code Style. Export the scheme as a project-level file so it lives in .idea/codeStyles/ and can be committed. Alternatively, integrate with Prettier and ESLint for tool-based consistency.
ESLint Integration
Enable ESLint under Settings > Languages & Frameworks > JavaScript > Code Quality Tools > ESLint. WebStorm highlights issues inline and offers quick-fixes. A modern flat config example:
// eslint.config.js
import js from '@eslint/js';
import tseslint from 'typescript-eslint';
export default [
js.configs.recommended,
...tseslint.configs.recommended,
{
rules: {
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'warn'
}
}
];
Prettier Integration
Under Settings > Languages & Frameworks > JavaScript > Prettier, point to the project's Prettier package and enable On code reformat. WebStorm then delegates formatting to Prettier, ensuring parity with CI checks.
Performance and Indexing
Large projects can slow WebStorm if not configured properly. Key optimizations:
- Exclude generated and dependency folders from indexing.
- Disable unused plugins under
Settings > Plugins. - Increase the IDE heap size in
Help > Change Memory Settings. - Use scoped inspections rather than whole-project analysis.
- Pause indexing during heavy Git operations if needed.
A recommended memory setting for large monorepos:
-Xmx4096m
-XX:ReservedCodeCacheSize=512m
Best Practices
- Commit shared IDE config: Keep
.idea/runConfigurations,.idea/codeStyles, and.idea/inspectionProfilesin version control. Ignoreworkspace.xmland other machine-specific files. - Use project-level settings: Prefer project-scoped code styles and inspection profiles over IDE-level (global) settings so configuration travels with the repo.
- Standardize the package manager: Pin the package manager version in
package.jsonusing thepackageManagerfield and enable Corepack where applicable. - Automate via scripts: Define
dev,build,test,lint, andformatscripts inpackage.jsonso run configurations stay simple and portable. - Keep dependencies indexed correctly: Run installs through the IDE or terminal so WebStorm picks up changes and re-indexes
node_modulestype definitions. - Leverage Live Templates: Create custom snippets for repetitive code and share them via the
Settings > Editor > Live Templatesexport feature. - Use Scopes: Define custom scopes (e.g., "frontend only", "tests only") to limit searches, inspections, and refactoring to relevant subsets of the codebase.
- Regularly update the IDE: WebStorm releases bring performance improvements and framework support. Use the Toolbox App for seamless updates.
Conclusion
Effective project management in WebStorm transforms the IDE from a passive editor into an active partner in your development workflow. By thoughtfully configuring project structure, package managers, run configurations, version control, and shared settings, you create a workspace that is fast, reproducible, and friendly to new contributors. The investment in setting up these foundations pays off every day through better autocompletion, reliable refactoring, smoother debugging, and a consistent experience across your entire team. Start with the basics — correct folder marking, a clean .gitignore, and shared run configurations — then layer in advanced features like monorepo support, custom scopes, and live templates as your project grows.