Skip to content
Projects

lien0219/trademind-ai has 41 GitHub stars and 15 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-15 16:12 UTC. Last push 2026-11-09.

How these counts are measured

Measured star growth

in 24h
0
in 7 days
Update delayed
in 15 days
Update delayed
in 1 month
Update delayed

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

About

Open-source AI operations platform for cross-border commerce: product collection, drafts, AI content optimization, publishing, and order/inventory workflows.

AI

README.en.md

Original

TradeMind

Open-source AI Platform for Cross-border Commerce Growth

License Go React TypeScript Docker Self-hosted

简体中文 | English

Quick Start · Screenshots · Core Capabilities · Architecture & Stack · Docs

TradeMind Product Preview

TradeMind is an open-source AI operations platform for cross-border sellers, brand teams, and developers. It turns product collection, enrichment, content generation, image processing, draft collaboration, platform listing, order sync, and inventory coordination into one observable workflow, with an auditable, self-hosted foundation that can evolve around each team’s operating model.

Why TradeMind

Area What TradeMind focuses on
AI Product Growth Product collection, draft management, AI titles and descriptions, image processing, and publish-readiness checks in one workspace.
Multi-platform Operations Store authorization, order sync, SKU matching, inventory mirrors, and product publishing around a unified product asset.
Open and Controlled Provider-based architecture for AI, storage, image, platform, and collector integrations, with permissions, audit trails, and human confirmation for critical actions.
Multi-tenant Teams A shared identity can join multiple business tenants with separate roles, store grants, and request context. Tenant provisioning, invitations, session switching, and lifecycle controls use a separate platform control plane.

Screenshots

The screenshots below show TradeMind's core workflow: collection → draft → AI content optimization. Every step from product discovery to publish-ready content stays visible and traceable.

Collection Center
Collection Center: collector entry points and batch collection
Collection Tasks
Collection Tasks: URL submission, task tracking, and linked drafts
Collection Monitor
Collection Monitor: worker, task, and batch status visibility
AI Description Generation
AI Description Generation: generate highlights, specs, and descriptions for drafts

Core Capabilities

AI Product Operations

  • Product collection from 1688, Pinduoduo, Taobao / Tmall, and custom rules.
  • Product draft management for products, SKUs, images, inventory thresholds, collection warnings, and readiness checks.
  • AI title optimization and description generation with prompt templates, task records, compare/apply flows, and safe rollback.
  • AI image workflows through remove.bg, OpenAI Image, ComfyUI, and async task queues.

Multi-platform Operations

  • Store authorization with Douyin Shop OAuth, encrypted secrets, and connection tests.
  • Business tenants with controlled provisioning, member invitations, per-tenant roles and store grants, server-validated session switching, and suspension revocation. See the multi-tenant architecture for migration and acceptance boundaries.
  • Tenant business settings for language, timezone, reporting currency, collection rules, inventory thresholds, notifications, and branding, with configuration templates, history, import preview, and export.
  • Registration and email administration with open, invitation-only, and closed registration modes, email verification, password reset, SMTP settings, and categorized, previewable multilingual email templates.
  • Six admin UI languages: Simplified Chinese, English, Japanese, Traditional Chinese, Korean, and Thai, with tenant and personal language preferences.
  • Order collaboration with sync, SKU matching, and exception handling.
  • Inventory collaboration with stock mirrors, alerts, and sync tasks.
  • ERP procurement and returns with warehouse and supplier master data, manually confirmed replenishment-to-draft creation, purchase-order approval, partial receipts, receipt-bound supplier returns, warehouse movements, idempotent processing, and an Admin workspace with separated approval/execution duties and revision conflict protection.
  • Manual fulfillment allocation with whole-order, single-warehouse candidates and atomic reservation, followed by persistent same-warehouse picking waves, shortage recording, packing review, explicit local rate quoting with manual confirmation, and local completion with durable partial results and no automatic retry.
  • Sales after-sales V1 with item-level refund-only and return-and-refund cases, cumulative quantity protection, approval/receipt duty separation, and sellable or damaged receipt into the original order warehouse. After local completion, a separate refund execution record captures externally completed money results or confirms read-only platform facts; it still does not call payment or marketplace write APIs.
  • Store-scoped local settlement and advertising-fee CSV validation uses zero-write previews, explicit confirmation, and immutable facts. Versioned warehouse rate cards cover outbound, per-item picking, and per-package packing fees; advertising spend is deterministically attributed by shop-local day to paid, non-cancelled orders, with corrections recorded only as append-only adjustments or one-time reversals. Order profit estimate V5 consumes matched platform fees, valid confirmed warehouse-operation fees, and confirmed advertising allocations explicitly declared outside settlement coverage. Missing or coverage-unknown fees remain unset; these are operational estimates, not accounting COGS or booked costs.
  • Product publishing via a multi-platform listing center, single-product and batch draft creation, multi-product publish workflows, AI title/description review, AI image processing, draft mapping, publish tasks, recovery paths, and manual correction.
  • AI customer-service reply suggestions with manual confirmation before sending.

