From 006774042acb9d89f65ac46d83ae6648226475a5 Mon Sep 17 00:00:00 2001 From: yiling Date: Tue, 16 Jun 2026 14:44:42 +0800 Subject: [PATCH] docs: refine documentation to be user-oriented and remove database jargon --- docs/getting-started/overview.mdx | 63 ++++--------- docs/getting-started/quickstart.mdx | 93 +++++++++---------- docs/using-shumai/agent-providers.mdx | 13 ++- docs/using-shumai/agent-sandbox.mdx | 23 +++-- docs/using-shumai/agent-skills.mdx | 30 ++---- docs/using-shumai/agents.mdx | 14 +-- docs/using-shumai/collections.mdx | 47 +++------- docs/using-shumai/comments.mdx | 46 +++++---- docs/using-shumai/metadata.mdx | 31 +++---- docs/using-shumai/notifications.mdx | 29 +++--- docs/using-shumai/semantic-search.mdx | 28 ++---- docs/using-shumai/share-links.mdx | 4 +- docs/using-shumai/sort-and-search.mdx | 28 +++--- docs/using-shumai/team-project-management.mdx | 6 +- docs/using-shumai/transcode-settings.mdx | 25 ++--- docs/using-shumai/upload.mdx | 42 ++++----- docs/using-shumai/version-stack.mdx | 21 ++--- 17 files changed, 220 insertions(+), 323 deletions(-) diff --git a/docs/getting-started/overview.mdx b/docs/getting-started/overview.mdx index 9622013c..c15509af 100644 --- a/docs/getting-started/overview.mdx +++ b/docs/getting-started/overview.mdx @@ -1,67 +1,38 @@ --- title: Overview -description: Learn about Shumai, a modern AI agent and media processing platform for creative work. +description: Learn about Shumai, a modern collaboration and media review platform. --- ## What is Shumai? -**Shumai** is a highly modular, self-hosted media collaboration platform and AI agent playground. It allows teams to securely store, organize, and review creative assets (video, audio, images, etc.) while leveraging advanced AI capabilities to automate metadata tagging, perform semantic visual searches, and run sandboxed automation scripts. +**Shumai** is a self-hosted media collaboration platform designed for creative teams, video editors, designers, and clients. It provides a centralized workspace where you can upload, organize, and review assets (video, audio, images, and documents) in real-time. With built-in AI capabilities and background transcoding, Shumai helps streamline asset organization and feedback workflows. -![Shumai Overview Placeholder](https://placehold.co/800x450/2C2E3E/D95A66?text=Shumai+Dashboard+Overview) +![Shumai Dashboard Overview Placeholder](https://placehold.co/800x450/2C2E3E/D95A66?text=Shumai+Dashboard+Overview) _Placeholder: Dashboard view showing the file explorer, active projects, and sidebar options._ --- -## High-Level Features +## Core Features -- **S3-Compatible & Local FS Storage**: Flexibly store creative assets locally or connect directly to standard S3-compatible providers (AWS S3, Cloudflare R2, MinIO, etc.). -- **Media Commenting & Drawing**: Leave frame-level and timestamped feedback with sketch overlays on image and video assets. -- **Version Stacking**: Version control for assets by stacking multiple file revisions together. -- **AI-Powered Metadata & Search**: Automatically analyze files using Gemini to populate metadata fields, and search them visually or semantically via vector databases. -- **Custom Agent Skills**: Write scripts to automate repetitive workflow actions inside secure sandboxed environments. -- **Production-Ready Media Transcoding**: Offload heavy media processing workloads using distributed workers. +- **Secure Storage**: Host your creative assets locally on your server or connect directly to any S3-compatible cloud storage provider (like AWS S3, Cloudflare R2, or MinIO). +- **Media Commenting & Drawing**: Speed up review cycles with frame-level comments and drawing tools that let you sketch directly onto video frames or images. +- **Version Control**: Stack multiple versions of the same file into a single entry to keep your workspace organized and track revision history. +- **AI-Powered Tags & Search**: Automatically tag your files on upload using Google Gemini, and find assets based on visual or conceptual meaning. +- **Custom Automations**: Build tailored background workflows using custom scripts to automate repetitive team actions. +- **Proxy Transcoding**: Automatically convert heavy camera and design files in the background into web-friendly streaming formats for smooth playback. --- -## Architectural Layout +## Deployment Scales -Shumai is developed as a modern, strictly decoupled monorepo managed with **Bun Workspaces**. Its architecture ensures clear separations of concerns across the following layers: +Depending on your team size and production volume, Shumai can be configured to run in one of two modes: -```mermaid -graph TD - WebUI[WebUI: packages/webui - React & Tailwind] --> API[API Layer: packages/api - Hono] - API --> Core[Core Service Layer: packages/core - Business Logic] - Core --> DB[Database Layer: packages/db - Prisma] - Core --> DTOs[DTO Layer: packages/dtos - Shared Schemas] - Core --> Workers[Workers: Agent/Transcode Workflows] -``` +### 1. Single-Server Deployment (Default) -### The Monorepo Packages +Ideal for small teams, local development, or low-volume workflows. In this setup, the main web server, database, and background tasks (like transcoding and AI tagging) all run on a single machine. -1. **WebUI (`packages/webui`)**: The user interface. Built on React and styled with Tailwind CSS and Shadcn UI. -2. **API (`packages/api`)**: The HTTP server. Built on Hono and Bun. Acts as the entrypoint for all frontend requests. -3. **Core (`packages/core`)**: The business logic and services layer. Interacts with the database, S3 storage, and external providers. -4. **Database (`packages/db`)**: Holds the database schema, Prisma client generation, and migrations (using PostgreSQL with `pgvector`). -5. **DTOs (`packages/dtos`)**: Shared data transfer object definitions and Zod schemas, guaranteeing end-to-end type safety between the frontend and backend. -6. **Workers**: Specialized packages for running background operations: - - `@shumai/workflow-core`: Common workflow engine logic. - - `@shumai/agent`: AI agent workflows and activities. - - `@shumai/transcode`: Media processing workflows and activities. +### 2. High-Scale Distributed Deployment ---- +Recommended for production environments with high-volume video uploads. In this setup, background tasks are managed via a centralized queue (Temporal). This allows you to offload heavy workloads to specialized worker machines (for example, putting video transcoding tasks on high-CPU/GPU machines and AI agents on separate sandboxed environments). -## Dual Workflow Engines - -To cater to different environments, Shumai implements a custom background execution layer that supports two modes: - -### 1. Local Executor (Default) - -In local development or lightweight self-hosted setups, Shumai uses a polling-based engine. It continuously polls the database for pending background tasks (such as metadata autofill, embedding generation, or transcoding) and executes them directly on the main application container. - -### 2. Temporal Executor (Production-Ready) - -For heavy production workflows, Shumai decouples background task execution entirely using **Temporal**. - -- **Orchestration**: The main Hono application registers tasks to the Temporal Cluster. -- **Specialized Workers**: Separate worker machines run `@shumai/transcode` and `@shumai/agent` processes. They poll tasks from the Temporal queue and execute them independently. -- **S3 Requirement**: In Temporal mode, **you must use an S3-compatible storage backend**. Because workers run on separate machines, they cannot access a local filesystem to retrieve or write files. +_Note: S3-compatible cloud storage is required for distributed deployments so that all workers can access the uploaded files._ diff --git a/docs/getting-started/quickstart.mdx b/docs/getting-started/quickstart.mdx index 8842289f..95fd80ba 100644 --- a/docs/getting-started/quickstart.mdx +++ b/docs/getting-started/quickstart.mdx @@ -1,55 +1,48 @@ --- title: Quickstart -description: Get Shumai up and running in minutes using Docker, NPM, or from source. +description: Get Shumai up and running using Docker, NPM, or from source. --- -We support three installation paths depending on your needs. For most users, **Docker Compose** is the fastest and easiest way to run Shumai. +We support three installation options. For most administrators, **Docker Compose** is the fastest and easiest way to deploy Shumai. --- ## Option 1: Docker Compose (Recommended) -Docker Compose configures and runs all required services (web application, PostgreSQL with pgvector, and S3 local storage) automatically. +Docker Compose automatically configures and spins up all required services (the web application, a database, and local storage). -### Local Stack - -A lightweight setup to run the core API and frontend using pre-built images. - -1. Download the docker-compose configuration: - ```bash - curl -o docker-compose.yaml https://raw.githubusercontent.com/shumaiOne/shumai/main/docker-compose/local/docker-compose.yaml - ``` -2. Spin up the containers: - ```bash - docker compose up -d - ``` -3. Open your browser and navigate to **`http://localhost:3000`** to access the Shumai Web UI. - -### Temporal Stack (Production-Ready / Development) - -For details on running the full Temporal worker orchestration stack, refer to the [Docker Setup Guide](/getting-started/docker). +1. **Download the Configuration**: + ```bash + curl -o docker-compose.yaml https://raw.githubusercontent.com/shumaiOne/shumai/main/docker-compose/local/docker-compose.yaml + ``` +2. **Start the Services**: + ```bash + docker compose up -d + ``` +3. **Access the Dashboard**: + Open your browser and navigate to **`http://localhost:3000`** to access the Shumai Web UI. --- -## Option 2: Install from NPM +## Option 2: Install via NPM -You can run Shumai as a global npm package. This requires installing the system-level dependencies manually. +You can run Shumai as a global service using the Node Package Manager (NPM). -### Prerequisites +### System Prerequisites -1. **FFmpeg & FFprobe**: Required for media transcoding and metadata extraction. - - **macOS**: `brew install ffmpeg` - - **Linux**: `sudo apt-get install ffmpeg` -2. **Sandbox Executable Dependencies**: Shumai runs AI agents inside secure, isolated sandboxes. - - **macOS**: Requires `ripgrep` (`brew install ripgrep`). - - **Linux**: Requires `bubblewrap`, `socat`, and `ripgrep` (`sudo apt-get install bubblewrap socat ripgrep`). On Ubuntu 24.04+, run: - ```bash - sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 - ``` +To handle media processing and security isolation, the host machine must have the following system utilities installed: -### Step-by-Step NPM Setup +- **FFmpeg & FFprobe**: Required for video transcoding and metadata extraction. + - _macOS_: `brew install ffmpeg` + - _Linux (Ubuntu/Debian)_: `sudo apt-get install ffmpeg` +- **Agent Sandbox Utilities**: Used to run custom automation scripts securely. + - _macOS_: `brew install ripgrep` + - _Linux (Ubuntu/Debian)_: `sudo apt-get install bubblewrap socat ripgrep` -1. **Start PostgreSQL with pgvector**: +### Step-by-Step Setup + +1. **Start a Database**: + Shumai requires a PostgreSQL database with the `pgvector` extension. Start a database container: ```bash docker run --name shumai_postgres \ -e POSTGRES_USER=shumai \ @@ -58,50 +51,52 @@ You can run Shumai as a global npm package. This requires installing the system- -p 5432:5432 \ -d pgvector/pgvector:pg18 ``` -2. **Install Shumai globally**: +2. **Install Shumai**: ```bash npm install -g @shumai-one/shumai ``` 3. **Configure Environment Variables**: - Create a new directory and save a `.env` file inside it: + Create a new directory, navigate into it, and create a `.env` file: ```bash mkdir shumai && cd shumai ``` - Create `.env`: + Create a `.env` file with the following variables: ```env DATABASE_URL=postgresql://shumai:shumai_password@localhost:5432/shumai_db?schema=public - BETTER_AUTH_SECRET=your-random-32-byte-secret-key + BETTER_AUTH_SECRET=your-random-32-character-secret-key STORAGE_BACKEND=local AWS_ENDPOINT_URL_S3=http://localhost:3000 ``` -4. **Run the application**: +4. **Start Shumai**: ```bash shumai ``` - Access the UI at `http://localhost:3000`. + Open your browser to `http://localhost:3000`. --- ## Option 3: Run from Source (For Developers) -Follow these steps to run Shumai locally for development: +If you wish to run Shumai locally to customize the platform or contribute: -1. **Clone the Repository & Install Dependencies**: +1. **Clone the Repository**: ```bash git clone https://github.com/shumaiOne/shumai.git cd shumai + ``` +2. **Install Dependencies**: + ```bash bun install ``` -2. **Start the Database**: - Spin up a `pgvector` container as shown in the NPM option above. -3. **Prepare Environment Variables**: - Copy the environment variables template or create a `.env` file at the root of the workspace. -4. **Run Database Migrations**: +3. **Start a Database**: + Launch a local database container (as described in the NPM section above). +4. **Run Migrations**: + Set up your `.env` file at the root, then apply database migrations: ```bash bun run db:migrate ``` -5. **Start the Development Server**: +5. **Start the Dev Server**: ```bash bun run dev ``` - This launches the React frontend (running on port `3000`) and the Hono API backend simultaneously. + This spins up the web server on port `3000` with hot-reloading active. diff --git a/docs/using-shumai/agent-providers.mdx b/docs/using-shumai/agent-providers.mdx index f05b0872..faec96d2 100644 --- a/docs/using-shumai/agent-providers.mdx +++ b/docs/using-shumai/agent-providers.mdx @@ -3,8 +3,7 @@ title: AI Providers description: Connect Shumai to OpenAI, Anthropic, Gemini, or custom LLM gateways. --- -thought -To enable AI Agents, metadata autofill, and semantic search, Shumai must be connected to an AI model provider. Team Owners can manage these credentials under the **AI Providers** settings tab. +To enable AI Agents, metadata autofill, and semantic search, Shumai must be connected to an AI model provider. Team Owners can manage these credentials under the **AI Providers** settings tab. --- @@ -16,20 +15,20 @@ Shumai ships with pre-configured settings for major LLM providers: - **OpenAI**: Supports GPT-4, GPT-4o, and reasoning models. - **Anthropic**: Supports the Claude 3.5 Sonnet and Haiku models. -### Global Keys (Environment-level) +### Global Credentials -If you define environment variables like `GEMINI_API_KEY`, `OPENAI_API_KEY`, or `ANTHROPIC_API_KEY` in your `.env` file, the respective built-in provider will use these global credentials automatically, making them immediately available to the entire team. +If your system administrator has configured global keys (like `GEMINI_API_KEY`, `OPENAI_API_KEY`, or `ANTHROPIC_API_KEY`) in the server's environment variables, the respective built-in provider will use these credentials automatically, making them immediately available to the entire team. --- -## Custom Provider Configurations +## Custom Providers -If you want to use local models (e.g. via Ollama or vLLM) or private enterprise proxy gateways, you can register custom providers: +If you want to use local models (via Ollama or vLLM) or private enterprise proxy gateways, you can register custom providers: 1. Navigate to **Team Settings** > **AI Providers**. 2. Click **Add Provider**. 3. Fill in the configuration parameters: - - **Provider Name**: e.g., `Ollama-Local` or `Enterprise-Gateway`. + - **Provider Name**: E.g., `Ollama-Local` or `Enterprise-Gateway`. - **Base URL**: The target API URL (e.g., `http://localhost:11434/v1` for Ollama). - **API Key**: The authentication token (use `nokey` if local/unauthenticated). 4. **Register Models**: Define the list of model IDs and names (e.g., model ID `llama3`, name `Llama 3`) that this provider exposes. diff --git a/docs/using-shumai/agent-sandbox.mdx b/docs/using-shumai/agent-sandbox.mdx index 1dc04028..975b344f 100644 --- a/docs/using-shumai/agent-sandbox.mdx +++ b/docs/using-shumai/agent-sandbox.mdx @@ -3,38 +3,37 @@ title: Agent Sandbox description: Secure execution environment and network domain restrictions for AI agent scripts. --- -Running untrusted or LLM-generated code poses security risks. Shumai resolves this by executing all agent skills inside a secure, containerized, and restricted **Agent Sandbox** environment. +Running automated scripts poses security risks. Shumai resolves this by executing all agent skills inside a secure, isolated **Sandbox** environment. --- -## Sandbox Architecture +## Sandbox Security The sandbox restricts the execution process from accessing the host filesystem, system processes, and internal networks: -- **macOS Isolation**: Uses the native `sandbox-exec` utility with custom profiles that prevent unauthorized read/write access. -- **Linux Isolation**: Uses `bubblewrap` (bwrap) to build an unprivileged user namespace container with a minimal read-only root mount and strict seccomp system call filters. -- **Network Bridging**: External network calls from inside the sandbox are intercepted and routed through a secure proxy bridge (`socat`). +- **Isolation**: Scripts run in a virtualized workspace container that prevents them from modifying critical system files or reading other project data. +- **Network Bridging**: External network calls from inside the sandbox are strictly monitored. --- ## Domain Whitelisting -By default, sandboxed code cannot make outbound HTTP requests to the internet. Team Owners must explicitly authorize external APIs by managing domain access: +By default, sandboxed scripts cannot make network requests to the internet. Team Owners must explicitly authorize external APIs by managing domain access: ### Allowed Domains -A list of domains (with wildcard support) that sandboxed scripts are permitted to access. +A list of domains that sandboxed scripts are permitted to access. -- Default whitelisted domains include standard package registries: `registry.npmjs.org`, `pypi.org`, and public repositories like `github.com`. -- If a script needs to call a webhook or external API (e.g. `api.slack.com`), the admin must add it to the allowed list. +- Default whitelisted domains include standard package registries (like npm or python package hosts) and repository hosts (like `github.com`). +- If a script needs to call an external API (e.g. `api.slack.com`), the administrator must add it to the allowed list. ### Pending Domains When an agent script attempts to reach a domain that is not currently authorized: -1. The outbound connection is blocked immediately. -2. The target domain is logged and added to the **Pending Domains** list in settings. -3. Admins can review this list and click **Approve** to transfer it to Allowed Domains, or **Reject** to keep it blocked. +1. The network connection is blocked immediately. +2. The target domain is logged and added to the **Pending Domains** list. +3. Admins can review this list and click **Approve** to authorize the domain, or **Reject** to keep it blocked. ![Agent Sandbox Settings Placeholder](https://placehold.co/800x400/2C2E3E/D95A66?text=Agent+Sandbox+Domain+Manager) _Placeholder: Security settings page showing lists of Allowed Domains, Pending Domains with Approve/Deny buttons, and sandbox audit logs._ diff --git a/docs/using-shumai/agent-skills.mdx b/docs/using-shumai/agent-skills.mdx index 6d155dd9..7fb33618 100644 --- a/docs/using-shumai/agent-skills.mdx +++ b/docs/using-shumai/agent-skills.mdx @@ -1,19 +1,18 @@ --- title: Agent Skills -description: Extend your agents' capabilities with custom JavaScript/TypeScript tool scripts. +description: Extend your agents' capabilities with custom automation tools. --- -By default, LLMs can only process text. In Shumai, you can extend your agents' capabilities by registering **Skills**—custom scripts that the agent can choose to execute when solving a task. +By default, AI models can only process text. In Shumai, you can extend your agents' capabilities by registering **Skills**—custom scripts that the agent can run when solving a task. --- ## How Skills Work -Shumai skills are structured as standard functions that accept a JSON input payload and execute inside a secure, sandboxed environment. +Skills are actions that you define and make available to your AI agents. -- **Function Declarations**: When you register a skill, you write a description and declare a parameters schema using JSON Schema format. -- **Tool Calling**: The LLM reads this schema. If it decides it needs to use the skill (e.g. to search a folder or calculate a statistic), it outputs a structured tool call. -- **Execution**: Shumai catches the tool call, spins up a secure sandbox, runs your skill script with the LLM's arguments, and returns the result back to the LLM to complete its response. +- **Descriptions for the AI**: When you register a skill, you write a clear description of what the skill does. The AI agent reads this description to understand when it should use the tool. +- **Tool Execution**: When the Chat Agent decides it needs to use a skill (for example, to post a message to Slack or look up information), it requests to run that skill. Shumai executes the script in the background and returns the results to the agent. --- @@ -24,24 +23,11 @@ To add a new skill, navigate to **Team Settings** > **Skills**: 1. Click **Create Skill**. 2. Fill in the parameters: - **Name**: E.g., `image_resizer` or `slack_notify`. - - **Description**: A clear explanation of what the tool does (the LLM reads this description to understand when to invoke it). - - **Parameters Schema**: A JSON Schema describing the input arguments. - - **Script Code**: The actual JavaScript code to be executed. + - **Description**: A clear explanation of what the tool does (e.g. "Use this tool to send a Slack message to the team channel"). + - **Parameters**: Define the input parameters the agent must provide (such as the target channel name and the message text). + - **Script Code**: The automation script code uploaded by your administrator. 3. Click **Save**. 4. Navigate to **Agents** and check the box to assign this skill to your chosen Chat Agent. -```javascript -// Example Skill Script: slack_notify -// Receives parameter: { channel: string, message: string } -async function main(args) { - const response = await fetch(`https://hooks.slack.com/services/${args.channel}`, { - method: 'POST', - body: JSON.stringify({ text: args.message }), - headers: { 'Content-Type': 'application/json' }, - }) - return response.ok ? 'Notification sent' : 'Failed to send' -} -``` - ![Skills List View Placeholder](https://placehold.co/800x400/2C2E3E/D95A66?text=Agent+Skills+List) _Placeholder: Table displaying custom skills, their descriptions, code editors, and the list of agents currently utilizing them._ diff --git a/docs/using-shumai/agents.mdx b/docs/using-shumai/agents.mdx index 64cfef0e..293158cd 100644 --- a/docs/using-shumai/agents.mdx +++ b/docs/using-shumai/agents.mdx @@ -11,7 +11,7 @@ Shumai uses specialized AI Agents to perform background automation, chat workflo Shumai supports three types of agents: -### 1. Chat Agent (`chat`) +### 1. Chat Agent An interactive, conversational bot that appears in your project workspace. @@ -19,7 +19,7 @@ An interactive, conversational bot that appears in your project workspace. - The agent is context-aware: it can read files, search the project folder, inspect metadata, and read comment threads. - You can attach custom "Skills" to a chat agent, enabling it to write files, run scripts, or interact with external APIs on your behalf. -### 2. Autofill Agent (`autofill`) +### 2. Autofill Agent A background agent that monitors file uploads. @@ -27,12 +27,12 @@ A background agent that monitors file uploads. - It analyzes the file's content (multimodal images, text descriptions) and populates any metadata fields flagged for "AI Autofill". - This is highly effective for automating tags, description summaries, camera settings, and video transcripts. -### 3. Embedding Agent (`embedding`) +### 3. Embedding Agent -A specialized utility agent that processes assets to generate vector embeddings. +A specialized utility agent that processes assets to generate search indexes. -- It runs embedding models (like OpenAI's `text-embedding-3-small` or local variants) on asset text, captions, or image descriptions. -- These vectors are saved in the `asset_embeddings` table to power Shumai's natural language semantic search capabilities. +- It runs embedding models on asset text, captions, or image descriptions. +- These search indexes are saved to power Shumai's natural language semantic search capabilities. --- @@ -43,7 +43,7 @@ To edit or create an agent, navigate to **Team Settings** > **Agents**: - **Enabled / Disabled Toggle**: Stop or start the agent. If the embedding agent is disabled, semantic search indexing is paused. - **System Prompt / Soul**: The core instructions that define the agent's behavior, guidelines, formatting requirements, and operational limits. - **Model Provider**: Select which registered provider and model the agent should use for execution. -- **Assigned Skills**: Select which custom javascript skills this agent is permitted to execute. +- **Assigned Skills**: Select which custom skills this agent is permitted to execute. ![Agent Config Panel Placeholder](https://placehold.co/800x450/2C2E3E/D95A66?text=Agent+Configuration+Dashboard) _Placeholder: Configuration screen showing an agent's soul text editor, model dropdown, and assigned skills checkbox list._ diff --git a/docs/using-shumai/collections.mdx b/docs/using-shumai/collections.mdx index 7b2f02f4..bdc1ee35 100644 --- a/docs/using-shumai/collections.mdx +++ b/docs/using-shumai/collections.mdx @@ -9,48 +9,27 @@ Instead of copying files into static folders, Shumai uses **Collections**—dyna ## What is a Collection? -A **Collection** does not move or duplicate files on disk. Instead, it runs a pre-defined filter query against your project assets database. Whenever a new file is uploaded or metadata is updated to match the collection's query, the file automatically appears inside the collection. +A **Collection** does not duplicate files on disk. Instead, it runs a pre-defined filter query against your project assets database. Whenever a new file is uploaded or metadata is updated to match the collection's query, the file automatically appears inside the collection. --- ## Setting Up Collection Filters -When creating or editing a collection, you specify a name and set up a **Collection Filter**: - -```json -{ - "sourceFolderId": "ulid_of_root_folder", - "searchFilter": { - "operator": "AND", - "conditions": [ - { - "field": "metadata.status", - "operator": "eq", - "value": "Approved" - }, - { - "field": "type", - "operator": "is", - "value": "file" - } - ] - } -} -``` +When creating or editing a collection, you specify a name and set up a filter query in the builder interface: ### 1. Source Folder -Specify the folder root where the query starts. The collection will scan this directory and all its nested subfolders recursively. +Specify the starting folder directory. The collection will scan this folder and all its nested subfolders recursively. ### 2. Operators and Conditions -- **Logical Operators**: Combine conditions using `AND` (all conditions must be met) or `OR` (at least one condition must be met). -- **Fields**: Filter on standard fields (name, type, size, etc.) or custom metadata fields (using the `metadata.` prefix). -- **Comparison Operators**: - - `is`, `eq` (equals), `neq` (not equal) - - `contains`, `notContains` (substring matches) - - `gt` (greater than), `gte`, `lt`, `lte` (numeric/date ranges) - - `isEmpty`, `isNotEmpty` (checks if field contains values) +- **Logical Operators**: Combine conditions using **AND** (all conditions must be met) or **OR** (at least one condition must be met). +- **Fields**: Filter on standard fields (name, type, size) or custom metadata fields (such as "Status" or "Approval"). +- **Comparison Rules**: + - _Equals / Does Not Equal_: Match exact values. + - _Contains / Does Not Contain_: Match parts of words. + - _Greater Than / Less Than_: Set up numeric or date ranges (e.g., date uploaded is after yesterday). + - _Is Empty / Is Not Empty_: Check if fields have values. ### 3. Collection Default Sorting @@ -60,9 +39,9 @@ Define a custom sorting rule specific to the collection (e.g., sort by the custo ## Example Use Cases -- **Review Dashboard**: A collection named "Pending Review" that displays assets where `metadata.status` equals `In Review`. -- **Daily Deliverables**: A collection filtering files uploaded in the last 24 hours with `type` equal to `file`. -- **Approved Marketing Assets**: A collection filtering assets matching `metadata.tag` contains `marketing` AND `metadata.approved` is `true`. +- **Review Dashboard**: A collection named "Pending Review" that displays assets where `Status` equals `In Review`. +- **Daily Deliverables**: A collection filtering files uploaded in the last 24 hours. +- **Approved Assets**: A collection filtering assets matching `Tag` contains `marketing` AND `Approved` is `Yes`. ![Collection Creation Placeholder](https://placehold.co/800x450/2C2E3E/D95A66?text=Create+Collection+Query+Builder) _Placeholder: Interface modal of the Collection builder, displaying how filters are added and previewed._ diff --git a/docs/using-shumai/comments.mdx b/docs/using-shumai/comments.mdx index fe3e8854..f3aae644 100644 --- a/docs/using-shumai/comments.mdx +++ b/docs/using-shumai/comments.mdx @@ -1,35 +1,35 @@ --- title: Comments & Annotations -description: Collaborate on media assets using frame-level drawings and timestamped comments. +description: Collaborate on media assets using drawings and timestamped comments. --- -Shumai provides a feedback workflow designed for video, audio, and image review. Instead of generic text comments, you can drop timestamped feedback and sketch directly onto video frames or images. +Shumai provides a review workspace designed for video, audio, and image feedback. Instead of generic text comments, you can drop timestamped feedback and sketch directly onto the media. --- -## Time-Based Comments +## Timestamped Comments -When reviewing video or audio assets, comments can be anchored to specific moments in time: +When reviewing video or audio files, comments can be anchored to specific seconds on the timeline: -1. Play or scrub the video to the desired timestamp. -2. Type your feedback in the comment input box. -3. Click **Submit**. The comment is saved with the exact timestamp (`second` field in the database) and shown as a marker on the player timeline. -4. Clicking a comment card in the comments sidebar automatically jumps the media player to that exact timestamp. +1. Play or scrub the video player to the exact frame or timestamp you want to review. +2. Type your feedback in the comment box. +3. Click **Submit**. Your comment will be saved with a timestamp marker shown on the video timeline. +4. Collaborators can click your comment card in the sidebar to jump the video player to the exact moment you commented on. ![Timestamp Comments Placeholder](https://placehold.co/800x400/2C2E3E/D95A66?text=Video+Player+with+Comment+Timeline) -_Placeholder: Screenshot of the video review interface showing comments linked to timestamp markers on the timeline._ +_Placeholder: Screenshot of the video review interface showing comments linked to markers on the timeline._ --- ## Draw Annotations (Canvas) -To give precise visual feedback, you can draw directly onto image or video frames: +To give clear visual feedback, you can draw directly onto image or video frames: -1. Pause the video on the frame you wish to comment on. -2. Select a drawing tool (brush, rectangle, circle, arrow) from the annotation toolbar overlay. -3. Draw directly on the video player/canvas. -4. Your drawing coordinates are captured and saved as a JSON payload (`annotation` field in `AssetComment`) associated with your comment. -5. When other users click on your comment, the drawing is overlaid on the video player canvas at the corresponding frame. +1. Pause the video on the frame you wish to annotate. +2. Select a drawing tool (brush, rectangle, circle, arrow) from the annotation toolbar overlaying the player. +3. Draw directly on the video screen. +4. Type your comment and click **Submit**. Your drawing is saved along with your comment. +5. When other users select your comment, your drawings will overlay on the player screen automatically at that frame. ![Draw Annotations Placeholder](https://placehold.co/800x400/2C2E3E/D95A66?text=Frame-Level+Drawing+Overlay) _Placeholder: Screenshot showing the drawing canvas overlay over a video frame with visual arrows and circles._ @@ -38,18 +38,16 @@ _Placeholder: Screenshot showing the drawing canvas overlay over a video frame w ## Comment Threads (Replies) -You can reply to any comment to create threaded discussions: +Keep discussions organized by replying directly to feedback: -- Click **Reply** on any comment card. -- Type your message. Replies are nested under the parent comment using the `replyToId` field. -- Threaded comments are sorted chronologically. +- Click **Reply** on any comment. +- Replies are nested under the parent comment card, making it easy to track resolution conversations. --- -## Comment Attachments +## Attachments -Need to attach a reference image, PDF, or document to your feedback? +You can attach reference documents, style guides, or other assets to your comments: -- Click the **Paperclip** icon inside the comment input. -- Select the file to upload. -- Attachments are uploaded to the storage backend and linked to the comment via the `AssetCommentAttachment` relation. +- Click the **Paperclip** icon inside the comment input box. +- Choose a file to upload. It will appear as a downloadable link directly on your comment card. diff --git a/docs/using-shumai/metadata.mdx b/docs/using-shumai/metadata.mdx index 59a38430..b4dec6cb 100644 --- a/docs/using-shumai/metadata.mdx +++ b/docs/using-shumai/metadata.mdx @@ -3,29 +3,28 @@ title: Asset Metadata description: Customize your assets with dynamic, team-scoped metadata fields and AI autofill features. --- -Standard file systems restrict you to basic properties like file size and modified dates. Shumai allows you to create a custom, structured schema of metadata fields tailored to your production pipeline. +Standard file systems restrict you to basic properties like file size and modified dates. Shumai allows you to create custom fields tailored to your production pipeline. --- -## Metadata Field Scopes +## Metadata Scopes -Metadata fields can be scoped to different structural levels: +Custom fields can be defined at different scopes: -- **System Scope**: Universal fields defined by system admins that appear across all teams and projects. -- **Team Scope**: Fields inherited by all projects within a specific team. Useful for maintaining company-wide tagging or department standards. +- **System Scope**: Universal fields defined by system administrators that appear across all teams and projects. +- **Team Scope**: Fields inherited by all projects within a team. Useful for maintaining company-wide tagging or department standards. - **Project Scope**: Custom fields restricted to a single project workspace. --- -## Field Types +## Custom Field Types -When creating a new metadata field, you can choose from the following data types: +When creating a new field, you can choose from the following data types: -- **String**: Simple text fields, descriptions, or status labels. -- **Number**: Numeric values (e.g. frame rates, rating scores). -- **Boolean**: Simple toggles (e.g. `Approved`, `Needs Transcoding`). -- **Date**: Calendar selection (e.g. `Due Date`, `Publication Date`). -- **JSON**: Structured JSON objects for storing complex key-value configurations or custom logs. +- **Text (String)**: For simple text, descriptions, tags, or status labels. +- **Number**: For numeric values (e.g. frame rates, rating scores, review passes). +- **Yes/No (Boolean)**: Simple toggles (e.g. `Approved`, `VFX Required`). +- **Date**: Calendar selection (e.g. `Due Date`, `Launch Date`). --- @@ -33,14 +32,14 @@ When creating a new metadata field, you can choose from the following data types ### Read-Only -When enabled, standard users cannot edit the metadata value through the dashboard interface. This is ideal for system values populated by background services (like transcode resolutions or AI confidence scores). +When enabled, standard team members cannot edit the field value through the dashboard interface. This is ideal for fields populated automatically by background tasks (like video resolution, audio formats, or AI confidence scores). ### AI Autofill -If a field is flagged for **AI Autofill**, Shumai's background worker will automatically analyze the asset contents (using the team's default Gemini model) upon upload. +If a field is flagged for **AI Autofill**, Shumai's background worker will automatically analyze the asset contents using the team's default Gemini model upon upload. -- For video/images: The AI analyzes the visuals to extract descriptions, suggest tags, or classify genres. -- The metadata values are updated automatically when the asset moves to `processed` status. +- For video/images: The AI analyzes the visuals to suggest tags, write description summaries, or classify content themes. +- The metadata values are updated automatically once the asset is ready. ![Metadata Manager Placeholder](https://placehold.co/800x400/2C2E3E/D95A66?text=Metadata+Schema+Builder) _Placeholder: Screenshot of the metadata builder interface, demonstrating creating a new field with the AI Autofill toggle._ diff --git a/docs/using-shumai/notifications.mdx b/docs/using-shumai/notifications.mdx index b4293531..a15a9741 100644 --- a/docs/using-shumai/notifications.mdx +++ b/docs/using-shumai/notifications.mdx @@ -7,34 +7,31 @@ Shumai includes a built-in notification system to keep you informed of team acti --- -## Notification Types +## What Triggers a Notification? -The following actions trigger system notifications: +You will receive notifications for the following events: -- **Comment Created**: Triggered when a new comment is posted on an asset you created or are watching. -- **Reply Created**: Triggered when someone replies directly to a comment thread you participated in. -- **Mentions**: Sent immediately if a collaborator tags you (using `@username`) in any comment. -- **Upload Complete**: Sent when a file you uploaded transitions from the `processing` state to `processed`. -- **Metadata Status Update**: Sent when a custom metadata field representing progress or status is modified. -- **User Joins**: Notifies owners when a new user joins the Team or Project via an invite link. +- **New Comments**: When a collaborator comments on an asset you created or are watching. +- **Thread Replies**: When someone replies directly to a comment thread you participated in. +- **Direct @Mentions**: Sent immediately if someone tags you (using `@username`) in any comment. +- **Upload Finished**: Sent when a file you uploaded is finished transcoding and is ready for review. +- **Status Changes**: Sent if a critical metadata field (like a file's "Approval Status") is updated. +- **New Members**: Notifies project owners when a new collaborator joins their project via invite link. --- ## Project-Level Notification Toggles -If you find yourself in a highly active project, you can toggle notifications off for that specific project: +If you are working in a highly active project and want to reduce noise, you can disable notifications for that project: -1. Navigate to your **Project Settings**. +1. Navigate to **Project Settings**. 2. Locate the **Enable Notifications** toggle. 3. Turn it off. You will stop receiving updates for file uploads and standard comments in this project, but direct `@mentions` will still be delivered to your inbox. -![Notification Toggles Placeholder](https://placehold.co/800x300/2C2E3E/D95A66?text=Project+Notification+Settings) -_Placeholder: Settings view showcasing user preference toggles for email and in-app notifications._ - --- ## The Notification Inbox -- The bell icon in the navigation bar displays a red badge when you have unread notifications. -- Clicking it opens your inbox list. -- Clicking a notification card (like a new comment) will mark it as read and redirect you directly to the relevant asset and comment thread. +- The **Bell** icon in the navigation bar displays a red badge when you have unread notifications. +- Click the bell to open your inbox panel. +- Clicking any notification card will mark it as read and take you directly to the relevant file and comment thread. diff --git a/docs/using-shumai/semantic-search.mdx b/docs/using-shumai/semantic-search.mdx index 63061dca..4fa6287c 100644 --- a/docs/using-shumai/semantic-search.mdx +++ b/docs/using-shumai/semantic-search.mdx @@ -9,31 +9,21 @@ Traditional search relies on matching exact characters (e.g., searching "dog" wi ## How Semantic Search Works -Semantic search translates text and media into high-dimensional numerical vectors (embeddings) where similar concepts sit close to each other. +Semantic search translates text queries and file contents into conceptual profiles. Similar ideas and visuals are mapped near each other. -```mermaid -graph LR - UserQuery["User Query: 'sunset at the beach'"] --> EmbedAPI[Embedding Model] - EmbedAPI --> VectorQuery[Query Vector] - VectorQuery --> SimilarityMatch[Cosine Distance Comparison] - DB[(PostgreSQL + pgvector)] --> SimilarityMatch - SimilarityMatch --> Results[Return: 'ocean_dusk.mp4'] -``` - -1. **Ingestion**: When an asset is uploaded and processed, the **Embedding Agent** converts the file's description, text, or visual tags into a 1536-dimensional vector. -2. **Storage**: These vectors are stored in the `asset_embeddings` table in PostgreSQL, utilizing the **`pgvector`** extension for indexing. -3. **Querying**: When you search with the "Semantic" toggle enabled, Shumai converts your search query into a vector and queries the database for the closest vector matches using cosine distance. +1. **Index Generation**: When you upload an asset, Shumai's background agent scans the file's visual elements, text contents, or descriptions, translating them into a concept profile. +2. **Concept Matching**: When you search with the "Semantic" toggle enabled, Shumai matches the conceptual meaning of your query against your assets. +3. **Result**: Searching "sunset at the beach" will successfully find a video file of ocean waves at dusk, even if the filename is `IMG_4029.mp4`. --- -## Setting Up Semantic Search +## Activating Semantic Search -To activate semantic search in your team workspace: +To use semantic search: -1. Navigate to **Team Settings** > **Agents**. -2. Verify that you have created an **Embedding Agent** (`type` set to `embedding`) and it is toggled **Enabled**. -3. Ensure the agent is linked to a valid embedding model (e.g., `text-embedding-3-small` from OpenAI, or a supported Google Gemini embedding endpoint). -4. Once the agent is active, Shumai will automatically begin indexing new uploads, and the **Semantic Search** toggle will appear on your file search explorer. +1. Verify that your administrator has enabled the **Embedding Agent** under **Team Settings** > **Agents**. +2. Once active, Shumai will automatically begin indexing new uploads. +3. Toggle the **Semantic** button next to the search input in the file explorer to search by conceptual meaning. ![Semantic Search Toggle Placeholder](https://placehold.co/800x200/2C2E3E/D95A66?text=Semantic+Search+Toggle+UI) _Placeholder: Screenshot of the search bar, emphasizing the active "Semantic" toggle option next to the text input._ diff --git a/docs/using-shumai/share-links.mdx b/docs/using-shumai/share-links.mdx index 32b83311..529654e0 100644 --- a/docs/using-shumai/share-links.mdx +++ b/docs/using-shumai/share-links.mdx @@ -33,9 +33,9 @@ Secure sensitive work by adding a password. External users visiting the link wil Set a default sorting rule for the shared page (e.g. sorting by name or version) to ensure the client views the files in the intended order. -### Metadata Field Visibility +### Column Visibility -To protect proprietary information, you can configure exactly which metadata fields are visible to external users. For example: +To protect proprietary information, you can configure exactly which metadata columns are visible to external users. For example: - **Visible**: `Asset Name`, `Resolution`, `Download Link`. - **Hidden**: `Internal Budget Code`, `Assignee Notes`, `Cost`. diff --git a/docs/using-shumai/sort-and-search.mdx b/docs/using-shumai/sort-and-search.mdx index 1415d70b..77eb5a3c 100644 --- a/docs/using-shumai/sort-and-search.mdx +++ b/docs/using-shumai/sort-and-search.mdx @@ -1,34 +1,34 @@ --- title: Sort & Search -description: Fast filtering, Ngram text searching, and ordering controls for assets. +description: Fast filtering, text search, and sorting controls for assets. --- -As your projects grow, finding the right media files quickly is critical. Shumai provides Ngram-based textual search and customizable sorting parameters. +As your projects grow, finding the right media files quickly is critical. Shumai provides search options and customizable sorting parameters. --- ## Searching Assets -The main search bar at the top of the file explorer allows you to perform exact and partial keyword matches. +The search bar at the top of the file explorer allows you to perform exact and partial keyword matches. ![Search Bar UI Placeholder](https://placehold.co/800x250/2C2E3E/D95A66?text=File+Explorer+Search+Bar) _Placeholder: Screenshot of the search input with toggle buttons for "Recursive Search" and "Filter by Type"._ -### Search Mechanics +### Search Filters -- **Ngram Indexing**: Shumai decomposes asset names into character sequences (Ngrams) stored in the database (`nameNgram` field) and indexed using a **PostgreSQL GIN (Generalized Inverted Index)**. This allows for instant partial matches and fuzzy auto-completions as you type. -- **Recursive Search**: Toggle between searching only in the **Current Folder** or **Recursively** down the entire nested folder tree. -- **Asset Type Filtering**: Restrict your search query to return only folders or only files. -- **Symlinks Toggle**: Choose whether to display symlinked assets (virtual links to files in other directories) in your search results. +- **Partial Matching**: Search matches any part of a file name as you type. +- **Recursive Search Toggle**: Choose whether to search only inside the **Current Folder** or search **Recursively** down the entire nested folder tree. +- **Asset Type**: Restrict your search to return only folders or only files. +- **Show Links**: Toggle whether virtual links (shortcuts to files in other projects or directories) should be displayed in your search results. --- ## Sorting Assets -You can sort lists of assets by clicking the column headers or selecting a sorting preference from the sort dropdown: +You can sort your files by clicking the column headers or selecting a preference from the sort dropdown: -- **Default Sort (ULID Sort)**: By default, assets are sorted by `id` descending. Because Shumai uses **ULIDs (Universally Unique Lexicographical Sortable Identifiers)** for asset IDs, sorting by ID descending automatically lists the newest uploads first without requiring an index on a `createdAt` timestamp. -- **Name**: Sort alphabetically. -- **Size**: Sort by file size in bytes. -- **Type**: Group folders together followed by files and version stacks. -- **Custom Metadata Columns**: If your project has defined custom metadata fields (such as "Due Date" or "Priority"), you can click those headers to sort the file list by these dynamic values. +- **Newest Upload**: Lists the most recently uploaded files first (default). +- **Name**: Sorts alphabetically (A-Z or Z-A). +- **Size**: Sorts by file size. +- **Type**: Groups folders together followed by files and version stacks. +- **Custom Metadata Columns**: If your project has custom columns defined (such as "Due Date" or "Priority"), you can click those headers to sort the file list by these custom criteria. diff --git a/docs/using-shumai/team-project-management.mdx b/docs/using-shumai/team-project-management.mdx index e59699a7..67046ef4 100644 --- a/docs/using-shumai/team-project-management.mdx +++ b/docs/using-shumai/team-project-management.mdx @@ -3,7 +3,7 @@ title: Team & Project Management description: Set up workspace boundaries, define roles, and invite collaborators. --- -Shumai uses a two-tier organizational hierarchy—**Teams** and **Projects**—to manage file access and access permissions. +Shumai uses a two-tier organizational hierarchy—**Teams** and **Projects**—to manage file access and collaboration. --- @@ -18,11 +18,11 @@ Shumai uses a two-tier organizational hierarchy—**Teams** and **Projects**—t ## Member Roles -Shumai implements role-based access control (RBAC) to restrict what actions users can perform: +Shumai uses permission roles to manage what actions team members can perform: ### Team Roles -- **Owner**: Full admin control over team settings, custom skills, provider credentials, and sandbox restrictions. +- **Owner**: Full administrative control over team settings, custom skills, provider credentials, and sandbox restrictions. - **Member**: General access to the team and its public projects. ### Project Roles diff --git a/docs/using-shumai/transcode-settings.mdx b/docs/using-shumai/transcode-settings.mdx index eb6cf9e8..968c75e1 100644 --- a/docs/using-shumai/transcode-settings.mdx +++ b/docs/using-shumai/transcode-settings.mdx @@ -1,39 +1,34 @@ --- title: Media Transcoding Settings -description: Configure video transcode strategies, proxy generation, and background transcoding workers. +description: Configure video transcode strategies and preview proxy generation. --- -High-resolution camera formats and raw media files (ProRes, DNxHR, MKV, etc.) cannot be rendered natively in web browsers. Shumai transcodes these assets into web-friendly streaming formats in the background. +High-resolution camera formats and raw media files cannot be rendered natively in web browsers. Shumai transcodes these assets into web-friendly streaming formats in the background. --- ## Video Transcode Strategies -Team Owners can select how aggressive the transcoding engine should be: +Team Owners can select how the transcoding engine handles uploaded files: ### 1. Best Match (`best_match`) -- **Behavior**: Shumai inspects the container, codecs, and bitrate of the uploaded file. -- **Skip Transcoding**: If the file is already a web-compatible H.264/AAC MP4, WebM, or MOV that browser engines can play directly, transcoding is skipped. +- **Behavior**: Shumai checks the parameters of the uploaded file. +- **Skip Transcoding**: If the file is already in a web-compatible format that browser engines can play directly (like standard MP4s), transcoding is skipped. - **Transcode**: If the file format is incompatible, it is transcoded. This is the recommended option as it saves processing time and storage space. ### 2. Transcode All (`all`) -- **Behavior**: Every single uploaded video is forced through the transcoding pipeline. -- **Output**: Converts the file into a standardized, web-optimized H.264/AAC MP4 profile. This ensures consistent streaming performance and compatibility across all client devices and browsers, regardless of the source. +- **Behavior**: Every single uploaded video is sent through the transcoding pipeline. +- **Output**: Converts the file into a standardized, web-optimized MP4 profile. This ensures consistent streaming performance and compatibility across all client devices and browsers, regardless of the source. ![Transcode Settings Placeholder](https://placehold.co/800x350/2C2E3E/D95A66?text=Media+Processing+Transcode+Strategy) _Placeholder: Web UI Settings screen displaying the Media Processing tab with the strategy toggle selectors._ --- -## Transcoding Architecture +## Processing Architecture -Transcoding is highly resource-intensive. Depending on your scaling needs: +Transcoding is resource-intensive. Depending on your scaling needs, your administrator can run the transcode engine on the main server (Local Single-Server mode) or delegate tasks to specialized transcoding worker machines (Distributed High-Scale mode). -- **Local Executor**: Running in local mode, the main application container runs the transcoding task using the local CPU. This is suitable for low-volume uploads. -- **Temporal Executor**: In production, transcoding tasks are offloaded to **Temporal**. You can spin up multiple transcoding worker machines running `@shumai-one/shumai-transcode` (preferably close to your S3 storage server) to process files in parallel. - -### System Requirements - -Every machine running the transcode process (the main container in Local mode, or the transcode worker in Temporal mode) must have `ffmpeg` and `ffprobe` installed and configured on the system PATH. +_Note: In all modes, the processing machine must have the standard system media utilities (`ffmpeg` and `ffprobe`) installed._ diff --git a/docs/using-shumai/upload.mdx b/docs/using-shumai/upload.mdx index faa7a151..52bfaebb 100644 --- a/docs/using-shumai/upload.mdx +++ b/docs/using-shumai/upload.mdx @@ -1,9 +1,9 @@ --- title: Upload File & Folder -description: How to upload, organize, and monitor assets in Shumai. +description: How to upload, organize, and monitor assets in your workspace. --- -Shumai makes it easy to bring creative media into your workspace. It supports standard file uploads, directory/folder structure preservation, and real-time upload progress indicators. +Shumai makes it easy to bring creative media into your workspace. It supports standard file uploads, folder structure preservation, and real-time upload progress indicators. --- @@ -11,39 +11,29 @@ Shumai makes it easy to bring creative media into your workspace. It supports st You can upload files and folders in two ways: -1. **Drag and Drop**: Drag files or entire folders directly from your system file explorer and drop them anywhere on the Shumai dashboard interface. -2. **Upload Buttons**: Click on the **Upload File** or **Upload Folder** buttons in the top-right toolbar. +1. **Drag and Drop**: Drag files or entire folder directories directly from your computer's file explorer and drop them anywhere on the Shumai dashboard interface. +2. **Upload Buttons**: Click the **Upload File** or **Upload Folder** buttons in the toolbar. ![Upload Interface Placeholder](https://placehold.co/800x400/2C2E3E/D95A66?text=Drag+and+Drop+Upload+Zone) -_Placeholder: Screenshot showing the dash upload dropzone with a progress indicator for incoming files._ +_Placeholder: Dashboard interface displaying the drag-and-drop zone and active progress bar._ --- -## Folder Uploads and Hierarchy +## Folder Uploads and Organization -When you upload a folder, Shumai reads the directory structure and replicates it inside your project. +When you upload an entire folder, Shumai replicates your folder hierarchy exactly inside the project. -- New folders are created in the database as `AssetType.folder` assets. -- Nested files are linked to their parent folders using the `parentId` field. -- There is no depth limit for nested subfolders. +- All subfolders are created automatically. +- Nested files remain in their respective subfolders. +- There is no limit to the depth of nested folders you can upload. --- -## Asset Status Lifecycle +## Upload and Processing States -Once an upload is initiated, the asset moves through the following database statuses: +Once an upload starts, your assets progress through the following states: -- `uploading`: The file chunks are actively being sent to the S3-compatible or local storage backend. The UI displays a progress bar indicating percentage completion. -- `uploaded`: The storage transfer is complete. -- `processing`: Shumai has queued background tasks for the asset. This includes extracting media metadata (resolution, codec, duration) and generating proxy files (transcoding) for web playback. -- `processed`: The file metadata is fully populated, transcoding is complete, and the asset is ready for viewing, search, and collaboration. -- `trashed`: The asset has been deleted by a user but is kept in the trash bin before permanent purging. - ---- - -## Storage Backends - -Depending on your configuration: - -- **Local Storage (`STORAGE_BACKEND=local`)**: Files are uploaded and stored directly on the host machine running Shumai. -- **S3 Storage (`STORAGE_BACKEND=s3`)**: Files are uploaded directly to your S3 bucket (e.g. Cloudflare R2, MinIO, AWS S3) via presigned URLs generated by the API, minimizing load on the Hono backend server. +- **Uploading**: The file is transferring to your storage server. The UI displays an active progress percentage. +- **Processing**: The file has successfully uploaded. Shumai is now extracting media parameters (such as resolution, video length, and audio codecs) and creating a web-friendly streaming preview (proxy). +- **Ready**: Processing is complete. The asset is fully visible, playable, and ready for comments, metadata tagging, or search. +- **Trashed**: The file has been deleted and sent to the Trash bin. You can restore it or purge it permanently. diff --git a/docs/using-shumai/version-stack.mdx b/docs/using-shumai/version-stack.mdx index 9b3360ef..a3018be4 100644 --- a/docs/using-shumai/version-stack.mdx +++ b/docs/using-shumai/version-stack.mdx @@ -3,24 +3,24 @@ title: File Version Stack description: Group multiple revisions of an asset under a single version-controlled stack. --- -When collaborating on creative assets, files naturally go through multiple iterations (e.g. `edit_v1.mp4`, `edit_v2.mp4`, `edit_final.mp4`). To prevent workspace clutter, Shumai allows you to bundle these revisions into a **Version Stack**. +When collaborating on creative assets, files naturally go through multiple iterations (e.g. `draft_v1.mp4`, `draft_v2.mp4`, `draft_final.mp4`). To prevent workspace clutter, Shumai allows you to bundle these revisions into a **Version Stack**. --- ## What is a Version Stack? -A **Version Stack** is a special asset type (`AssetType.version_stack`) that acts as a container for multiple files. Instead of showing three separate files in the directory list, Shumai collapses them into a single file entry with a version selector dropdown. +A **Version Stack** groups multiple revisions of the same file into a single entry. Instead of cluttering your folder with several similar files, Shumai collapses them into one item with a version badge (e.g., "V3") and a dropdown list of older versions. ![Version Stack Selector Placeholder](https://placehold.co/800x350/2C2E3E/D95A66?text=Version+Stack+Selector) -_Placeholder: File list view showing an asset with a version badge (e.g., "V3") and a dropdown list of older versions._ +_Placeholder: File list view showing an asset with a version badge and a dropdown list of older versions._ --- ## Creating a Version Stack 1. Select two or more files inside a folder using the checkboxes. -2. Click **Create Version Stack** in the bulk actions toolbar. -3. The system creates a new version stack asset. The selected files are moved inside the stack, and their parent folder's file count is updated accordingly. +2. Click **Create Version Stack** in the actions toolbar. +3. The files will be bundled together into a single, clean stack. _Note: All files grouped into a version stack must reside in the same parent folder._ @@ -30,13 +30,12 @@ _Note: All files grouped into a version stack must reside in the same parent fol ### Active Version -The file with the highest priority (first in the list) is the **Active Version**. This is the version displayed on the project dashboard, search results, and metadata panels. +The file at the top of the stack is the **Active Version**. This is the version displayed on your project dashboard, search results, and metadata panels. ### Reordering and Reverting Versions -You can promote a past version or reorder the stack structure: +You can promote a past version or reorder your stack: -- Open the version stack details view. -- Drag and drop the versions to change their order. -- Shumai uses fractional indexing (`sortIndex` column in the database) to instantly update the list order in transactions, avoiding global re-indexing. -- To remove a file from the version stack, drag it out or select **Unstack**. This moves the file back to the parent directory as a standalone asset. +- Open the version stack details sidebar. +- Drag and drop the versions in the list to change their order. The version you drag to the top automatically becomes the active version. +- To remove a file from the stack, drag it out or select **Unstack**. This moves the file back to the parent folder as a standalone file.