Skip to content

Source Explorer

This page gives you a lightweight, docs-hosted source browser for all Build With Gaia example apps.

It is designed as a practical replacement for GitHub directory links when this project is not yet in a public repo.


How To Use

  • Use the file trees below to understand project layout quickly.
  • Use the key file links to jump to focused documentation sections.
  • Use the Code Browser to open full file contents and copy code.
  • Open the corresponding files in your local workspace for full editing.

Note

This explorer is intentionally lightweight. It does not provide full GitHub-style browsing, blame, history, or PR diffs.


Example 01 Files — Hello Gaia

Text Only
examples/01-hello-gaia/
├── README.md
├── .env.example
├── requirements.txt
└── hello_gaia.py

Key Files

  • examples/01-hello-gaia/hello_gaia.py — Minimal Gaia API flow
  • examples/01-hello-gaia/.env.example — Required environment vars
  • examples/01-hello-gaia/README.md — Setup and run instructions
  • Open full code browser for Example 01

Example 02 Files — Chat App

Text Only
examples/02-chat-app/
├── README.md
├── backend/
│   ├── main.py
│   ├── settings.py
│   ├── .env.example
│   ├── requirements.txt
│   ├── api/
│   │   ├── routes.py
│   │   └── dependencies.py
│   ├── models/
│   │   └── api_models.py
│   ├── services/
│   │   └── session_service.py
│   └── utils/
│       └── errors.py
└── frontend/
    ├── package.json
    ├── .env.example
    ├── index.html
    ├── tsconfig.json
    ├── vite.config.ts
    └── src/
        ├── main.tsx
        ├── App.tsx
        ├── api/
        │   ├── client.ts
        │   └── gaia.ts
        ├── state/
        │   ├── sessionStore.ts
        │   └── chatStore.ts
        ├── pages/
        │   ├── LoginPage.tsx
        │   └── ChatPage.tsx
        ├── components/
        │   ├── ChatMessage.tsx
        │   ├── ChatInput.tsx
        │   └── DatasetSelector.tsx
        └── styles/
            └── app.css

Key Files

  • examples/02-chat-app/backend/api/routes.py — Backend HTTP/SSE endpoints (uses gaia_sdk)
  • examples/02-chat-app/frontend/src/state/chatStore.ts — Chat + streaming state
  • examples/02-chat-app/frontend/src/pages/ChatPage.tsx — Main chat UI
  • Open full code browser for Example 02

Text Only
examples/03-document-search/
├── README.md
├── backend/
│   ├── main.py
│   ├── settings.py
│   ├── .env.example
│   ├── requirements.txt
│   ├── api/
│   │   ├── routes.py
│   │   └── dependencies.py
│   ├── models/
│   │   └── api_models.py
│   ├── services/
│   │   ├── search_service.py
│   │   └── session_service.py
│   └── utils/
│       └── errors.py
└── frontend/
    ├── package.json
    ├── .env.example
    ├── index.html
    ├── tsconfig.json
    ├── vite.config.ts
    └── src/
        ├── main.tsx
        ├── App.tsx
        ├── api/
        │   ├── client.ts
        │   └── gaia.ts
        ├── state/
        │   ├── sessionStore.ts
        │   └── searchStore.ts
        ├── pages/
        │   ├── LoginPage.tsx
        │   ├── SearchPage.tsx
        │   └── DatasetBrowserPage.tsx
        ├── components/
        │   ├── SearchBar.tsx
        │   ├── DocumentCard.tsx
        │   ├── DocumentDetail.tsx
        │   ├── RefinePanel.tsx
        │   └── FeedbackButtons.tsx
        └── styles/
            └── app.css

Key Files

  • examples/03-document-search/backend/services/search_service.py — Search orchestration
  • examples/03-document-search/backend/api/routes.py — Search/refine/feedback endpoints
  • examples/03-document-search/frontend/src/pages/SearchPage.tsx — Search UI flow
  • examples/03-document-search/frontend/src/components/RefinePanel.tsx — Refine interactions
  • Open full code browser for Example 03

Example 04 Files — Gaia MCP Server

Text Only
examples/04-gaia-mcp-server/
├── README.md
├── .env.example
├── requirements.txt
├── Dockerfile
└── server.py

Key Files

  • examples/04-gaia-mcp-server/server.py — FastMCP tools and /mcp mount
  • examples/04-gaia-mcp-server/.env.example — Gaia server config
  • examples/04-gaia-mcp-server/Dockerfile — Containerized MCP server runtime
  • Open full code browser for Example 04

Example 05 Files — Marketplace Chat App

Text Only
examples/05-marketplace-chat/
├── README.md
├── main.py               # FastAPI: serves /api/* and React static files
├── settings.py           # Gaia config + Marketplace env vars
├── .env.example
├── requirements.txt
├── api/
│   ├── __init__.py
│   ├── routes.py         # /datasets, /ask/stream, /conversations, /status
│   └── models.py         # AskRequest model
├── frontend/
│   ├── package.json
│   ├── vite.config.ts    # /api proxy → :8080 for local dev
│   ├── tsconfig.json
│   ├── tsconfig.app.json
│   ├── index.html
│   └── src/
│       ├── main.tsx
│       ├── App.tsx
│       ├── api/
│       │   ├── client.ts
│       │   └── gaia.ts   # askStream() SSE parsing
│       ├── state/
│       │   └── chatStore.ts   # Zustand (no session concept)
│       ├── pages/
│       │   └── ChatPage.tsx   # No login page
│       ├── components/
│       │   ├── ChatMessage.tsx
│       │   ├── ChatInput.tsx
│       │   └── DatasetSelector.tsx
│       └── styles/app.css
├── Dockerfile            # Multi-stage: Node 20 → Python 3.11-slim
├── wrapper.sh            # Crash-recovery restart loop
├── appspec.yaml          # Cohesity Marketplace manifest
└── app.json              # unrestricted_app_ui_access: false

Key Files

  • examples/05-marketplace-chat/main.py — FastAPI with StaticFiles mount at /
  • examples/05-marketplace-chat/settings.py — Reads GAIA_API_KEY, HOST_IP, APP_AUTHENTICATION_TOKEN
  • examples/05-marketplace-chat/api/routes.pyAPI key from env (no session auth)
  • examples/05-marketplace-chat/appspec.yamlcohesityTag: ui on port 8080
  • examples/05-marketplace-chat/Dockerfile — Multi-stage build: React compiled in Stage 1
  • Marketplace deployment guide

Example 06 Files — Marketplace MCP Server

Text Only
examples/06-marketplace-mcp/
├── README.md
├── server.py             # FastMCP tools + HTML landing page
├── requirements.txt
├── .env.example
├── Dockerfile            # Single-stage Python 3.11-slim
├── wrapper.sh            # Crash-recovery restart loop
├── appspec.yaml          # cohesityEnv: MCP_NODE_PORT on port 8002
└── app.json              # unrestricted_app_ui_access: true

Key Files

  • examples/06-marketplace-mcp/server.py — FastMCP 4 tools; synchronous httpx.Client; landing page
  • examples/06-marketplace-mcp/appspec.yamlcohesityTag: ui + cohesityEnv: MCP_NODE_PORT
  • examples/06-marketplace-mcp/app.jsonunrestricted_app_ui_access: true
  • examples/06-marketplace-mcp/Dockerfile — No frontend; smallest possible image
  • MCP on Marketplace guide

Local Path Reference

If your workspace root is this project, example code lives at:

Text Only
build-with-gaia/examples/