Skip to content

blkluv/mu

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,085 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

  ███╗   ███╗ ██╗   ██╗
  ████╗ ████║ ██║   ██║
  ██╔████╔██║ ██║   ██║
  ██║╚██╔╝██║ ██║   ██║
  ██║ ╚═╝ ██║ ╚██████╔╝
  ╚═╝     ╚═╝  ╚═════╝

An apparel brand that runs without humans.

AI designs every hour · 7 autonomous agents run the company · Hokkaido weather decides quantity · Price rises as it sells

wearmu.com · /developers · Press · MU CITY · MU × SIIIEEP (gated)

License: MIT Rust Fly.io Status Autonomous


What is MU?

MU is a fashion brand whose entire operation runs without human involvement.

  • Designs are generated by AI, every hour, every day, every month.
  • Quantity is set by an external natural phenomenon (the temperature in Teshikaga, Hokkaido).
  • Price rises as units sell — a bonding curve, not a Dutch auction.
  • Manufacturing is on-demand. Zero inventory. Zero waste.
  • Operation is fully automated: design → pricing → checkout → manufacturing → shipping → certificate.
  • The company itself runs autonomously — 7 in-process agents monitor health, treasury, customer support, refunds, compliance, vision drift, and self-improvement.

After initial setup, no human touches MU's day-to-day decisions.

"After AI as an assistant, the next era is AI as the operator. MU is that experiment." — Yuki Hamada, Founder


Three product lines + collabs