Engineering and Extensibility

  • Provider abstractions for AI, storage, image, platform, and collector integrations.
  • Self-host-friendly setup with PostgreSQL + Redis and a full Docker Compose deployment path.
  • Monorepo structure for backend, admin, collector, and docs, making team collaboration easier.
  • Reliability foundation with unified idempotency on critical writes, AI apply/undo protection, Webhook fast ACK, and worker leases against stale writeback.

Architecture and Stack

Layer Stack
Backend Go + Gin + GORM
Admin React + TypeScript + Ant Design Pro
Collector Node.js + TypeScript + Playwright
Data PostgreSQL + Redis
Deploy pnpm workspace + Docker Compose
Extension Points AI / Storage / Image / Platform / Collector Providers

Quick Start

Local Development

pnpm install
pnpm install:collector:browsers
pnpm dev

Useful commands:

pnpm check:dev
pnpm dev:infra
pnpm dev:backend
pnpm dev:admin
pnpm dev:collector
pnpm build:admin
pnpm build:collector
pnpm seed:demo-data
pnpm seed:demo-permissions

Development uses isolated PostgreSQL and Redis 7 services; see the local development guide for native service requirements. The complete automated regression suite runs continuously in GitHub Actions.

Docker Deployment

cp .env.example .env
# Set a unique random COLLECTOR_SERVICE_TOKEN (at least 32 characters) in .env
docker compose -f docker-compose.full.yml up -d --build

Windows PowerShell:

Copy-Item .env.example .env
# Set a unique random COLLECTOR_SERVICE_TOKEN (at least 32 characters) in .env
docker compose -f docker-compose.full.yml up -d --build

GitHub Actions publishes backend, admin, and collector to the single GHCR package ghcr.io/lien0219/trademind. The full Compose file still supports local builds; to use prebuilt images:

# Set COLLECTOR_SERVICE_TOKEN in .env, then override the image references below
TRADEMIND_BACKEND_IMAGE=ghcr.io/lien0219/trademind:backend-main
TRADEMIND_ADMIN_IMAGE=ghcr.io/lien0219/trademind:admin-main
TRADEMIND_COLLECTOR_IMAGE=ghcr.io/lien0219/trademind:collector-main
docker compose -f docker-compose.full.yml pull backend admin collector
docker compose -f docker-compose.full.yml up -d --no-build

Only main publishes candidate images; dev, pull requests, and other branches do not write to GHCR. Candidates use <service>-sha-<full-commit>, and all three services must pass platform, OCI revision, and Trivy gates before <service>-main moves. When deploy/IMAGE_VERSION changes or a maintainer explicitly selects a formal release, the workflow promotes the three digests from that commit to the immutable <service>-main-v<version> tags, then creates the matching v<version> tag and GitHub Release. Use the Release manifest's immutable image@sha256:<manifest-digest> references for production. See Docker deployment for the release procedure and migration notes.

Production uses a pull-only Compose file:

cp .env.example .env
# Set production secrets and the three image@sha256 references from the Release manifest
docker compose -f deploy/production/compose.yml pull
docker compose -f deploy/production/compose.yml up -d

Default URLs:

Service URL
Admin http://127.0.0.1:8000
Backend Health http://127.0.0.1:8080/health

In the full Compose stack, Collector is reachable only by the backend over the internal network and has no host port. PostgreSQL and Redis bind to host loopback only. Platform connections default to a controlled draft workflow: non-Douyin flows create local listing drafts first, while Douyin actions pass through permission checks and an operator-reviewed task before creating a platform draft.

The Admin root URL serves the public product homepage, with direct links to sign in or register before entering the operations workspace.

Further reading:

Documentation

Contributing and Community

  • Read CONTRIBUTING.md before opening a PR.
  • Review SECURITY.md for security reporting.
  • PRs that improve screenshots, sample data, or docs are also welcome.
  • Sponsorship info is available in docs/sponsor.md.

License

This project is open-sourced under the Apache License 2.0.