# Prepare your monorepo https://www.sanity.io/learn/course/day-one-with-sanity-studio/prepare-your-monorepo.md Setup a PNPM workspace to more efficiently move through the rest of this course while developing multiple applications. Sanity is much more than a CMS, and Sanity Studio is just one part of the Content Operating System. Before creating more Sanity-driven applications, let's configure your project files in a way that will better suit the rest of the course material. Putting multiple applications into a "monorepo" is a popular way of colocating separate-but-related applications. Configuring a PNPM workspace is a popular standard for monorepos and allows you to install dependencies or start development servers across a number of applications with a single command. 1. Read more about [PNPM workspaces in their documentation](https://pnpm.io/workspaces). ## Create config files The following files are the minimum you need to create a PNPM workspace. 1. **Create** a `package.json` file at the root of the project ```json:package.json { "name": "day-one-content-operations", "private": true, "version": "1.0.0", "description": "Day One Content Operations", "scripts": { "dev": "pnpm run --parallel dev", "build": "pnpm run --parallel build" }, "engines": { "node": ">=20.0.0", "pnpm": ">=10.0.0" } } ``` 1. **Create** a `pnpm-workspace.yaml` file at the root of the project ```yaml:pnpm-workspace.yaml packages: - "apps/*" ``` 1. **Create** a `README.md` file at the root of the project ```markdown:README.md # Day One Content Operations Applications developed while following lessons on sanity.io/learn ``` 1. **Create** a `.gitignore` file at the root of the project ```text:.gitignore node_modules ``` You can now run the following command from the root (`day-one`) directory to install dependencies across multiple applications: ```sh # in the root directory pnpm install ``` Or run the following to concurrently run the development servers for all your applications: ```sh # in the root directory pnpm run dev ``` You only have one application now, but you will create a second one in the next lesson. ## Reset git While this course will not teach you how to use git, it is expected that you would check this project into a repository and push changes as you work through stages. 1. If you're entirely new to Git, Epic Web has a [free Git Fundamentals tutorial](https://www.epicweb.dev/tutorials/git-fundamentals), which will get you up to speed with the basics. When the Sanity CLI created the `apps/studio` directory it had git already initialized. But you'll want to version control all files in this monorepo from the root. Without the following steps the `apps/studio` directory would be a "git submodule" and this is a world of complexity and pain for which neither you or I have the appetite for. 1. **Run** the following command to remove the `.git` directory from the `apps/studio` directory ```sh # from the "day-one" directory rm -rf apps/studio/.git ``` 1. **Run** the following command to initialize git at the root ```sh git init ``` You should now link your local directory to a remote repository using the provider (GitHub, BitBucket, etc) of your choice. In the following lessons this course assumes you'll also be a good developer citizen and work in branches, not just force-push all your work to main. The foundation is set, let's add our second app to this monorepo in the following lesson.