> ## 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.

# Project configuration

Our PDK generators will accept a Patchwork project configuration file as input and will generate the same name solidity contract as output in the current working directory.

Here's an example Patchwork project configuration:

```typescript patchwork.config.ts theme={null}
import { Feature, FunctionConfig, ProjectConfig } from "@patchworkdev/common/types";

const exampleConfig: ProjectConfig = {
    name: "ExampleProjectConfig",
    scopes: [
        {
            name: "test",
            owner: "0x222222cf1046e68e36E1aA2E0E07105eDDD1f08E",
            whitelist: true,
            userAssign: false,
            userPatch: false,
            bankers: ["0x000000254729296a45a3885639AC7E10F9d54979", "AccountPatch"],
            operators: ["0x000000111129296a45a3885639AC7E10F9d54979", "AccountPatch"],
        }
    ],
    contracts: {
        AccountPatch: {
            scopeName: "test",
            name: "AccountPatch",
            symbol: "AP",
            baseURI: "https://mything/my/",
            schemaURI: "https://mything/my-metadata.json",
            imageURI: "https://mything/my/{tokenID}.png",
            fields: [
                {
                    id: 1,
                    key: "name",
                    type: "char32",
                    description: "Name",
                    functionConfig: FunctionConfig.ALL,
                },
                {
                    id: 2,
                    key: "patches",
                    type: "literef",
                    description: "Contract2",
                    arrayLength: 4,
                }
            ],
            features: [Feature.ACCOUNTPATCH],
            fragments: ["SecondContract"]
        },
        SecondContract: {
            scopeName: "test",
            name: "SecondContract",
            symbol: "SC",
            baseURI: "https://mysecondthing/my/",
            schemaURI: "https://mysecondthing/my-metadata.json",
            imageURI: "https://mysecondthing/my/{tokenID}.png",
            fields: [
                {
                    id: 1,
                    key: "description",
                    type: "char32",
                    description: "Description",
                    functionConfig: FunctionConfig.ALL,
                }
            ],
            features: [Feature.PATCH, Feature.FRAGMENTSINGLE],
            fragments: []
        }
    },
    plugins: [{ name: "ponder" },{ name: "react" }],
};

export default exampleConfig;

```

From this file, we can generate Solidity boilerplate, indexer schemas, React hooks and more.

## Project configuration

| Name                | Description                    |
| ------------------- | ------------------------------ |
| `name`              | The name of your app           |
| `scopes`            | Scope configuration records    |
| `contracts`         | Contract configuration records |
| `contractRelations` | Contract relations records     |
| `networks`          | Network configuration records  |

## Contract configuration

| Name        | Description                        |
| ----------- | ---------------------------------- |
| `scopeName` | The scope name of the contract     |
| `name`      | The ERC-721 Name of the contract   |
| `symbol`    | The ERC-721 symbol of the contract |
| `baseURI`   | The base URI                       |
| `schemaURI` | The schema URI                     |
| `imageURI`  | The image URI                      |
| `features`  | List of features                   |
| `fields`    | List of fields                     |

### Contract fields

| Name          | Description                                                            |
| ------------- | ---------------------------------------------------------------------- |
| `id`          | The field ID (must be unique)                                          |
| `key`         | The field key (must be unique)                                         |
| `type`        | The field Type (Must be in field type enum)                            |
| `arrayLength` | The array length (1 is default, 0 is dynamic and >1 is a static array) |
| `description` | The field description                                                  |

### Contract field types

| Name      | Description                                         |
| --------- | --------------------------------------------------- |
| `boolean` | A boolean type (true or false)                      |
| `int8`    | An 8-bit signed integer.                            |
| `int16`   | A 16-bit signed integer.                            |
| `int32`   | A 32-bit signed integer.                            |
| `int64`   | A 64-bit signed integer.                            |
| `int128`  | A 128-bit signed integer.                           |
| `int256`  | A 256-bit signed integer.                           |
| `uint8`   | An 8-bit unsigned integer.                          |
| `uint16`  | A 16-bit unsigned integer.                          |
| `uint32`  | A 32-bit unsigned integer.                          |
| `uint64`  | A 64-bit unsigned integer.                          |
| `uint128` | A 128-bit unsigned integer.                         |
| `uint256` | A 256-bit unsigned integer.                         |
| `char8`   | An 8-character string (64 bits).                    |
| `char16`  | A 16-character string (128 bits).                   |
| `char32`  | A 32-character string (256 bits).                   |
| `char64`  | A 64-character string (512 bits).                   |
| `bytes8`  | A fixed-length byte array of 8 bytes (64 bits).     |
| `bytes16` | A fixed-length byte array of 16 bytes (128 bits).   |
| `bytes32` | A fixed-length byte array of 32 bytes (256 bits).   |
| `literef` | A 64-bit Literef reference to a patchwork fragment. |
| `address` | A 160-bit address.                                  |
| `string`  | A dynamically-sized string.                         |

### Contract features

| Name             | Description                  |
| ---------------- | ---------------------------- |
| `FRAGMENTMULTI`  | A multi-assignable fragment  |
| `FRAGMENTSINGLE` | A single-assignable fragment |
| `PATCH`          | A 721 patch                  |
| `PATCHACCOUNT`   | An account patch             |
| `PATCH1155`      | An 1155 patch                |
| `MINTABLE`       | Mintable                     |
| `REVERSIBLE`     | Reversible (patch)           |
