# mattlk13/poogle architecture

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

- Interactive diagram: https://gitdiagram.com/mattlk13/poogle
- Repository: https://github.com/mattlk13/poogle

## Overview

emwas is an HTTP API for aggregating video searches from supported sites. A client calls the API’s search route, which invokes the site-specific Jules Jordan search; the shared search logic builds a query URL, fetches HTML, and dispatches parsing to the site adapter, which returns structured Video results. The API also lists configured services. The README documents aggregation as the product goal, but the sampled service catalog contains only Jules Jordan. The graph follows sampled runtime code; it does not assume other adapters or integrations.

Main entry points: [`src/search/SearchOnJulesJordan.ts`](https://github.com/mattlk13/poogle/blob/master/src/search/SearchOnJulesJordan.ts) (Jules Jordan adapter), [`src/router.ts`](https://github.com/mattlk13/poogle/blob/master/src/router.ts) (API routes), [`src/search/Search.ts`](https://github.com/mattlk13/poogle/blob/master/src/search/Search.ts) (Search workflow), [`src/App.ts`](https://github.com/mattlk13/poogle/blob/master/src/App.ts) (Express app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API runtime"]
  node_app["Express app<br/>[App.ts]"]
  node_router["API routes<br/>[router.ts]"]
  node_entry["HTTP startup<br/>[index.ts]"]
end

subgraph group_search["Search processing"]
  node_searchbase["Search workflow<br/>[Search.ts]"]
  node_siteadapter["Jules Jordan adapter"]
end

subgraph group_domain["Catalog and results"]
  node_services["Service catalog<br/>[services.ts]"]
  node_video["Video result model<br/>[Video.ts]"]
end

node_client(("API client"))
node_jules(("Jules Jordan site"))

node_entry -->|"starts"| node_app
node_client -->|"sends requests"| node_app
node_app -->|"mounts routes"| node_router
node_router -->|"reads catalog"| node_services
node_router -->|"invokes search"| node_siteadapter
node_siteadapter -->|"reads configuration"| node_services
node_siteadapter -->|"inherits workflow"| node_searchbase
node_searchbase -->|"fetches search HTML"| node_jules
node_searchbase -->|"dispatches parsing"| node_siteadapter
node_siteadapter -->|"constructs results"| node_video
node_router -->|"returns JSON"| node_client

click node_app "https://github.com/mattlk13/poogle/blob/master/src/App.ts"
click node_router "https://github.com/mattlk13/poogle/blob/master/src/router.ts"
click node_entry "https://github.com/mattlk13/poogle/blob/master/src/index.ts"
click node_searchbase "https://github.com/mattlk13/poogle/blob/master/src/search/Search.ts"
click node_siteadapter "https://github.com/mattlk13/poogle/blob/master/src/search/SearchOnJulesJordan.ts"
click node_services "https://github.com/mattlk13/poogle/blob/master/src/services.ts"
click node_video "https://github.com/mattlk13/poogle/blob/master/src/classes/Video.ts"

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_app,node_router,node_entry,node_client toneBlue
class node_searchbase,node_siteadapter toneAmber
class node_services,node_video toneMint
class node_jules toneIndigo
```

## Components

### API runtime

- [Express app](https://github.com/mattlk13/poogle/blob/master/src/App.ts): `src/App.ts`
- [API routes](https://github.com/mattlk13/poogle/blob/master/src/router.ts): `src/router.ts`
- [HTTP startup](https://github.com/mattlk13/poogle/blob/master/src/index.ts): `src/index.ts`

### Search processing

- [Search workflow](https://github.com/mattlk13/poogle/blob/master/src/search/Search.ts): `src/search/Search.ts`
- [Jules Jordan adapter](https://github.com/mattlk13/poogle/blob/master/src/search/SearchOnJulesJordan.ts): `src/search/SearchOnJulesJordan.ts`

### Catalog and results

- [Service catalog](https://github.com/mattlk13/poogle/blob/master/src/services.ts): `src/services.ts`
- [Video result model](https://github.com/mattlk13/poogle/blob/master/src/classes/Video.ts): `src/classes/Video.ts`

### Other components

- **API client**
- **Jules Jordan site**

## Connections

- HTTP startup → Express app: starts
- API client → Express app: sends requests
- Express app → API routes: mounts routes
- API routes → Service catalog: reads catalog
- API routes → Jules Jordan adapter: invokes search
- Jules Jordan adapter → Service catalog: reads configuration
- Jules Jordan adapter → Search workflow: inherits workflow
- Search workflow → Jules Jordan site: fetches search HTML
- Search workflow → Jules Jordan adapter: dispatches parsing
- Jules Jordan adapter → Video result model: constructs results
- API routes → API client: returns JSON
