# Workspace and project file structure You develop applications in the context of an Angular [workspace](guide/glossary#workspace). A workspace contains the files for one or more [projects](guide/glossary#project). A project is the set of files that comprise a standalone application or a shareable library. The Angular CLI `ng new` command creates a workspace. ng new <project_name> When you run this command, the CLI installs the necessary Angular npm packages and other dependencies in a new workspace, with a root folder named *project_name*. The workspace root folder contains workspace configuration files and a README file with generated descriptive text that you can customize. By default, `ng new` also creates an initial skeleton application, along with its end-to-end tests. The skeleton is for a simple Welcome application that is ready to run and easy to modify. This *root application* has the same name as the workspace, and the source files reside in the `src/` subfolder of the workspace. This default behavior is suitable for a typical "multi-repo" development style where each application resides in its own workspace. Beginners and intermediate users are encouraged to use `ng new` to create a separate workspace for each application. Angular also supports workspaces with [multiple projects](#multiple-projects). This type of development environment is suitable for advanced users who are developing [shareable libraries](guide/glossary#library), and for enterprises that use a "mono-repo" development style, with a single repository and global configuration for all Angular projects. To set up a mono-repo workspace, you should skip the creating the root application. See [Setting up for a multi-project workspace](#multiple-projects) below. ## Workspace configuration files All projects within a workspace share a [CLI configuration context](guide/workspace-config). The top level of the workspace contains workspace-wide configuration files. | WORKSPACE CONFIG FILES | PURPOSE | | :--------------------- | :------------------------------------------| | `node_modules/` | Provides [npm packages](guide/npm-packages) to the entire workspace. Workspace-wide `node_modules` dependencies are visible to all projects. | | `.editorconfig` | Configuration for code editors. See [EditorConfig](https://editorconfig.org/). | | `.gitignore` | Specifies intentionally untracked files that [Git](https://git-scm.com/) should ignore. | | `angular.json` | CLI configuration defaults for all projects in the workspace, including configuration options for build, serve, and test tools that the CLI uses, such as [TSLint](https://palantir.github.io/tslint/), [Karma](https://karma-runner.github.io/), and [Protractor](http://www.protractortest.org/). For details, see [Angular Workspace Configuration](guide/workspace-config). | | `package.json` | Configures [npm package dependencies](guide/npm-packages) that are available to all projects in the workspace. See [npm documentation](https://docs.npmjs.com/files/package.json) for the specific format and contents of this file. | | `package-lock.json` | Provides version information for all packages installed into `node_modules` by the npm client. See [npm documentation](https://docs.npmjs.com/files/package-lock.json) for details. If you use the yarn client, this file will be [yarn.lock](https://yarnpkg.com/lang/en/docs/yarn-lock/) instead. | | `README.md` | Introductory documentation for the root app. | | `tsconfig.json` | Default [TypeScript](https://www.typescriptlang.org/) configuration for projects in the workspace. | | `tslint.json` | Default [TSLint](https://palantir.github.io/tslint/) configuration for projects in the workspace. | ## Application project files By default, the CLI command `ng new my-app` creates a workspace folder named "my-app" and generates a new application skeleton for a root application at the top level of the workspace. A newly generated application contains source files for a root module, with a root component and template. When the workspace file structure is in place, you can use the `ng generate` command on the command line to add functionality and data to the application. This initial starter application is the *default app* for CLI commands (unless you change the default after creating [additional apps](#multiple-projects)).
Besides using the CLI on the command line, you can also use an interactive development environment like [Angular Console](https://angularconsole.com/), or manipulate files directly in the app's source folder and configuration files.
For a single-application workspace, the `src/` subfolder of the workspace contains the source files (application logic, data, and assets) for the root application. For a multi-project workspace, additional projects in the `projects/` folder contain a `project-name/src/` subfolder with the same structure. ### Application source files Files at the top level of `src/` support testing and running your application. Subfolders contain the application source and application-specific configuration. | APP SUPPORT FILES | PURPOSE | | :--------------------- | :------------------------------------------| | `app/` | Contains the component files in which your application logic and data are defined. See details [below](#app-src). | | `assets/` | Contains image and other asset files to be copied as-is when you build your application. | | `environments/` | Contains build configuration options for particular target environments. By default there is an unnamed standard development environment and a production ("prod") environment. You can define additional target environment configurations. | | `favicon.ico` | An icon to use for this application in the bookmark bar. | | `index.html` | The main HTML page that is served when someone visits your site. The CLI automatically adds all JavaScript and CSS files when building your app, so you typically don't need to add any `