Line Frequency Quantity logic Price
MUGEN 無限 Hourly Drop number = pieces (cycle of #1–#108, #1 is rarest) ¥5,000–¥30,000 (progressive)
MUON 無音 Daily Temperature in Teshikaga, Hokkaido (°C) = pieces ¥5,000+ (progressive)
間 MA Daily/Weekly One piece in the world. Stripe pre-auth at bid time, capture on settle. ¥30,000+ (auction)
MU × NOUNS On request NOUNS DAO collab varies

Collab proposal system (8 partners live, 2026-05)

Unified DB-driven engine — adding a new collab is one CLI command, zero new Rust code.

Slug Partner SKUs Status
kichinan Kichinan / 富士見町 35 Approved · live
sweep MU × SIIIEEP (北参道 BJJ) 60+ Live (gated)
kokon 焼肉古今 (kokon.tokyo) 12 polos + tees Live (gated)
asoview Asoview Inc. 18 Active
elsoul ELSOUL LABO B.V. 18 Active
ele ELE (yuki's dog) 12 Active
nojimahal NOJIMAHAL / 野島繁昭 20 Active
ryozo RYOZO TOP TEAM (BJJ) 30 Active
jiufight SUPER YAWARA SWEEP CUP 2026 50 Active (tournament 5/24)
blank BLANK_ Executive Retreat for AI 1 (MA tee) Active

Every collab gets:

  • /proposals/<slug> LP (photos, bulk-order picker, Tinder-style feedback)
  • Generic API: GET /api/proposal/:slug/{state,skus} · POST /:slug/{sample,bundle,bulk,feedback,approve,revoke}
  • Stripe Checkout Sessions (100-item bundle cap) + Printful Mockup Generator pipeline
  • DB-driven allow-list in /api/v1/embed/products — no code changes for new partners

Progressive pricing — the more it sells, the more it costs

Sold | 0    1    2    3   ...   42   ...   100+
─────┼────────────────────────────────────────
¥    | 5000 5250 5500 5750 ... 15500 ... 30000 (cap)

The first buyer gets the lowest price. Wait, and you pay more. The opposite of a sale.


Multi-agent architecture

7 in-process agents run inside the same Fly machine as the HTTP server, each on its own interval. A scheduler ticks every minute and fires any agent whose interval has elapsed. All cycles persist to agent_journal. Telegram digest fires only for notable events, with per-agent 6-hour dedup.

Agent Interval What it does
🩺 business_health 1h Inventory ratio, SWEEP 👎 ratio, FB backlog, missing daily blog
💰 treasury 6h Stripe balance, 24h revenue/cost from collab_orders, estimated margin
📮 customer_support 30m Gemini classifies unreplied FB (severity / category / refund-recommended / 日本語 reply draft)
↩️ auto_refund 1h Refund requests ≤¥10,000 → Stripe Refund API auto; above threshold → escalate
📜 compliance_watch 24h Last-updated check on tokushoho/privacy/terms HTML + GDPR delete backlog
🧠 self_improvement 24h Scans agent_journal for repeat-error patterns across other agents
👁 vision_drift 24h Reads the 4-line public vision and scores how well today's decisions align

Manual trigger (admin token required):

curl -X POST "https://wearmu.com/admin/agent/run?token=...&name=treasury"

Dashboards (admin token required):

Storage: agent_journal(cycle_at, agent_name, observations, decisions, actions, summary, notable) in SQLite.


Tech stack

┌──────────────────────────────────────────────────────────────┐
│  Browser / External EC (CORS-enabled embed)                  │
└────────────────────┬────────────────────────────────────────-┘
                     │ HTTPS
┌────────────────────▼─────────────────────────────────────────┐
│  Fly.io  (mu-store, NRT, shared-cpu-1x · 256MB)              │
│  ┌──────────────────────────────────────────────────────┐    │
│  │  Rust / Axum 0.7  (store/src/main.rs)                │    │
│  │  ─ HTTP routes (/, /sweep, /admin/*, /api/v1/embed)  │    │
│  │  ─ dynamic_price() — bonding curve                   │    │
│  │  ─ Stripe Checkout + webhook (HMAC-SHA256)           │    │
│  │  ─ Printful order webhook (auto-confirm by default)  │    │
│  │  ─ Solana NFT issuance (MA line, dry-run pilot)      │    │
│  │  ┌────────────────────────────────────────────────┐  │    │
│  │  │  Background tokio tasks                        │  │    │
│  │  │  ─ Self-heal watcher (cron health)              │  │    │
│  │  │  ─ Agent scheduler → 7 agents                   │  │    │
│  │  │  ─ X (Twitter) auto-post worker                 │  │    │
│  │  │  ─ Auto-blog daily compose                      │  │    │
│  │  └────────────────────────────────────────────────┘  │    │
│  └────────────────┬─────────────────────────────────────┘    │
│  ┌────────────────▼─────────────────────────────────────┐    │
│  │  SQLite WAL (Fly volume, /data/products.db, 1GB)     │    │
│  │  products, mu_purchases, collab_products,            │    │
│  │  collab_orders, sweep_signals, customer_feedback,    │    │
│  │  agent_journal, auto_blog_posts, ma_council_*        │    │
│  └──────────────────────────────────────────────────────┘    │
└──────────────────────────────────────────────────────────────┘
                     ▲
                     │ webhooks / cron
   ┌─────────────────┴────────────────────────────────────────┐
   │  External services                                        │
   │  ─ Stripe         payments + balance + refunds            │
   │  ─ Printful       on-demand fulfillment + cost lookup     │
   │  ─ Gemini         design + FB classify + auto-blog        │
   │  ─ Telegram       agent digest + ops alerts               │
   │  ─ Resend         transactional email                     │
   │  ─ GitHub Actions deploy + scheduled crons                │
   │  ─ Cloudflare R2  mockup + lifestyle images               │
   └───────────────────────────────────────────────────────────┘
Layer Technology
Store backend Rust 1.88+, Axum 0.7, SQLite (rusqlite), Tokio
Hosting Fly.io (Tokyo region, shared-cpu-1x 256MB)
Design generation Google Gemini (gemini-3-pro-image-preview)
Text / classify Google Gemini (gemini-2.5-flash)
Weather oracle wttr.in (Teshikaga, Hokkaido)
Manufacturing Printful — global on-demand fulfillment, auto-confirm default
Payments Stripe Checkout (JPY) + Stripe Refunds API
NFT certificates Solana compressed NFTs via Helius (MA line, dry-run pilot)
Image CDN Cloudflare R2 (mockups.wearmu.com, lifestyle.wearmu.com)
Cron GitHub Actions + in-process tokio loops

External embed — put MU products on any site

MU exposes a CORS-open API + drop-in JS widget so any EC site / blog can embed live products in one line.

<div id="mu-mount"></div>
<script src="https://wearmu.com/embed.js"
        data-brand="mugen" data-count="6"
        data-container="#mu-mount" data-theme="dark" defer></script>

Three integration paths:

  • JS widget: /embed.js — auto-mount via data-* attrs, or MU.mount({...}) API
  • iframe: /embed/products?brand=mugen&count=6 — for non-JS environments
  • JSON API: GET /api/v1/embed/products?brand=mugen&limit=12&available=1 — server-side

Full docs + live preview: wearmu.com/developers

CORS allows GET / OPTIONS from any origin. Write endpoints (POST /api/checkout) stay same-origin so Stripe forms remain isolated.


Repository layout

mu-brand/
├── store/                    # The Rust web store (Fly.io: mu-store)
│   ├── src/main.rs           # All routes, agents, pricing, Stripe, Printful, NFT, collab system
│   ├── src/nft.rs            # Solana cNFT minting (dry-run pilot)
│   ├── src/payments.rs       # Stripe payment helpers
│   ├── src/gemini.rs         # Gemini API helpers
│   ├── static/
│   │   ├── index.html        # Homepage + MA auction UI
│   │   ├── admin-db.html     # /admin/db overview dashboard
│   │   ├── collab-chat.html  # /collab/chat AI proposal generator (gated)
│   │   ├── collab-chat-gate.html  # email-only login
│   │   ├── proposals/        # per-collab LPs + Printful mockups + Gemini hero shots
│   │   │   ├── <slug>.html        # collab LP
│   │   │   ├── <slug>-swipe.html  # Tinder-style design feedback (e.g. jiufight)
│   │   │   ├── <slug>-design-*.png  # 4–8 design variants per brand
│   │   │   ├── <slug>-pf-*.jpg      # Printful Mockup Generator output per SKU
│   │   │   └── <slug>-hero-*.jpg    # Gemini lifestyle / hero images
│   │   ├── embed.js, developers.html, sweep page, …
│   ├── Cargo.toml, Dockerfile, fly.toml
├── scripts/
│   ├── new_proposal.sh       # One-shot brand bootstrap (designs + admin POST + LP)
│   ├── gen_brand_designs.py  # Gemini 3 → 4 SVG variants → PNG (template fallback)
│   ├── gen_partner_proposal.py  # Render /proposals/<slug>.html from spec
│   ├── partner_proposals/<slug>.json  # per-partner meta (LP copy + accent)
├── generate.py               # Hourly/daily AI design generation (cron)
├── generate_nouns.py         # NOUNS DAO collab variant
├── sweep_images.py           # MU × SIIIEEP product image generation
├── reprice.py, retry_mockups.py, verify.py
├── designs/                  # Generated PNGs (read-only artifacts)
├── .github/workflows/        # Auto-deploy + cron workflows
│   ├── deploy.yml            # push to main → Fly.io deploy
│   ├── cron-curl.yml         # daily auto-blog + agent triggers
│   ├── cron-twitter.yml      # X (Twitter) auto-post
│   └── cron-ads-tune.yml     # Google Ads CPC tuning
└── README.md

Bootstrap a new collab brand in one CLI call

MU_ADMIN_TOKEN=$T ./scripts/new_proposal.sh newbrand spec.json
# 1. Generates 4 design PNGs (wordmark/monogram/stacked/stripe) via Gemini 3
#    — falls back to deterministic template if no GEMINI_API_KEY
# 2. POST /admin/proposal — proposals + proposal_skus + products rows seeded
# 3. python3 scripts/gen_partner_proposal.py — renders /proposals/newbrand.html
# 4. Brand is buyable at https://wearmu.com/proposals/newbrand

spec.json carries {slug, name, ip_owner, design: {monogram, accent}, meta: {…}, skus: [...]}. No Rust changes needed for new collabs — the generic /api/proposal/:slug/* routes serve every brand.


Run it locally

# 1. Clone
git clone https://github.com/yukihamada/mu-brand.git
cd mu-brand

# 2. Configure
cp .env.example .env
# fill in STRIPE_SECRET_KEY, GEMINI_API_KEY, PRINTFUL_API_KEY,
# RESEND_API_KEY, TELEGRAM_BOT_TOKEN, MU_ADMIN_TOKEN, etc.

# 3. Build the store
cd store
cargo build --release

# 4. Run
./target/release/mu-store
# → http://localhost:3000

The Stripe + Printful + Gemini integrations all need real API keys to function end-to-end. For UI-only experimentation, you can leave them blank — the store will serve the static pages.

The agent scheduler starts 3 minutes after process boot, then ticks every minute.


Deploy

Fly.io (production)

Do not run fly deploy directly. Always push to main → GitHub Actions handles the deploy.

git push origin main
# → .github/workflows/deploy.yml runs flyctl deploy --remote-only
# → cargo-chef cached build (~1–2 min)
# → health check OK → traffic cutover

Self-host

docker build -t mu-store store/
docker run -p 8080:8080 --env-file .env mu-store

Configuration (Fly secrets)

Secret Purpose Required
STRIPE_SECRET_KEY Live Checkout + balance + refunds yes
STRIPE_WEBHOOK_SECRET HMAC verify Stripe webhooks yes
PRINTFUL_API_KEY Order placement + variant catalog yes
GEMINI_API_KEY Design generation, FB classify, blog yes
RESEND_API_KEY Transactional email yes
TELEGRAM_BOT_TOKEN Agent digest + ops alerts yes
TELEGRAM_CHAT_ID Default chat for digest yes
MU_ADMIN_TOKEN /admin/* token-gated routes yes
PRINTFUL_AUTO_CONFIRM "true" (default), "false", or "kill" no
AUTO_REFUND_THRESHOLD_JPY auto_refund ceiling (default 10000) no
SWEEP_PAGE_PASSWORD Gate /sweep (default sweep-2026) no
SWEEP_OPS_EMAILS CSV of email recipients for SIIIEEP orders no
HELIUS_API_KEY Solana cNFT minting no (dry-run without)
MU_NFT_MINT_LIVE "1" to enable real Solana mints no

Fork your own brand

The whole idea of MU is that it's a template, not just a brand. Replace these and you have your own autonomous apparel:

Slot Where it's defined
Brand name / look store/static/index.html, og.jpg
Quantity oracle weather_handler in store/src/main.rs
Pricing curve dynamic_price() in store/src/main.rs
AI generation prompts generate.py
Manufacturing Printful → swap for any on-demand vendor
Agent registry AGENT_REGISTRY in store/src/main.rs

We've already built variants:

  • MU CITY — Tokyo urban data instead of Hokkaido weather
  • MU × SIIIEEP — 23-SKU BJJ apparel collab via Printful

Same engine, different inputs.


What's not in the box

To keep production safe, a few pieces stay out of this repo:

  • Live API keys — see .env.example
  • Production prompts — included as templates, but the ones we use in production have been tuned and stay private
  • Customer & sales data — never committed
  • Admin tokens — generated per-deploy

License

Code is under the MIT License.

The MU name, logo, brand identity, and generated designs (the designs/ PNGs) are not under MIT — please fork the engine, not the brand.


Roadmap

  • Public store launch (2026-05)
  • MUGEN/MUON/MA all live
  • Bonding-curve pricing
  • Open-source release (you're reading it)
  • MA Council foundation — auctioneers get voting rights
  • Solana cNFT pilot (dry-run mode, MA line)
  • Multi-agent autonomous operation — 7 agents covering health / treasury / support / refunds / compliance / vision / self-improvement
  • External embed API/embed.js, /embed/products, /api/v1/embed/products, CORS-open
  • Stripe auto-refund for small disputes
  • Unified collab proposal system — 8 partners live, one-shot CLI bootstrap
  • MA auction Stripe pre-auth — capture_method=manual, auto-capture winner / auto-cancel losers at settle
  • Tinder-style design feedback/proposals/<slug>-swipe.html with rate-limited public POST
  • /collab/chat gate — verified MU members only (email + DAO/MA/customer signals)
  • /admin/db dashboard — one-page DB overview (KPIs, bids, proposals, products by brand)
  • §27 Pledge — 50% post-tax → 弟子屈 published in /vision + /constitution + /tokushoho
  • Daily MA auto-cycle — 22:59:59 settle + 23:00 ¥30k launch as a recurring cron
  • Settlement automation — winner email + Printful order trigger on auction capture
  • MA design generation auto — Gemini daily, no hand-launch
  • MU CITY drops 001 — Tokyo data variant
  • NOUNS DAO formal proposal submission
  • Automated MA Council treasury distribution
  • Self-improvement agent → auto-PR (Sentry → Gemini → GitHub)

Maintainer

Yuki Hamada (@yukihamada) — Founder, Enabler Inc. former CPO @ Mercari · co-founder NOT A HOTEL · external director NEWT


MU — AI designs the clothes. The weather decides how many.
The first buyer wins. Seven agents keep it all running.

⌐◨-◨

About

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Rust 43.8%
  • HTML 43.4%
  • Python 11.0%
  • JavaScript 1.3%
  • Shell 0.4%
  • TypeScript 0.1%