> ## Documentation Index
> Fetch the complete documentation index at: https://docs.profy.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# App marketplace: browse, search, and favorites

> The Profy Portal marketplace lets users browse categories, search applications, manage favorites, and discover skill catalogs without authentication.

# Marketplace

The Profy marketplace is a consumer-facing storefront where users discover applications, browse skill catalogs, and manage their favorites. All marketplace data is publicly accessible — no authentication required for browsing.

## Overview

```mermaid theme={null}
flowchart LR
    subgraph Portal["Portal Marketplace"]
        Cat[Categories]
        Apps[Applications]
        Skills[Skills]
        Favs[Favorites]
    end

    subgraph Core["Core API"]
        MR["/api/market/*"]
    end

    subgraph Data
        PostgreSQL[(PostgreSQL)]
    end

    Cat --> MR
    Apps --> MR
    Skills --> MR
    Favs --> MR
    MR --> PostgreSQL
```

## Applications

Applications are the primary marketplace entity. Users can browse by category, search by keyword, view details, and mark favorites.

### Application Lifecycle

| Feature         | Description                                                               |
| --------------- | ------------------------------------------------------------------------- |
| **Categories**  | Hierarchical classification with i18n support (`locale` parameter)        |
| **Listing**     | Paginated browsing with category and keyword filters                      |
| **Hot Apps**    | Curated or algorithmically ranked popular applications                    |
| **Detail View** | Full application metadata including description, pricing, and screenshots |
| **Favorites**   | Authenticated users can favorite/unfavorite apps (idempotent)             |

### Application API Endpoints

| Method | Endpoint                                  | Auth | Description                               |
| ------ | ----------------------------------------- | ---- | ----------------------------------------- |
| `GET`  | `/api/market/category/list`               | No   | List all categories (supports `?locale=`) |
| `POST` | `/api/market/application/list`            | No   | Search apps with filters and pagination   |
| `GET`  | `/api/market/application/detail/:appUuid` | No   | Get full application details              |
| `GET`  | `/api/market/application/hot`             | No   | Retrieve trending / hot applications      |
| `POST` | `/api/market/application/favorite`        | Yes  | Add app to favorites                      |
| `POST` | `/api/market/application/unfavorite`      | Yes  | Remove app from favorites                 |
| `POST` | `/api/market/application/favorite/list`   | Yes  | List user's favorite apps                 |

### Listing Request

```typescript theme={null}
interface ApplicationListRequest {
  categoryUuid?: string;
  keyword?: string;
  page: number;
  pageSize: number;
}
```

The response includes an `isFavorited` flag per application when the request includes a valid auth token.

## Skills

Skills represent reusable capabilities that can be attached to agent instances. The skill marketplace supports tag-based filtering and source type classification.

### Skill API Endpoints

| Method | Endpoint                   | Auth | Description                                         |
| ------ | -------------------------- | ---- | --------------------------------------------------- |
| `POST` | `/api/market/skill/list`   | No   | List skills with category, keyword, and tag filters |
| `POST` | `/api/market/skill/detail` | No   | Get full skill details by `skillUuid`               |

### Skill Filters

| Filter         | Type       | Description                 |
| -------------- | ---------- | --------------------------- |
| `categoryUuid` | `string`   | Filter by skill category    |
| `keyword`      | `string`   | Full-text keyword search    |
| `tags`         | `string[]` | Filter by one or more tags  |
| `sourceType`   | `string`   | Filter by skill source type |

## Categories

Categories provide a hierarchical taxonomy for organizing both applications and skills. They support internationalization through the `locale` query parameter.

```mermaid theme={null}
flowchart TB
    Root[All Categories]
    Root --> Dev[Development Tools]
    Root --> AI[AI & Automation]
    Root --> Biz[Business]
    Root --> Data[Data & Analytics]
    Dev --> IDE[IDE Extensions]
    Dev --> CLI[CLI Tools]
    AI --> NLP[Natural Language]
    AI --> Vision[Computer Vision]
```

## Favorites System

The favorites system lets authenticated users bookmark applications for quick access. Operations are idempotent — favoriting an already-favorited app or unfavoriting a non-favorited app both succeed silently.

```mermaid theme={null}
sequenceDiagram
    participant U as User
    participant W as Web
    participant C as Core API
    participant D as PostgreSQL

    U->>W: Click favorite
    W->>C: POST /api/market/application/favorite
    C->>D: Upsert favorite record
    D-->>C: OK
    C-->>W: Success
    W->>U: Update UI state
```

## Frontend Integration

The Portal marketplace is built with Next.js and uses `next-intl` for internationalization. Key pages include:

| Page                     | Description                                   |
| ------------------------ | --------------------------------------------- |
| `/marketplace`           | Main listing with category sidebar and search |
| `/marketplace/[appUuid]` | Application detail page                       |
| `/marketplace/skills`    | Skill catalog browser                         |
| `/favorites`             | User's favorited applications                 |

## Related Pages

<CardGroup cols={2}>
  <Card title="Authentication" icon="lock" href="/en/documentation/auth">
    Auth required for favorites and personalized features
  </Card>

  <Card title="Agent Platform" icon="robot" href="/en/documentation/agent">
    Skills integrate with Expert agent instances
  </Card>
</CardGroup>
