# gptechday/openai-academy-customgpts architecture

> Architecture diagram of the GitHub repository gptechday/openai-academy-customgpts, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gptechday/openai-academy-customgpts
- Repository: https://github.com/gptechday/openai-academy-customgpts

## Overview

##### Project type and purpose
- This is a tutorial repository (“OpenAI Academy: Custom GPTs Tutorial”) composed of multiple sample Custom GPT projects (citeright, routesmart, taxsavvy, mealmuse) plus a sample_app demonstrating end‐to‐end integration.
- Purpose: teach developers how to create, configure, and deploy GPT-powered applications that call external APIs via OpenAI’s platform and OpenAPI specs.

##### File structure
- Top-level directories:
– citeright, routesmart, taxsavvy, mealmuse: each contains
– readme.md (module overview)
– instructions_*.md (GPT prompt/instruction templates)
– *_openapi.yaml (external API definitions: Crossref, Google Routes, Pinecone, Spoonacular)
– privacy_policy.md
– sample_app: contains sample prompts, OpenAPI spec for the “official_joke_api.yaml,” plus fallback instructions and a text‐only UI demo.
- Root‐level docs: additional engineering & prompt-pattern guides, addenda, license.

##### README
- Confirms that each subdirectory is a distinct Custom GPT example illustrating a real-world integration (citations, routing, tax search, meal planning).
- sample_app shows how to wire a Custom GPT into a web/mobile interface.
- No single monolith—each module is self-contained.

a. Main components:
- Developer workstation / Git repository (this tutorial repo)
- OpenAI Platform / Custom GPT hosting service
- Custom GPT modules (CiteRight, RouteSmart, TaxSavvy, MealMuse)
- External APIs & services (Crossref, Google Routes API, Pinecone vector DB + IRS docs, Spoonacular recipe API, Official Joke API)
- Sample Application (UI layer calling OpenAI API + fanning out to specific GPT modules)
b. Relationships & data flows:
1. Developer clones repo → builds or configures each module via instructions and OpenAPI specs.
2. Modules (hosted on OpenAI) receive end‐user prompts via the OpenAI API.
3. Each module’s action layer invokes its respective external API using the OpenAPI specs.
4. External service returns data → module formats & returns via GPT response.
5. sample_app UI calls the OpenAI API, routes queries to the appropriate custom GPT module, renders results to end users.
c. Architectural patterns & design principles:
- Modularity: each GPT module is isolated, versioned, and independently deployable.
- API‐first: external service interactions are defined via OpenAPI, ensuring clear contracts.
- Separation of concerns: prompt logic and API wiring live in instructions_*.md and *.yaml, UI logic lives in sample_app.
- Scalability: adding a new module simply means adding another folder with the same pattern.
d. Key technologies & frameworks:
- OpenAI API & Custom GPT hosting portal
- OpenAPI (YAML) for external service definitions
- Pinecone vector database (taxsavvy)
- External REST APIs: Crossref, Google Routes, Spoonacular, Official Joke
- Markdown for instruction templates & privacy policies

##### Detail orientation
- Module’s internal structure only if needed: prompt template → action mapping → API call → response formatting.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Developer & CI/CD Layer"
        Repo["Git Repository & Docs"]:::repo
    end

    subgraph "Client/UI Layer"
        UI["sample_app UI & Logic"]:::ui
    end

    subgraph "OpenAI Hosting Layer"
        CiteRight["CiteRight GPT\n(spec: crossref_openapi.yaml)"]:::gpt
        RouteSmart["RouteSmart GPT\n(spec: routesmart_openapi_example.yaml)"]:::gpt
        TaxSavvy["TaxSavvy GPT\n(spec: pinecone_openapi.yaml)"]:::gpt
        MealMuse["MealMuse GPT\n(spec: spoonacular_openapi.yaml)"]:::gpt
        JokeMaster["JokeMaster GPT\n(spec: official_joke_api.yaml)"]:::gpt
    end

    subgraph "External Services"
        Crossref["Crossref API"]:::external
        GoogleRoutes["Google Routes API"]:::external
        PineconeDB["Pinecone Vector DB + IRS Docs"]:::external
        Spoonacular["Spoonacular Recipe API"]:::external
        OfficialJoke["Official Joke API"]:::external
    end

    Repo -->|"clone & configure"| OpenAIPlatform["OpenAI Platform / Custom GPT Hosting"]:::platform
    UI -->|"OpenAI API call"| OpenAIPlatform
    OpenAIPlatform --> CiteRight
    OpenAIPlatform --> RouteSmart
    OpenAIPlatform --> TaxSavvy
    OpenAIPlatform --> MealMuse
    OpenAIPlatform --> JokeMaster

    CiteRight -->|"REST/JSON\nOpenAPI"| Crossref
    RouteSmart -->|"REST/JSON\nOpenAPI"| GoogleRoutes
    TaxSavvy -->|"REST/JSON\nOpenAPI"| PineconeDB
    MealMuse -->|"REST/JSON\nOpenAPI"| Spoonacular
    JokeMaster -->|"REST/JSON\nOpenAPI"| OfficialJoke

    click Repo "https://github.com/gptechday/openai-academy-customgpts/blob/main//README.md"
    click UI "https://github.com/gptechday/openai-academy-customgpts/blob/main//sample_app/readme.md"
    click CiteRight "https://github.com/gptechday/openai-academy-customgpts/blob/main//citeright/readme.md"
    click RouteSmart "https://github.com/gptechday/openai-academy-customgpts/blob/main//routesmart/readme.md"
    click TaxSavvy "https://github.com/gptechday/openai-academy-customgpts/blob/main//taxsavvy/readme.md"
    click MealMuse "https://github.com/gptechday/openai-academy-customgpts/blob/main//mealmuse/readme.md"
    click JokeMaster "https://github.com/gptechday/openai-academy-customgpts/blob/main//sample_app/readme.md"
    click Crossref "https://github.com/gptechday/openai-academy-customgpts/blob/main//citeright/crossref_openapi.yaml"
    click GoogleRoutes "https://github.com/gptechday/openai-academy-customgpts/blob/main//routesmart/routesmart_openapi_example.yaml"
    click PineconeDB "https://github.com/gptechday/openai-academy-customgpts/blob/main//taxsavvy/pinecone_openapi.yaml"
    click Spoonacular "https://github.com/gptechday/openai-academy-customgpts/blob/main//mealmuse/spoonacular_openapi.yaml"
    click OfficialJoke "https://github.com/gptechday/openai-academy-customgpts/blob/main//sample_app/official_joke_api.yaml"

    classDef repo fill:#dddddd,stroke:#888888,color:#333333;
    classDef platform fill:#ffffff,stroke:#4444ff,color:#4444ff;
    classDef gpt fill:#bbdefb,stroke:#2196f3,color:#0d47a1;
    classDef external fill:#c8e6c9,stroke:#4caf50,color:#1b5e20;
    classDef ui fill:#ffe0b2,stroke:#ff9800,color:#e65100;
```
