> ## 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.

# What is Profy: the expert workforce platform

> Profy is a TypeScript Bun monorepo combining a Portal, Marketplace, Projects, AI Experts, and declarative sandboxes on a unified Core API backend.

# What is Profy

Profy is a TypeScript full-stack business platform built on a Bun monorepo. It is an **Expert Workforce Platform**: a consumer-facing **Portal** and **Marketplace** (creator ecosystem), **Projects** (multi-expert collaboration), **Experts** (AI expert products), and **Declarative Sandboxes** (E2B/Docker runtime), backed by a unified **Core API** for authentication, finance, task orchestration, and more.

## Why Profy

<CardGroup cols={2}>
  <Card title="Unified Monorepo" icon="package">
    One repository for frontend, backend, shared packages, and deployment — with strict type safety across every boundary.
  </Card>

  <Card title="Expert Workforce" icon="robot">
    Profy drives the Agent Runtime inside declarative sandboxes (E2B/Docker), with SSE streaming, credit billing, and per-expert isolation.
  </Card>

  <Card title="App Marketplace" icon="store">
    Browse, favorite, and launch applications and skills through a fully internationalized storefront.
  </Card>

  <Card title="Production-Ready" icon="shield-check">
    SMS + JWT auth, WeChat Pay integration, credit-based billing, blue-green deployments, and health-checked infrastructure.
  </Card>
</CardGroup>

## Core concepts

| Concept         | Meaning                                                           |
| --------------- | ----------------------------------------------------------------- |
| **Expert**      | An AI expert product users run and collaborate with               |
| **Project**     | A workspace for multi-expert collaboration                        |
| **Sandbox**     | Declarative runtime (E2B/Docker) where the Agent Runtime executes |
| **Marketplace** | Creator ecosystem for apps, skills, and Experts                   |

## Platform Overview

```mermaid theme={null}
flowchart TB
    subgraph Clients
        Browser[Web Browser]
        SDK[API Key Client]
    end

    subgraph "Nginx Reverse Proxy"
        NG[/"SSL · Routing · Caching"/]
    end

    subgraph "apps/web — Next.js 16"
        Portal[Portal Marketplace]
        ExpertUI[Expert / Agent UI]
        Proxy[SSE Proxy Layer]
    end

    subgraph "services/core — Hono + Bun"
        Auth[Auth Service]
        Finance[Finance Service]
        Task[Task Service]
        Market[Market Service]
        File[File Service]
        Payment[Payment Service]
    end

    subgraph Infrastructure
        PostgreSQL[(PostgreSQL)]
        Redis[(Redis)]
        S3[(S3)]
        Sandbox["Declarative Sandbox<br/>(E2B / Docker)"]
    end

    Browser --> NG
    SDK --> NG
    NG -->|"/* "| Portal
    NG -->|"/api/*"| Auth
    NG -->|"/openapi/*"| Finance
    Portal --> Market
    ExpertUI --> Proxy
    Proxy -->|SSE| Sandbox
    Auth --> Redis
    Auth --> PostgreSQL
    Finance --> PostgreSQL
    Task --> Redis
    File --> S3
    Payment -->|WeChat Pay| Finance
```

## Core Capabilities

| Domain                 | What it does                                                                                                    |
| ---------------------- | --------------------------------------------------------------------------------------------------------------- |
| **Authentication**     | SMS verification code login, JWT tokens with Redis session, single-device enforcement, API Key system           |
| **Marketplace**        | App categories, application browsing, favorites, skill discovery with tag-based filtering                       |
| **Finance**            | Credit-based accounts, recharge plans, WeChat Pay / Alipay integration, idempotent consumption                  |
| **Tasks**              | Create → submit → agent dispatch → callback → pay-to-view result lifecycle                                      |
| **Expert (AI Expert)** | Agent Runtime in declarative sandboxes (E2B/Docker), SSE streaming chat, credit-based billing, expert lifecycle |
| **Files**              | S3 object storage with upload, download, and deletion                                                           |
| **Deployment**         | Docker Compose, Nginx reverse proxy, blue-green zero-downtime deploys                                           |

## Prerequisites

* **Node.js** >= 20
* **Bun** (latest version recommended)
* **PostgreSQL** database
* **Redis** cache service

## Quick Start

```bash theme={null}
git clone <repository-url>
cd profy

bun install

make dev
```

## Common Commands

| Command             | Description                            |
| ------------------- | -------------------------------------- |
| `make dev`          | Start core + web dev servers           |
| `bun run build`     | Build all packages in dependency order |
| `bun run test`      | Run tests                              |
| `bun run typecheck` | TypeScript type checking               |
| `bun run lint`      | Biome code linting                     |

## Explore the Platform

<CardGroup cols={2}>
  <Card title="System Architecture" icon="sitemap" href="/en/documentation/architecture/overview">
    Monorepo structure, build graph, and request lifecycle
  </Card>

  <Card title="Authentication" icon="lock" href="/en/documentation/auth">
    SMS login, JWT sessions, API Key system
  </Card>

  <Card title="Marketplace" icon="store" href="/en/documentation/marketplace">
    App categories, favorites, and skill discovery
  </Card>

  <Card title="Finance & Payments" icon="credit-card" href="/en/documentation/finance">
    Credit system, recharge plans, payment channels
  </Card>

  <Card title="Task Orchestration" icon="list-check" href="/en/documentation/tasks">
    Task lifecycle, agent dispatch, pay-to-view
  </Card>

  <Card title="Agent Platform" icon="robot" href="/en/documentation/agent">
    Profy, Agent Runtime, declarative sandboxes, SSE streaming
  </Card>

  <Card title="Deployment" icon="rocket" href="/en/documentation/deployment">
    Docker Compose, blue-green, Nginx, health checks
  </Card>
</CardGroup>
