---
title: Scaffold the app and define the schema
slug: data-platform/connect-platform/ocp-quickstart-scaffold-an-app
docTags: 
createdAt: 2026-07-23T12:53:16.000Z
---

After you [complete the prerequisites](docId\:gxEU_0AA37IEZJK-uoVcT):

1. Register the app by specifying a unique ID and name. You should also mark it as a personal app so that it does not count towards the vendor's app limit. Ensure you select `Data Platform` for the target product.

```javascript
> ocp app register
Active environment: production
App id to reserve: ocp_quickstart
Display name of the app: OCP Quickstart 
Target product for the app > Data Platform
Keep this app private and not share it with other developers in your organization: Yes
Registered app ocp_quickstart with name "OCP Quickstart" in us, au, and eu 
```

2. Scaffold the app. The `Basic Sample` template contains example code to get you started, but for now, use the `Empty Project` template. This initializes the app directory.

```javascript
> ocp app init
Active environment: production
Name of your app (e.g., My App): OCP Quickstart
ID of your app [ocp_quickstart]: ocp_quickstart
Version [1.0.0-dev.1]: 1.0.0-dev.1
App Summary (brief): Syncs offline store orders and customer data to ODP.
Support URL: https://www.acme.com/
Contact email address: me@acme.com
Select the category for the app: Testing & Utilities
Select a template project: Empty Project
Creating directory C:\Users\me\ocp-apps\ocp_quickstart
Performing initial Yarn install
...
```

3. Open it in your preferred editor and run `git init` to prepare the environment.

## Define the schema

Optimizely Data Platform (ODP) comes with pre-defined objects (database tables) you can work with, such as **Customers** and **Products**. However, the data model for this app does not quite fit ODP's pre-defined model, so you need to add custom objects and fields. To do this, [define a schema](docId\:jkvJViw_1GsOowIRu6oja) in `src/schema/`. All `.yml` files within refer to objects in ODP.

1. Define a new identifier, `ocp_quickstart_clubcard_id`, in the ODP **Customers** object (including its creation date). You must prepend the app's ID to custom field names. The `src/schema/customers.yml` file should look like the following:

```javascript
name: customers
identifiers:
  - name: ocp_quickstart_clubcard_id
    display_name: OCP Quickstart Clubcard ID
    merge_confidence: high
fields:
  - name: ocp_quickstart_clubcard_creation_date
    type: timestamp
    display_name: OCP Quickstart Clubcard Creation Date
    description: Creation date of this Customer's Clubcard
```

2. Also create an **Offline Stores** custom object, with ID marked as a primary key. Because it is a custom object, prepend the app ID to its name. The `src/schema/ocp_quickstart_offline_stores.yml` file should look like the following:

```javascript
name: ocp_quickstart_offline_stores
display_name: OCP Quickstart Offline Stores
fields:
  - name: ocp_quickstart_offline_store_id
    type: string
    display_name: OCP Quickstart Offline Store ID
    description: ID of the Offline Store
    primary: true
  - name: ocp_quickstart_offline_store_name
    type: string
    display_name: OCP Quickstart Offline Store Name
    description: The name of the Offline Store
  - name: ocp_quickstart_offline_store_location
    type: string
    display_name: OCP Quickstart Offline Store Location
    description: Where the Offline Store is located
```

3. Finally, add an association between the **Orders** and **Offline Stores** objects. The `src/schema/orders.yml` file should look like the following:

```javascript
name: orders
fields:
  - name: ocp_quickstart_offline_store_id
    type: string
    display_name: OCP Quickstart Order Offline Store ID
    description: The Quickstart Offline Store this Order originated from
relations:
  - name: ocp_quickstart_offline_store
    display_name: OCP Quickstart Offline Store
    child_object: ocp_quickstart_offline_stores
    join_fields:
      - parent: ocp_quickstart_offline_store_id
        child: ocp_quickstart_offline_store_id
```

4. Confirm your schema is valid by running `ocp app validate` in the Connect Platform for ODP command-line interface (CLI).

Next, [install and test your app in the ODP sandbox](docId\:tUh_6y2N56IV32TOFTZj9).
