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

# Deploying your first app

> Build and launch a simple Patchwork app on Base Sepolia in less than 5 minutes.

<Steps>
  <Step title="Build a Project Config File">
    <Tip>Need help designing your config? Head to [https://wizard.patchwork.dev](https://wizard.patchwork.dev) to build it with a visual editor, or even better, let AI build it for you from a description of how you'd like your app to work.</Tip>

    Example: `patchwork.config.ts`

    ```typescript theme={null}
    import { ProjectConfig } from "@patchworkdev/common/types";

    const rizzlerProjectConfig: ProjectConfig = {
    name: "RizzlerProject",
    scopes: [
        {
            name: "rizzler",
            whitelist: true,
            userAssign: false,
            userPatch: false,
        }
    ],
    contracts: {
        "Rizzler": {
            scopeName: "rizzler",
            name: "Rizzler",
            symbol: "RZLR",
            baseURI: "https://rizzco/",
            schemaURI: "https://rizzco/rizzler-schema.json",
            imageURI: "https://rizzco/assets/{tokenID}.png",
            fields: [
                {
                    id: 1,
                    key: "shortname",
                    type: "char16",
                    description: "Short Name"
                },
                {
                    id: 2,
                    key: "count",
                    type: "uint64",
                    description: "Rizz Count"
                },
                {
                    id: 3,
                    key: "rizz",
                    type: "uint64",
                    description: "Rizz Level"
                }
            ],
            features: []
        }
    }
    };

    export default rizzlerProjectConfig;

    ```
  </Step>

  <Step title="Use PDK to generate your app's contracts">
    ```shell theme={null}
    pdk generate contracts patchwork.config.ts
    ```
  </Step>

  <Step title="Customize">
    Use your favorite editor or IDE to customize your generated Solidity contracts, adding any logic your app requires.
    <Tip>For each contract section in your config, there will be two contracts generated (e.g., Rizzler.sol, and RizzlerGenerated.sol). We recommend putting custom logic and method overrides in the contract without the Generated suffix, as this won't get overwritten when the generators are rerun.</Tip>
  </Step>

  <Step title="Build Contracts">
    ```shell theme={null}
    pdk generate contractBuild patchwork.config.ts
    ```
  </Step>

  <Step title="Deploy server-side resources">
    Deploy the generated schema files where the SchemaURI points to and set up any graphical assets.
  </Step>

  <Step title="Generate contract deploy script">
    ```shell theme={null}
    pdk generate deployScripts
    ```
  </Step>

  <Step title="Deploy to Base Sepolia">
    ```shell theme={null}
    OWNER=<your-wallet-address> PATCHWORK_PROTOCOL=0x5fCa9f36772CE35bFbD3Cc75E854F0bEBDDD1ed4 TRY_DEPLOY=true forge script --optimize --optimizer-runs=200 -vvv RizzlerProject-deploy.s.sol --rpc-url https://sepolia.base.org --private-key <your-private-key> --broadcast
    ```

    <Warning>For test deployments, use a testnet only private key that doesn't control any valuable mainnet assets. For prodcution deployments, it is recommended to deploy with a hardware wallet add a line to the end of the deployment script that transfers contract ownership to a safe as the final deployment step.</Warning>
    <Tip>v2 of Patchwork Protocol is deployed at `0x00000000001616E65bb9FdA42dFBb7155406549b` on Base and Sepolia. It is deployed to `0x5fCa9f36772CE35bFbD3Cc75E854F0bEBDDD1ed4` on Base Sepolia.</Tip>
  </Step>
</Steps>

Congrats! You've deployed your first Patchwork App! Need help generating the rest of your app's frontend and backend services? Head over to the [create-patchwork docs](/pdk/overview).
