Skip to main content

Build with Codex

Prerequisites

Install Codex

Desktop app

Codex is part of the ChatGPT desktop app.

  1. Download the ChatGPT desktop app (opens in a new tab) for macOS, Windows, or Linux.
  2. Open the app and sign in with your ChatGPT account. You can also use Codex with an OpenAI API key, but some features might not be available.
  3. Select Codex from the ChatGPT dropdown.

CLI

  1. Install the Codex CLI using one of the methods in the Codex CLI documentation (opens in a new tab).
  2. Run codex in your terminal and sign in.
  3. Confirm that the CLI works before you start your DataDoe build.

Build with Codex

Desktop app

  1. Open the ChatGPT desktop app and select Codex.
  2. Open the folder where you want the project, then select New chat.
  3. Copy the prompt text from the CLI section, between cat << 'EOF' and EOF, and paste it into the message box.
  4. Set DATADOE_API_KEY in your .env file before the agent runs API calls.
  5. Review the generated code and run the app locally.

CLI

  • Open a bash-compatible terminal in the folder where you want the project. On Windows, use WSL or Git Bash.
  • Copy this command and run it in your terminal.
shell
1codex "$(
2    cat << 'EOF'
3Task:
4Build a clean, interactive Amazon sales dashboard using the DataDoe API.
5The dashboard should analyze the latest 30 days and compare them against the previous 30 days.
6
7Requirements:
8- Allow selection of a single seller from a seller list
9- Display sales, traffic, ads, and profitability data for the selected seller
10- Show current period, previous period, absolute delta, and % delta
11- Include KPI cards and simple comparison/trend charts
12- Use real API data only
13- Inspect the API docs first to identify the correct endpoints and fields
14- Strictly follow all agent instructions provided in the API documentation
15- Store `DATADOE_API_KEY` in a `.env` file; do not expose it in code or chat logs and don't ask user to provide it via chat message
16- If exact metrics are unavailable, use the closest available fields and clearly note assumptions
17- Handle missing data and API errors gracefully
18- Keep the UI simple, clean, and easy to read
19- Separate data fetching, transformation, and presentation logic
20Testing & Validation:
21- Use `curl` to verify API connectivity and inspect response structures before implementing the UI
22- Ensure the application builds successfully and the dev server starts without errors
23- Fix any linter or TypeScript errors introduced during development
24
25Include at minimum:
26- Sales: total sales, units sold, orders, average order value
27- Traffic: sessions, page views, conversion rate
28- Ads: ad spend, ad sales, ROAS, ACOS/TACOS if available
29- Profitability: gross profit, net profit if available, margin %
30
31Deliver:
32- A working dashboard
33- Clean, maintainable code
34- Brief setup instructions
35- A short explanation of the API endpoints used and any assumptions made
36
37Tech Stack:
38- React, TypeScript, Tanstack Router, Tanstack Start, Tanstack Query, ShadcnUI, Tailwind CSS, Yarn
39
40Data source:
41https://api.datadoe.com/api/v1/docs/json
42Read the prompt now and ask user if you should continue building the app.
43EOF
44)"
  • Set DATADOE_API_KEY in your .env file before the agent runs API calls.
  • Review the generated code and run the app locally.

Generated app

This example was generated with the GPT 5.4 medium model:

Helpful resources