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

# Quickstart

> Build and test your first dApp in under 5 minutes.

This guide walks you through creating a project, starting the development environment, and running your first tests.

## Step 1: Create a Project

Scaffold a new project from a built-in template:

```bash theme={null}
dokrypt init my-dapp --template evm-basic
```

This creates a `my-dapp/` directory with:

<Tree>
  <Tree.Folder name="my-dapp" defaultOpen>
    <Tree.File name="dokrypt.yaml" />

    <Tree.File name="foundry.toml" />

    <Tree.Folder name="contracts" defaultOpen>
      <Tree.File name="Counter.sol" />

      <Tree.File name="SimpleToken.sol" />
    </Tree.Folder>

    <Tree.Folder name="test" defaultOpen>
      <Tree.File name="Counter.t.sol" />

      <Tree.File name="SimpleToken.t.sol" />
    </Tree.Folder>

    <Tree.Folder name="scripts" defaultOpen>
      <Tree.File name="deploy.js" />
    </Tree.Folder>

    <Tree.File name="README.md" />
  </Tree.Folder>
</Tree>

<Info>
  Use `dokrypt template list` to see all 5 available templates: `evm-basic`, `evm-token`, `evm-nft`, `evm-dao`, `evm-defi`.
</Info>

## Step 2: Start the Environment

```bash theme={null}
cd my-dapp
dokrypt up
```

Dokrypt pulls the required Docker images and starts a local Anvil blockchain node:

```
Starting services...
ethereum    Ready  http://localhost:8545

Accounts (10000 ETH each):
  0x70997970C51812dc3A010C7d01b50e0d17dc79C8
  0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC
  ...

Started 1 service in 3.2s
```

Your local chain is now running at `http://localhost:8545` with 10 pre-funded accounts.

## Step 3: Check Status

```bash theme={null}
dokrypt status
```

```
Service         Status      Port   URL
ethereum (anvil)   Ready    8545   http://localhost:8545
```

## Step 4: Run Tests

```bash theme={null}
dokrypt test run
```

Dokrypt discovers and runs your Solidity tests:

```
Running test suite: contracts
  PASS  test_increment (12ms)
  PASS  test_set_number (8ms)
  PASS  test_decrement (9ms)
  PASS  test_token_transfer (15ms)

4 passed, 0 failed (44ms)
```

Add `--gas-report` for gas analysis:

```bash theme={null}
dokrypt test run --gas-report
```

## Step 5: Use Chain Utilities

While your environment is running, you can manipulate the chain:

```bash theme={null}
# Mine 10 blocks
dokrypt chain mine 10

# Time-travel 1 day into the future
dokrypt chain time-travel 1d

# Fund an address with 500 ETH
dokrypt chain set-balance 0x1234...abcd 500

# Get chain info
dokrypt chain info
```

## Step 6: Save a Snapshot

Save the current chain state so you can restore it later:

```bash theme={null}
dokrypt snapshot save clean-state --description "Fresh deployment"
```

After making changes, restore it:

```bash theme={null}
dokrypt snapshot restore clean-state
```

## Step 7: Fork Mainnet

Test against real protocol state by forking a live network:

```bash theme={null}
dokrypt fork mainnet --block 18500000
```

Now your local chain has the full state of Ethereum mainnet at block 18,500,000. You can interact with Uniswap, Aave, and any other deployed contracts.

## Step 8: Stop the Environment

```bash theme={null}
dokrypt down
```

Add `--volumes` to remove persistent data:

```bash theme={null}
dokrypt down --volumes
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Configuration" icon="gear" href="/configuration/dokrypt-yaml">
    Learn the full dokrypt.yaml configuration format.
  </Card>

  <Card title="Templates" icon="layer-group" href="/templates/overview">
    Explore DeFi, NFT, DAO, and Token templates.
  </Card>

  <Card title="Snapshots" icon="camera" href="/features/snapshots">
    Master state snapshot management.
  </Card>

  <Card title="Chain Forking" icon="code-fork" href="/features/forking">
    Fork any EVM chain for testing.
  </Card>
</CardGroup>
