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

# Installation

> Create and run a new mf² project.

Complete the [Prerequisites](/setup/prerequisites) first.

## Scaffold the project

```bash theme={null}
bunx create-mf2-app my-app
cd my-app
```

The CLI installs dependencies for you.

## Initialize Convex

```bash theme={null}
bunx convex dev
```

Follow the prompts to create or link a Convex project. This watches your backend code and pushes changes automatically.

## Configure environment variables

The CLI already created `.env.local` and `.env.production` from each `.env.example` when it scaffolded the project. Fill in API keys as you need them; a blank value simply disables that integration. Run `bun run env:check` to see which keys are still blank. See [Environment Variables](/setup/env).

## Start development

<Tip>
  No keys are required to start. Integrations (Stripe, PostHog, email, CMS, etc.) gracefully degrade when not configured, so you can add them later as needed.
</Tip>

```bash theme={null}
bun run dev
```

All apps start in parallel:

| App       | URL                                            |
| --------- | ---------------------------------------------- |
| App       | [http://localhost:3000](http://localhost:3000) |
| Web       | [http://localhost:3001](http://localhost:3001) |
| API       | [http://localhost:3002](http://localhost:3002) |
| Email     | [http://localhost:3003](http://localhost:3003) |
| Docs      | [http://localhost:3004](http://localhost:3004) |
| Storybook | [http://localhost:6006](http://localhost:6006) |

To run a single app:

```bash theme={null}
bun run dev --filter=app
```

Replace `app` with `web`, `api`, `docs`, `email`, or `storybook`.

### Mobile

```bash theme={null}
cd apps/mobile && bunx expo start
```

### Desktop

```bash theme={null}
cd apps/desktop && bun run dev
```
