# dooy/chatgpt-web-midjourney-proxy architecture

> Architecture diagram of the GitHub repository dooy/chatgpt-web-midjourney-proxy, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dooy/chatgpt-web-midjourney-proxy
- Repository: https://github.com/dooy/chatgpt-web-midjourney-proxy

## Overview

This is a Vue-based multimodal AI web client, with an optional Express service that supplies chat endpoints, authentication/configuration, upload handling, and API proxies. Users enter through routed ChatGPT, image, video, music, dance, or realtime-audio workspaces; those workspaces use API clients to reach configured AI services and present generated results. The README documents a broader set of model-specific capabilities than the sampled source confirms in detail, so those are represented by their existing workspace and API modules without asserting internal call sequences. The main proxy and chat paths are visible in the service excerpt; other provider wiring is less certain.

Main entry points: [`src/router/index.ts`](https://github.com/dooy/chatgpt-web-midjourney-proxy/blob/main/src/router/index.ts) (App router), [`service/src/index.ts`](https://github.com/dooy/chatgpt-web-midjourney-proxy/blob/main/service/src/index.ts) (HTTP service), [`src/views/mj/draw.vue`](https://github.com/dooy/chatgpt-web-midjourney-proxy/blob/main/src/views/mj/draw.vue) (Image creation), [`src/views/suno/music.vue`](https://github.com/dooy/chatgpt-web-midjourney-proxy/blob/main/src/views/suno/music.vue) (Music creation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspaces["User workspaces"]
  node_router["App router<br/>[index.ts]"]
  node_chat["Chat and GPTs<br/>[index.vue]"]
  node_image["Image creation<br/>[draw.vue]"]
  node_video["Video creation<br/>[video.vue]"]
  node_music["Music creation<br/>[music.vue]"]
  node_dance["Dance creation<br/>[dance.vue]"]
  node_realtime["Realtime audio<br/>[realtime.vue]"]
end

subgraph group_client["Client services"]
  node_api_facade["API facade<br/>[index.ts]"]
  node_chat_api["Chat API<br/>[chat.ts]"]
  node_image_api["Image APIs<br/>[mjapi.ts]"]
  node_video_api["Video APIs<br/>[luma.ts]"]
  node_music_api["Music APIs<br/>[suno.ts]"]
end

subgraph group_server["Service backend"]
  node_service["HTTP service<br/>[index.ts]"]
  node_chat_engine["Chat processing<br/>[index.ts]"]
  node_auth["Auth controls<br/>[auth.ts]"]
end

subgraph group_state["State and media"]
  node_app_state["App and chat state<br/>[index.ts]"]
  node_media_state["Generation state<br/>[klingStore.ts]"]
  node_local_storage[("Local storage<br/>[index.ts]")]
  node_audio_tools["Audio capture tools<br/>[index.js]"]
end

node_user(("User"))
node_openai{{"OpenAI-compatible API"}}
node_providers{{"Media AI providers"}}

node_user -->|"opens workspace"| node_router
node_router -->|"routes"| node_chat
node_router -->|"routes"| node_image
node_router -->|"routes"| node_video
node_router -->|"routes"| node_music
node_router -->|"routes"| node_dance
node_router -->|"routes"| node_realtime
node_chat -->|"requests chat"| node_api_facade
node_api_facade -->|"exports"| node_chat_api
node_image -->|"requests generation"| node_image_api
node_video -->|"requests generation"| node_video_api
node_music -->|"requests generation"| node_music_api
node_realtime -->|"captures audio"| node_audio_tools
node_api_facade -->|"posts chat requests"| node_service
node_service -->|"checks access"| node_auth
node_service -->|"processes chat"| node_chat_engine
node_chat_engine -->|"requests completions"| node_openai
node_service -->|"proxies API requests"| node_openai
node_image_api -.->|"uses proxy routes"| node_service
node_video_api -.->|"calls media services"| node_providers
node_music_api -.->|"calls music services"| node_providers
node_image -.->|"reads generation state"| node_media_state
node_app_state -.->|"persists preferences"| node_local_storage
node_music -.->|"uses saved items"| node_media_state

click node_router "https://github.com/dooy/chatgpt-web-midjourney-proxy/blob/main/src/router/index.ts"
click node_chat "https://github.com/dooy/chatgpt-web-midjourney-proxy/blob/main/src/views/chat/index.vue"
click node_image "https://github.com/dooy/chatgpt-web-midjourney-proxy/blob/main/src/views/mj/draw.vue"
click node_video "https://github.com/dooy/chatgpt-web-midjourney-proxy/blob/main/src/views/luma/video.vue"
click node_music "https://github.com/dooy/chatgpt-web-midjourney-proxy/blob/main/src/views/suno/music.vue"
click node_dance "https://github.com/dooy/chatgpt-web-midjourney-proxy/blob/main/src/views/viggle/dance.vue"
click node_realtime "https://github.com/dooy/chatgpt-web-midjourney-proxy/blob/main/src/views/wav/realtime.vue"
click node_api_facade "https://github.com/dooy/chatgpt-web-midjourney-proxy/blob/main/src/api/index.ts"
click node_chat_api "https://github.com/dooy/chatgpt-web-midjourney-proxy/blob/main/src/api/chat.ts"
click node_image_api "https://github.com/dooy/chatgpt-web-midjourney-proxy/blob/main/src/api/mjapi.ts"
click node_video_api "https://github.com/dooy/chatgpt-web-midjourney-proxy/blob/main/src/api/luma.ts"
click node_music_api "https://github.com/dooy/chatgpt-web-midjourney-proxy/blob/main/src/api/suno.ts"
click node_service "https://github.com/dooy/chatgpt-web-midjourney-proxy/blob/main/service/src/index.ts"
click node_chat_engine "https://github.com/dooy/chatgpt-web-midjourney-proxy/blob/main/service/src/chatgpt/index.ts"
click node_auth "https://github.com/dooy/chatgpt-web-midjourney-proxy/blob/main/service/src/middleware/auth.ts"
click node_app_state "https://github.com/dooy/chatgpt-web-midjourney-proxy/blob/main/src/store/modules/chat/index.ts"
click node_media_state "https://github.com/dooy/chatgpt-web-midjourney-proxy/blob/main/src/api/klingStore.ts"
click node_local_storage "https://github.com/dooy/chatgpt-web-midjourney-proxy/blob/main/src/utils/storage/index.ts"
click node_audio_tools "https://github.com/dooy/chatgpt-web-midjourney-proxy/blob/main/src/lib/wavtools/index.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_router,node_chat,node_image,node_video,node_music,node_dance,node_realtime,node_user toneBlue
class node_api_facade,node_chat_api,node_image_api,node_video_api,node_music_api toneAmber
class node_service,node_chat_engine,node_auth,node_openai toneMint
class node_app_state,node_media_state,node_local_storage,node_audio_tools toneRose
class node_providers toneIndigo
```

## Components

### User workspaces

- [App router](https://github.com/dooy/chatgpt-web-midjourney-proxy/blob/main/src/router/index.ts): `src/router/index.ts`
- [Chat and GPTs](https://github.com/dooy/chatgpt-web-midjourney-proxy/blob/main/src/views/chat/index.vue): `src/views/chat/index.vue`
- [Image creation](https://github.com/dooy/chatgpt-web-midjourney-proxy/blob/main/src/views/mj/draw.vue): `src/views/mj/draw.vue`
- [Video creation](https://github.com/dooy/chatgpt-web-midjourney-proxy/blob/main/src/views/luma/video.vue): `src/views/luma/video.vue`
- [Music creation](https://github.com/dooy/chatgpt-web-midjourney-proxy/blob/main/src/views/suno/music.vue): `src/views/suno/music.vue`
- [Dance creation](https://github.com/dooy/chatgpt-web-midjourney-proxy/blob/main/src/views/viggle/dance.vue): `src/views/viggle/dance.vue`
- [Realtime audio](https://github.com/dooy/chatgpt-web-midjourney-proxy/blob/main/src/views/wav/realtime.vue): `src/views/wav/realtime.vue`

### Client services

- [API facade](https://github.com/dooy/chatgpt-web-midjourney-proxy/blob/main/src/api/index.ts): `src/api/index.ts`
- [Chat API](https://github.com/dooy/chatgpt-web-midjourney-proxy/blob/main/src/api/chat.ts): `src/api/chat.ts`
- [Image APIs](https://github.com/dooy/chatgpt-web-midjourney-proxy/blob/main/src/api/mjapi.ts): `src/api/mjapi.ts`
- [Video APIs](https://github.com/dooy/chatgpt-web-midjourney-proxy/blob/main/src/api/luma.ts): `src/api/luma.ts`
- [Music APIs](https://github.com/dooy/chatgpt-web-midjourney-proxy/blob/main/src/api/suno.ts): `src/api/suno.ts`

### Service backend

- [HTTP service](https://github.com/dooy/chatgpt-web-midjourney-proxy/blob/main/service/src/index.ts): `service/src/index.ts`
- [Chat processing](https://github.com/dooy/chatgpt-web-midjourney-proxy/blob/main/service/src/chatgpt/index.ts): `service/src/chatgpt/index.ts`
- [Auth controls](https://github.com/dooy/chatgpt-web-midjourney-proxy/blob/main/service/src/middleware/auth.ts): `service/src/middleware/auth.ts`

### State and media

- [App and chat state](https://github.com/dooy/chatgpt-web-midjourney-proxy/blob/main/src/store/modules/chat/index.ts): `src/store/modules/chat/index.ts`
- [Generation state](https://github.com/dooy/chatgpt-web-midjourney-proxy/blob/main/src/api/klingStore.ts): `src/api/klingStore.ts`
- [Local storage](https://github.com/dooy/chatgpt-web-midjourney-proxy/blob/main/src/utils/storage/index.ts): `src/utils/storage/index.ts`
- [Audio capture tools](https://github.com/dooy/chatgpt-web-midjourney-proxy/blob/main/src/lib/wavtools/index.js): `src/lib/wavtools/index.js`

### Other components

- **User**
- **OpenAI-compatible API**
- **Media AI providers**

## Connections

- User → App router: opens workspace
- App router → Chat and GPTs: routes
- App router → Image creation: routes
- App router → Video creation: routes
- App router → Music creation: routes
- App router → Dance creation: routes
- App router → Realtime audio: routes
- Chat and GPTs → API facade: requests chat
- API facade → Chat API: exports
- Image creation → Image APIs: requests generation
- Video creation → Video APIs: requests generation
- Music creation → Music APIs: requests generation
- Realtime audio → Audio capture tools: captures audio
- API facade → HTTP service: posts chat requests
- HTTP service → Auth controls: checks access
- HTTP service → Chat processing: processes chat
- Chat processing → OpenAI-compatible API: requests completions
- HTTP service → OpenAI-compatible API: proxies API requests
- Image APIs → HTTP service: uses proxy routes
- Video APIs → Media AI providers: calls media services
- Music APIs → Media AI providers: calls music services
- Image creation → Generation state: reads generation state
- App and chat state → Local storage: persists preferences
- Music creation → Generation state: uses saved items
