> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zopio.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

> How to setup, install and run `zopio`.

## Initialization

Run the `zopio` init command:

<CodeGroup>
  ```sh npm theme={"system"}
  npx zopio@latest init
  ```

  ```sh pnpm theme={"system"}
  pnpm dlx zopio@latest init
  ```

  ```sh yarn theme={"system"}
  yarn dlx zopio@latest init
  ```

  ```sh bun theme={"system"}
  bun x zopio@latest init
  ```
</CodeGroup>

You will be prompted for the project name and package manager.

```sh Terminal theme={"system"}
$ npx zopio@latest init

┌  Let's start a `zopio` project!
│
◇  What is your project named?
│  my-app
│
◇  Which package manager would you like to use?
│  pnpm
│
◇  Project initialized successfully!
│
└  Please make sure you install the Mintlify CLI and Stripe CLI before starting the project.
```

This will create a new directory with your project name and clone the repo into it. It will run a setup script to install dependencies and copy `.env` files. You can read more about environment variables [here](/setup/env).

## Database

You will need to scaffold the database using the schema defined in `packages/database/prisma/schema.prisma`:

```sh Terminal theme={"system"}
pnpm migrate
```

For more details on the default Prisma configuration (using Neon), refer to the [Database Configuration Guide](https://docs.zopio.dev/packages/database#default-configuration).

## CMS

You will need to setup the CMS. Follow the instructions [here](/features/cms), but the summary is:

1. Fork the [`basehub/zopiolabs/zopio`](https://basehub.com/zopiolabs/zopio?fork=1) template
2. Get your Read Token from the "Connect to Your App" page
3. Add the `BASEHUB_TOKEN` to your [Environment Variables](/setup/env)

## Development

Run the development server with:

```sh Terminal theme={"system"}
pnpm dev
```

Open the localhost URLs with the relevant ports listed above to see the app, e.g.

* [http://localhost:3000/](http://localhost:3000/) — Main App.
* [http://localhost:3001/](http://localhost:3001/) — Website.
* [http://localhost:3002/](http://localhost:3002/) — API.
* [http://localhost:3003/](http://localhost:3003/) — Email Preview.
* [http://localhost:3004/](http://localhost:3004/) — Docs

For additional tools:

* [http://localhost:3005/](http://localhost:3005/) — Prisma Studio
* [http://localhost:6006/](http://localhost:6006/) — Storybook

<Tip>You can start any of the above tools independently with</Tip>

```sh Terminal theme={"system"}
 `pnpm run dev --filter <tool-name>`
```
