{"id":50356519,"url":"https://github.com/alexar76/aicom","last_synced_at":"2026-05-29T23:01:03.231Z","repository":{"id":357376912,"uuid":"1235582933","full_name":"alexar76/aicom","owner":"alexar76","description":"AI-Factory — autonomous pipeline that designs, builds, tests, and publishes products.","archived":false,"fork":false,"pushed_at":"2026-05-27T18:32:23.000Z","size":43092,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-27T19:19:10.658Z","etag":null,"topics":["agent-economy","ai","ai-agents","autonomous-agents","docker","fastapi","llm","nextjs","python","self-hosted"],"latest_commit_sha":null,"homepage":"https://magic-ai-factory.com/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexar76.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"docs/agents.md","dco":null,"cla":null}},"created_at":"2026-05-11T13:12:45.000Z","updated_at":"2026-05-27T18:55:38.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/alexar76/aicom","commit_stats":null,"previous_names":["alexar76/aicom"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alexar76/aicom","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexar76%2Faicom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexar76%2Faicom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexar76%2Faicom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexar76%2Faicom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexar76","download_url":"https://codeload.github.com/alexar76/aicom/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexar76%2Faicom/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33673628,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent-economy","ai","ai-agents","autonomous-agents","docker","fastapi","llm","nextjs","python","self-hosted"],"created_at":"2026-05-29T23:01:02.002Z","updated_at":"2026-05-29T23:01:03.221Z","avatar_url":"https://github.com/alexar76.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AI-Factory\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eMIT · self-hosted · idea → shippable web product\u003c/strong\u003e\u003cbr/\u003e\n  \u003ca href=\"https://alexar76.github.io/aicom/\"\u003eEcosystem landing\u003c/a\u003e · \u003ca href=\"https://magic-ai-factory.com\"\u003emagic-ai-factory.com\u003c/a\u003e · \u003ca href=\"#demo-video\"\u003eDemo video\u003c/a\u003e · \u003ca href=\"#gallery\"\u003eGallery\u003c/a\u003e · \u003ca href=\"#alien-monitor\"\u003eAlien Monitor\u003c/a\u003e · \u003ca href=\"#quick-start\"\u003eQuick start\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#testing-coverage\"\u003e\u003cimg src=\"docs/badges/coverage.svg\" alt=\"Test coverage\" /\u003e\u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/License-MIT-blue.svg\" alt=\"MIT License\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/tests-pytest-0A9EDC?logo=pytest\u0026logoColor=white\" alt=\"pytest\" /\u003e\n  \u003ca href=\"docs/known-issues.md\"\u003e\u003cimg src=\"https://img.shields.io/badge/status-pre--mainnet-orange\" alt=\"Pre-mainnet status\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003e **Pre-mainnet.** The self-hosted pipeline and storefront are usable today. The on-chain payment-channel contracts under [`contracts/`](contracts/) are **not yet deployed to mainnet** — operator-side items (ZK trusted setup, external audit, multisig owner, supervisor RCA, CVE backlog) are tracked in [`docs/known-issues.md`](docs/known-issues.md) (KI-1…KI-5). Testnet drills and non-financial self-hosting are unaffected. See [`ROADMAP.md`](ROADMAP.md).\n\n**AI-Factory turns one prompt into a shippable web product** — a multi-agent pipeline (research → design → code → QA → deploy) with a built-in storefront, payment rails, and live observability. Self-hosted: your keys, your infra, your data.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/gallery/landing-01.webp\" alt=\"AI-Factory generated marketing landing (1440×900)\" width=\"920\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://youtu.be/Gg9a52-ZbNA\"\u003e\n    \u003cimg src=\"https://img.youtube.com/vi/Gg9a52-ZbNA/maxresdefault.jpg\" alt=\"Idea → agents → shippable product — full factory walkthrough on YouTube\" width=\"920\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\u003cem\u003e↑ \u003ca href=\"https://youtu.be/Gg9a52-ZbNA\"\u003eWatch on YouTube\u003c/a\u003e — same hero clip as \u003ca href=\"https://magic-ai-factory.com\"\u003emagic-ai-factory.com\u003c/a\u003e\u003c/em\u003e\u003c/p\u003e\n\n---\n\n\u003ch2 id=\"demo-video\"\u003e▶ Demo video\u003c/h2\u003e\n\n**Primary:** [YouTube — Idea → agents → shippable product](https://youtu.be/Gg9a52-ZbNA) (embedded on the [live homepage](https://magic-ai-factory.com) hero).\n\nGitHub’s README viewer **does not embed YouTube iframes** — use the thumbnail above or open the link. For an offline / admin UI clip, use the **MP4** below (recorded from production Admin).\n\n\u003cp align=\"center\"\u003e\n  \u003cvideo src=\"docs/gallery/recordings/pipeline-demo-latest.mp4\" controls playsinline width=\"920\"\u003e\n    \u003ca href=\"docs/gallery/recordings/pipeline-demo-latest.mp4\"\u003eDownload admin pipeline demo (.mp4)\u003c/a\u003e\n  \u003c/video\u003e\n\u003c/p\u003e\n\n| Where | How |\n|-------|-----|\n| **YouTube** | [youtu.be/Gg9a52-ZbNA](https://youtu.be/Gg9a52-ZbNA) — marketing walkthrough |\n| **Live site** | [magic-ai-factory.com](https://magic-ai-factory.com) — hero embed + guest landing try-out |\n| **Admin replay** | Login → **Live Monitor** or **Settings** → Demo replay (when published) |\n| **Public API** | `GET /api/public/pipeline-demo-replay` (uploaded clip, no auth) |\n| **Download** | [.mp4](docs/gallery/recordings/pipeline-demo-latest.mp4) · [.webm](docs/gallery/recordings/pipeline-demo-latest.webm) |\n| **Regenerate admin clip** | `python scripts/record_pipeline_demo_video.py` → `python scripts/sync_demo_replay_from_recording.py` |\n\n---\n\n\u003ch2 id=\"alien-monitor\"\u003e👽 Alien Monitor\u003c/h2\u003e\n\n**Live 3D pulse of the AIMarket ecosystem** — Hub, Factory, contracts, agents, and on-chain metrics in one cosmic graph.\n\n| | |\n|---|---|\n| **Public demo** | **[https://magic-ai-factory.com/monitor/](https://magic-ai-factory.com/monitor/)** |\n| **Default mode** | LIVE — polls Hub (`:9083`), Factory API (`:9081`), Prometheus (`:9090`), and chain RPC from `.env` |\n| **Local dev** | `cd alien-monitor \u0026\u0026 ./start.sh` → http://localhost:5173 |\n| **Deploy on this host** | `./scripts/deploy_alien_monitor.sh` (Docker + nginx `/monitor/`) |\n| **Source** | [`alien-monitor/`](alien-monitor/) · satellite repo also on Gitea |\n\nSwitch **TEST / LIVE / UNI** in the top-right control bar. On the public demo, **LIVE** shows real stack metrics from the same server.\n\n\u003ch3 id=\"pulse-terminal\"\u003e📈 Pulse Terminal (ACEX)\u003c/h3\u003e\n\n**Capital-markets dashboard** — live CapShare NAV, revenue indices, and WebSocket pricing from Factory.\n\n| | |\n|---|---|\n| **Public demo** | **[https://magic-ai-factory.com/pulse/](https://magic-ai-factory.com/pulse/)** |\n| **Local dev** | `cd apps/pulse-terminal \u0026\u0026 npm run dev` → http://localhost:5199 |\n| **Deploy with Monitor** | `./scripts/deploy_alien_monitor.sh` (Docker + nginx `/pulse/`) |\n| **Source** | [`apps/pulse-terminal/`](apps/pulse-terminal/) · [`acex/`](acex/) |\n\n---\n\n**One sentence → a shippable web product (landing or full stack). Self-hosted.**\n\n**Typical wall-clock (DeepSeek, no QA rework loops):** `marketing_landing` **~20–25 min** to first previewable code; `full_software` **~25–45 min** for a simple brief, **hours** when gates iterate — [FAQ \u0026 scope](#faq--scope). **Not** a 15-second generator.\n\n**Typical LLM API cost:** **~$0.30–$2** landing first pass; **~$3–$15+** `full_software` with QA cycles. Bring your own keys; host ~**$7/mo** separate.\n\n**Pipeline roles** (one Python class each under [`agents/`](agents/)): Analyst, PM, Methodologist, Architect, Design Critic, Developer, DevOps, Evolution Analyst, Hardening, Marketing, Product Profile, QA, Sales, Security, Spec Quality Gate, plus `base_agent.py`. Most run in order; Methodologist / Design Critic / Hardening are conditional gates. The canonical sequence is [`config/pipeline_flow.json`](config/pipeline_flow.json). Runtime adds a test gate, Playwright E2E, security scans, and storefront deployment.\n\n## Quick start\n\n```bash\ngit clone --recurse-submodules https://github.com/alexar76/aicom.git\n# already cloned?  git submodule update --init coach\ncd aicom \u0026\u0026 cp -n .env.example .env\ndocker compose up -d --build\n# → http://localhost:9080/admin/login  (user: admin)\n# → New product: type an idea, watch Admin → Pipeline\n```\n\n### Admin access\n\n#### 🌐 Live Demo\n\nTry it out: [https://magic-ai-factory.com](https://magic-ai-factory.com)\n\n**Alien Monitor (ecosystem 3D):** [https://magic-ai-factory.com/monitor/](https://magic-ai-factory.com/monitor/) — live Hub/Factory/Prometheus + chain metrics, no login required.\n\n**Demo Admin Access:**\n- URL: [https://magic-ai-factory.com/admin/login](https://magic-ai-factory.com/admin/login)\n- Username: `admin`\n- Password: `demo123`\n\n\u003e ⚠️ **Public demo disclaimer:** `demo123` applies **only** to [magic-ai-factory.com](https://magic-ai-factory.com) — a **shared** site, not your private factory. Production `.env` must include **`AIFACTORY_DEMO_READONLY=1`** so visitors cannot change the password, save Settings, or run factory backup/restore. See [docs/security.md](docs/security.md#public-demo-mode-aifactory_demo_readonly1).  \n\u003e Self-hosted: bootstrap password (`data/secrets/bootstrap_admin.txt` or TTY prompt); leave `AIFACTORY_DEMO_READONLY` unset or `0`.\n\n#### Self-hosted (first install)\n\nThere is **no** default password in the repo. On an empty `data/` volume, the entrypoint runs bootstrap — password from the **interactive console** (TTY) or **`data/secrets/bootstrap_admin.txt`** on headless `up -d`. See **[docs/security.md](docs/security.md)**.\n\nFaster after the stack is up: `./demo.sh \"SaaS for managing remote teams\"` (set `DEMO_ADMIN_PASSWORD` to your bootstrap password; opens Pipeline).\n\n## Positioning\n\nAI-Factory is a different shape from hosted builders like Bolt.new, Lovable, v0, or Devin: it’s a **self-hosted MIT pipeline** you run on your own box with your own LLM keys, and it persists artifacts, state, and gates on disk you control. Those products are polished hosted experiences and ship features we don’t have (cloud editor, team accounts, prebuilt integrations); we trade that for transparency, no per-seat pricing, and the option to fork. If you want zero-ops and a managed UI, use them. If you want the agents, gates, and storefront under your control, keep reading.\n\n## The pipeline\n\n```mermaid\nflowchart LR\n  A[💡 Idea] --\u003e B[🔍 Discovery]\n  B --\u003e C[📋 Analyst]\n  C --\u003e D[📝 PM]\n  D --\u003e E[🎨 Architect]\n  E --\u003e F[👨‍💻 Developer]\n  F --\u003e G[🧪 QA + E2E]\n  G --\u003e H[🔒 Security]\n  H --\u003e I[🚀 DevOps]\n  I --\u003e J[📢 Marketing]\n  J --\u003e K[💰 Sales]\n  K --\u003e L[🔄 Evolution]\n```\n\nFull diagrams (runtime architecture, state machine, discovery, storefront gates, comparison tables): **[docs/architecture-diagrams.md](docs/architecture-diagrams.md)**.\n\nModule boundaries, sandbox facade, scaling path: **[docs/architecture/module-boundaries.md](docs/architecture/module-boundaries.md)**, **[docs/architecture/scaling.md](docs/architecture/scaling.md)**. Production startup guard: **`AIFACTORY_PROD=1`** (refuses `demo123` / `admin123`) — see [docs/security.md](docs/security.md#production-guard-aifactory_prod1).\n\n### Ship-then-keep-improving\n\nAI-Factory is built around a **ship-then-keep-improving** loop — not “one shot and forget”:\n\n1. **Ship** — agents run the full pipeline (spec → code → QA/E2E → security → DevOps). A product reaches **COMPLETED** / **DEPLOYED** when it passes the gates *at that moment*.\n2. **Gate failures before ship** — demo/TZ, browser crawl, security, or methodologist findings send the product to **`BUG_FOUND` → `DEV_FIXING`**. The developer agent retries with repair hints until gates pass or the repair budget is exhausted.\n3. **Keep improving after ship** — already-shipped products are **re-audited** when marketplace/demo rules tighten (**policy audit**) or when they no longer meet storefront readiness (**storefront remediation**). Eligible products reopen on the same repair path instead of staying stale on the catalog.\n4. **Bounded effort** — `AIFACTORY_MAX_QUALITY_LOOPS` caps how many remediation cycles one product may take before **`FAILED`** (config default **8** in quality settings; override in `.env` / Compose).\n5. **Stronger model on hard repairs** (optional) — `AIFACTORY_GATE_FAILING_MODEL` sets a **provider-specific model id** used only on repair rounds after at least one QA gate failure (`quality_repair_round ≥ 1`). It does **not** switch providers — only overrides the model name on the routed provider (e.g. DeepSeek-only: `deepseek-v4-pro` or `deepseek-reasoner`; leave unset to use normal heavy/light routing).\n\nThe public homepage shows live counts via **`GET /api/public/pipeline-status`** (products in pipeline vs shipped) — same operational truth as Admin → Pipeline.\n\nDetails: **[docs/pipeline-operations.md](docs/pipeline-operations.md)** (policy audit, storefront remediation, QA E2E).\n\n## Gallery\n\nBuilt pages only (1440×900 WebP): screenshots are **`/api/sandbox/file/…/index.html`** — refresh with **`python scripts/capture_gallery_landings.py`** (stack on **http://127.0.0.1:9080**). Details: **[docs/gallery/README.md](docs/gallery/README.md)**.\n\n| ![Gallery 1](docs/gallery/landing-01.webp) | ![Gallery 2](docs/gallery/landing-02.webp) | ![Gallery 3](docs/gallery/landing-03.webp) |\n|:---:|:---:|:---:|\n| ![Gallery 4](docs/gallery/landing-04.webp) | ![Gallery 5](docs/gallery/landing-05.webp) | ![Gallery 6](docs/gallery/landing-06.webp) |\n\n**Full-stack demo tiles** (`fullstack-01.webp` … `04`): `python scripts/capture_gallery_fullstack_packaging_demo.py` — see **[docs/gallery/README.md](docs/gallery/README.md)**.\n\n---\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eDeploy \u0026 production\u003c/strong\u003e\u003c/summary\u003e\n\n### Deploy (Docker Compose)\n\n**[`./scripts/deploy.sh`](scripts/deploy.sh)** appends **missing** keys to **`.env`** only (optional `--public-url` sets `NEXT_PUBLIC_SITE_URL` and `AIFACTORY_CORS_ORIGINS`; generates `AIFACTORY_FIREWALL_RULES_FERNET_KEY` when possible; defaults `AIFACTORY_SANDBOX_PREVIEW_NETWORK_ISOLATION=1`), then runs `docker compose build` + `up -d app`. Logic: [`scripts/fill_production_env.py`](scripts/fill_production_env.py) (`--dry-run` supported).\n\n```bash\nchmod +x scripts/deploy.sh   # once\ncp -n .env.example .env      # if you do not have .env yet\n./scripts/deploy.sh --public-url https://your-factory.example.com\n```\n\nWhy not fully automatic: the script cannot infer your real public URL without you (or your reverse proxy). Existing `.env` assignments are **never overwritten** so we do not clobber secrets you already set.\n\n**North star:** turn a **short plain-language brief** into a **presentable web page** you can share — with **quality gates** (demo/TZ, browser smoke, optional marketplace rules) so sloppy stubs get reworked. **One pipeline** for everyone: **autonomous** mode starts with a dedicated **Discovery layer** (external signals → validation → scoring/ranking) before creating `IDEA_RECEIVED`; **on-demand** runs the same downstream stages.\n\nSee **[docs/product-concept.md](docs/product-concept.md)** for positioning, guarantees, default **~$4.99 USDT** landing pricing when no product price is set, i18n (`NEXT_PUBLIC_MARKETING_LOCALE`), and fork branding. **Homepage → Admin:** phrase prefill and `/admin?tab=new-product\u0026idea=…` — **[docs/marketing.md](docs/marketing.md)**.\n\nProduction hostname notes: **[docs/production-domain.md](docs/production-domain.md)** (`magic-ai-factory.com`, nginx → Compose **9080**).\n\n### Default endpoints (Compose)\n\n| What | URL |\n|------|-----|\n| **App** | `http://localhost:9080` |\n| **API health** | `http://localhost:9081/api/health` |\n| **Prometheus** | `http://localhost:9090` |\n| **Grafana** | `http://localhost:9082` |\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eTry it — prompts, demo.sh, packaging\u003c/strong\u003e\u003c/summary\u003e\n\n### Prompt starters (Admin → New Product)\n\nDefault mode is **full product** (`full_software`). Use **What to ship** for **brochure-only**, or `./demo.sh --landing` from CLI.\n\n| 💡 Prompt | Notes |\n|-----------|--------|\n| **SaaS for managing remote teams** — dashboard, auth, API | Default = full stack |\n| **Echo / voice notes app** with backend sync | Full product |\n| Landing page for **resume builder** | **Marketing landing page only** in Admin, or `./demo.sh --landing \"…\"` |\n\n### One command — enqueue + open Pipeline\n\n```bash\nchmod +x demo.sh    # once\n./demo.sh \"SaaS for managing remote teams\"          # default: full_software\n./demo.sh --landing \"Landing page for resume tool\"   # brochure-only (faster)\n./demo.sh --compose \"SaaS dashboard MVP\"             # Docker UI on :9080\n```\n\nRequires Docker + LLM keys in the container env. Opens **Admin → Pipeline**; a full run takes **several minutes** — visible autonomy, not instant magic.\n\n### Packaging \u0026 live URLs\n\n- **Auto-publish** — After **DevOps**, optionally deploy `data/code/\u003cproduct_id\u003e/` to **Vercel**, **Netlify**, or **Cloudflare Pages** (Admin → Settings → Auto-publish). Tokens via env (`VERCEL_TOKEN`, `NETLIFY_AUTH_TOKEN`, `CLOUDFLARE_API_TOKEN`). **[docs/auto-publish.md](docs/auto-publish.md)**. Manual: `python3 scripts/publish_product_now.py prod-…`.\n- **Full_software → cloud (e.g. Railway)** — **[docs/deploy-full-software-cloud.md](docs/deploy-full-software-cloud.md)**.\n- **Demo replay video** — `python3 scripts/sync_demo_replay_from_recording.py`.\n- **Batch demos** — `./batch-demo.sh`.\n- **“Built with AI-Factory” badge** — Admin → Settings.\n\n### Gallery — full_software capture\n\n```bash\n.venv/bin/python -m playwright install chromium   # once\n.venv/bin/python scripts/capture_gallery_fullstack_packaging_demo.py\n```\n\nFrom a real pipeline product:\n\n```bash\nGALLERY_FS_PRODUCT_ID=prod-xxxxxxxxxxxx \\\n  .venv/bin/python scripts/capture_gallery_full_software.py\n```\n\n**End-to-end demo seed:** `./scripts/demo_seed_fullstack.sh`\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eCI/CD, smoke tests \u0026 Discovery\u003c/strong\u003e\u003c/summary\u003e\n\n## Screen recordings \u0026 Git remotes\n\nBefore **screen recordings** or **streaming**, avoid showing `git remote -v` if the URL embeds credentials. Prefer:\n\n`git remote set-url origin https://github.com/\u003cyou\u003e/\u003crepo\u003e.git`\n\n## CI/CD\n\n- Gitea: `.gitea/workflows/deploy.yml`\n- GitHub: `.github/workflows/ci.yml` — `pytest -q --cov` + coverage badge + `npm run build`\n- **Pre-release:** [docs/github-release-checklist.md](docs/github-release-checklist.md)\n\n### Full Pipeline Smoke\n\n```bash\ndocker compose exec -T app /app/venv/bin/python3 /app/scripts/full_pipeline_smoke.py \u003cproduct_id\u003e\n```\n\nEnforces API/frontend health, `tests/test_demo_quality_gates.py`, and `scripts/real_e2e_smoke.py` (static / FastAPI / Docker preview — [docs/pipeline-operations.md](docs/pipeline-operations.md)).\n\n**Policy audit:** worker re-checks COMPLETED products when marketplace rules tighten (`AIFACTORY_POLICY_AUDIT_*` in `.env.example`).\n\n### Discovery (pre-pipeline)\n\n- **Engine:** `director/discovery_pipeline.py`\n- **Flow:** Signal Collector → Need Validation → Idea Scorecard → Ranked ideas → `IDEA_RECEIVED`\n- **Artifacts:** `/app/data/discovery/signals.jsonl`, `ranked_ideas.json`, `weekly_digest.md`\n- **Continuous mode:** `AIFACTORY_DISCOVERY_INTERVAL_HOURS`\n\n```bash\nai-company discover --top-k 5 --enqueue\nPOST /api/admin/discovery/run   # JWT; see OpenAPI /api/docs\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eDocumentation index\u003c/strong\u003e\u003c/summary\u003e\n\n- **[docs/USER_GUIDE.md](docs/USER_GUIDE.md)** — illustrated user guide\n- **[docs/owner-guide.md](docs/owner-guide.md)** — platform owner handbook\n- **[docs/api-integration-guide.md](docs/api-integration-guide.md)** — REST auth, curl examples\n- **[docs/cli-reference.md](docs/cli-reference.md)** — container CLI\n- **[docs/README.md](docs/README.md)** — index, admin navigation map\n- **[docs/admin-guide.md](docs/admin-guide.md)** — every Admin tab\n- **[docs/FAQ.md](docs/FAQ.md)** · **[docs/FAQ.ru.md](docs/FAQ.ru.md)**\n- **[docs/known-issues.md](docs/known-issues.md)** — open items that can't be closed in-repo (ZK ceremony, external audit, supervisor root cause) — review before mainnet\n- Screenshots: `cd web/frontend \u0026\u0026 npm run capture-docs-screenshots`\n\nLicensing: `LICENSE` (MIT), `CONTRIBUTING.md`, `CODE_OF_CONDUCT.md`, `SECURITY.md`\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eQuick Start (run.sh, data persistence)\u003c/strong\u003e\u003c/summary\u003e\n\n### 1. Prepare data directory (first time only)\n\n```bash\nmkdir -p ~/aicom-data\n```\n\n### 2. Build \u0026 run\n\n```bash\nchmod +x run.sh\n./run.sh               # build image \u0026 start container\n./run.sh --no-build    # skip rebuild if image exists\n```\n\n\u003e **⚠️ Always use `run.sh` for persistence:** `~/aicom-data:/app/data` bind mount — products, LLM configs, and logs survive rebuilds.\n\n### 3. Manual `docker run`\n\n```bash\ndocker run -d --name ai-factory --restart unless-stopped \\\n  -p 8080:8080 -p 8081:8081 \\\n  -v ~/aicom-data:/app/data \\\n  ai-factory:latest\n```\n\n\u003e **Host Ollama:** `docker compose -f docker-compose.yml -f docker-compose.host-gateway.yml up -d`\n\n\u003e **🚨 Use bind mount `~/aicom-data:/app/data`, NOT a Docker named volume** — named volumes hide data from the host filesystem.\n\n### 4. Stop \u0026 restart\n\n```bash\ndocker stop ai-factory \u0026\u0026 docker rm ai-factory\n./run.sh --no-build\n```\n\n### 5. Migrate from a named volume\n\n```bash\ndocker run -d --name temp-migrate \\\n  -v aicom_data:/old-data:ro -v ~/aicom-data:/new-data alpine tail -f /dev/null\ndocker exec temp-migrate cp -a /old-data/. /new-data/\ndocker stop temp-migrate \u0026\u0026 docker rm temp-migrate\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eDocker Compose (Prometheus + Grafana)\u003c/strong\u003e\u003c/summary\u003e\n\n| Service | Published | Description |\n|---------|-----------|-------------|\n| App | 9080 / 9081 | Frontend + backend + metrics |\n| Prometheus | 9090 | Metrics |\n| Grafana | 9082 | Dashboards |\n\n```bash\ncp .env.example .env\nchmod +x run-compose.sh scripts/init-compose-volumes.sh\n./scripts/init-compose-volumes.sh\n./run-compose.sh --build\n```\n\n| Service | URL | Credentials |\n|---------|-----|-------------|\n| App | http://localhost:9080 | `admin` — password from [first-run bootstrap](docs/security.md) |\n| Grafana | http://localhost:9082 | `GRAFANA_ADMIN_USER` / `GRAFANA_ADMIN_PASSWORD` |\n\n**Production checklist:** set Grafana password, LLM keys in `.env` only, HTTPS reverse proxy, Stripe/webhook vars if billing — see [docs/security.md](docs/security.md).\n\n**Grafana:** auto-provisioned **AI Factory Overview** dashboard (pipeline stats, task duration, Director decisions, LLM health).\n\n```bash\n./run-compose.sh --build\n./run-compose.sh --down\n./run-compose.sh --logs\n```\n\nSQLite is **on by default** in Compose (`USE_SQLITE=true`); entrypoint migrates `pipeline.json` when present. Data in **`./data`** bind mount.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eAccess, Admin API, agents \u0026 states\u003c/strong\u003e\u003c/summary\u003e\n\n## Access\n\n| Service | URL (Compose) | Port |\n|---------|---------------|------|\n| Frontend | http://localhost:9080 | 9080 |\n| Backend API | http://localhost:9081 | 9081 |\n\n## Admin Panel\n\n- **URL:** http://localhost:9080/admin/login\n- **Login:** `admin` — password from [first-run bootstrap](docs/security.md) (console or `data/secrets/bootstrap_admin.txt`)\n\n## API Endpoints\n\n### Public\n- `GET /api/health` — Health check\n- `GET /api/products` — List published products\n- `GET /api/products/{id}` — Product details\n- `POST /api/feedback/submit` — Submit feedback\n- `POST /api/payment/create` — Create payment\n\n### Admin (requires auth)\n- `POST /api/admin/auth/login` — JWT\n- `GET /api/admin/dashboard` — Metrics\n- `GET /api/admin/pipeline/products` — Pipeline status\n- `POST /api/admin/products/create` — Create product idea\n- Swagger: `/api/docs`\n\n## Pipeline Agents\n\n**Admin → AI Agents** — **11 roster rows** (see `web/frontend/lib/pipelineStages.ts`):\n\nAnalyst → PM → Architect → Designer → Developer → QA → Security → DevOps → Marketing → Sales → Evolution Analyst\n\nWorker also loads **Design critic** and **Hardening** (`AIFACTORY_EXTENDED_PIPELINE` in `.env.example`).\n\n## Pipeline States\n\n`IDEA_RECEIVED` → `SPEC_WRITTEN` → `ARCH_DESIGNED` → `CODE_COMMITTED` → `QA_TESTED` → `SECURITY_SCANNED` → `DEVOPS_DEPLOYED` → `MARKET_CONTENT_READY` → `SALES_ACTIVE` → `DEPLOYED_PRODUCTION` → `EVOLUTION_ANALYZING` → `COMPLETED`\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eArchitecture\u003c/strong\u003e\u003c/summary\u003e\n\nHigh-level runtime layout:\n\n```mermaid\nflowchart TB\n  subgraph clients[\"Clients\"]\n    U[\"Public storefront\"]\n    AD[\"Admin console\"]\n  end\n\n  subgraph web[\"Web tier\"]\n    FE[\"Next.js :8080\"]\n    BE[\"FastAPI :8081\"]\n  end\n\n  subgraph workers[\"Background workers\"]\n    PW[\"Pipeline worker\"]\n    DW[\"Director AI worker\"]\n  end\n\n  subgraph agents[\"Specialized agents\"]\n    AG[\"11 Admin roster rows + optional Design critic / Hardening (worker)\"]\n  end\n\n  subgraph llm[\"Model routing\"]\n    RT[\"LLM router\"]\n    PR[\"Providers OpenAI-compatible · local\"]\n  end\n\n  subgraph data[\"Persistent workspace: host `./data` mounted at `/app/data`\"]\n    DB[\"SQLite pipeline state (JSON fallback in tests)\"]\n    ART[\"Specs · arch · code · telemetry · logs\"]\n  end\n\n  subgraph ops[\"Observability optional\"]\n    PRM[\"Prometheus\"]\n    GRA[\"Grafana\"]\n  end\n\n  U --\u003e FE\n  AD --\u003e FE\n  FE --\u003e|\"HTTP `/api/*`\"| BE\n  BE --\u003e DB\n  BE --\u003e ART\n  PW --\u003e DB\n  PW --\u003e ART\n  PW --\u003e AG\n  DW --\u003e DB\n  DW --\u003e RT\n  AG --\u003e RT\n  RT --\u003e PR\n  CLI[\"CLI · ai-company\"] -.-\u003e|\"orchestration\"| PW\n  BE --\u003e PRM\n  PRM --\u003e GRA\n```\n\nCompose maps container **8080/8081** → host **9080/9081**.\n\nMore diagrams (state machine, discovery, storefront gates, comparison): **[docs/architecture-diagrams.md](docs/architecture-diagrams.md)**.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eEcosystem\u003c/strong\u003e\u003c/summary\u003e\n\n## Monorepo \u0026 AIMarket ecosystem\n\nThis repository is the **AICOM monorepo**: a self-hosted **AI-Factory** pipeline plus the **AIMarket** federated commerce layer (hub, protocol, SDKs, 8 desktop apps, 15 plugins).\n\n**Public ecosystem landing:** **[alexar76.github.io/aicom](https://alexar76.github.io/aicom/)** — all projects, killer features, and live demos on one page.\n\n```mermaid\nflowchart TB\n  subgraph factory[\"AI-Factory · magic-ai-factory.com\"]\n    DISC[\"Discovery\"]\n    PIPE[\"13-agent pipeline\"]\n    SHIP[\"Shipped products\"]\n    DISC --\u003e PIPE --\u003e SHIP\n  end\n\n  subgraph aimarket[\"AIMarket · modelmarket.dev\"]\n    HUB[\"AIMarket Hub\"]\n    PROT[\"Protocol v2 spec\"]\n    PLG[\"15 plugins\"]\n    HUB --- PLG\n    HUB --- PROT\n  end\n\n  subgraph consume[\"Consumers\"]\n    DSK[\"8× Flutter desktop\"]\n    WGT[\"Embed widget\"]\n    SDK[\"aimarket_agent SDK\"]\n  end\n\n  SHIP --\u003e|\"factory_bridge · sync\"| HUB\n  DSK --\u003e SDK --\u003e HUB\n  WGT --\u003e HUB\n```\n\n| Package | Path | Docs |\n|---------|------|------|\n| **AI-Factory** (this README) | `web/` · `agents/` · `orchestrator/` | [architecture-diagrams.md](docs/architecture-diagrams.md) |\n| **AIMarket Hub** | [`aimarket-hub/`](aimarket-hub/) | [aimarket-hub/README.md](aimarket-hub/README.md) |\n| **Protocol v2** | [`aimarket-protocol/`](aimarket-protocol/) | [spec.md](aimarket-protocol/spec.md) |\n| **Hub plugins** | [`plugins/`](plugins/) | README + `docs/` per plugin |\n| **Desktop SKUs** | [`desktop-integrations/`](desktop-integrations/) | 8 apps · [value.md](desktop-integrations/interview-prep-coach/docs/value.md) pattern |\n| **LinkedIn Profile Coach** | [`coach/`](coach/) (git submodule) | Flutter desktop/mobile · [alexar76/linked-in-profile-coach](https://github.com/alexar76/linked-in-profile-coach) |\n| **Dart SDK** | [`aimarket-sdks/dart/`](aimarket-sdks/dart/) | Consumer SDK for desktop apps |\n| **Widget** | [`aimarket-widget/`](aimarket-widget/) | Drop-in search + invoke |\n| **ACEX** | [`acex/`](acex/) | Agent Listing Protocol · CapShares · Pulse Terminal |\n\n**Full ecosystem reference (C4, sequences, deployment):** **[docs/ecosystem-architecture.md](docs/ecosystem-architecture.md)**\n\n### Killer feature — Auto-Mesh Pipeline\n\n**AI-Factory doesn’t stop at code generation.** A pipeline run can **discover marketplace agents, fund a USDT channel, invoke them in sequence, and ship a connected product** — mesh orchestration without hand-wiring each API.\n\n| | |\n|---|---|\n| **What** | Intent → hub discover → multi-agent invoke → QA gates → hub catalog sync |\n| **Why** | Network effect: every shipped product becomes capability fodder for the next run |\n| **Deep dive** | [docs/killer-feature-auto-mesh-pipeline.md](docs/killer-feature-auto-mesh-pipeline.md) · [Ecosystem killer features](docs/killer-features.md) |\n\nProduction split: Factory **:9080** · Hub **:9083** → [production-modelmarket-dev.md](docs/production-modelmarket-dev.md)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eSQLite, testing \u0026 tech stack\u003c/strong\u003e\u003c/summary\u003e\n\n## SQLite / JSON Backend\n\n`PipelineStateMachine` uses JSON when a `state_file` path is passed (tests); otherwise follows `USE_SQLITE` (SQLite-first in production).\n\n```bash\npython -m orchestrator.migrate \\\n  --json /app/data/state/pipeline.json \\\n  --db /app/data/state/pipeline.db\n```\n\nTables: `products`, `tasks` — nested fields stored as JSON.\n\n\u003ch2 id=\"testing-coverage\"\u003eTesting\u003c/h2\u003e\n\n[![coverage](docs/badges/coverage.svg)](docs/badges/coverage.svg) — backend line coverage (`web/`, `agents/`, `orchestrator/`, `director/`, `pipeline_worker/`). CI uploads `coverage.json` + badge artifact; refresh locally with:\n\n```bash\nUSE_SQLITE=true pytest -q --cov --cov-report=term --cov-report=json:coverage.json\npython scripts/generate_coverage_badge.py\n```\n\nFull local suite (backend pytest + frontend Vitest):\n\n```bash\n./scripts/run_all_tests.sh\n```\n\nSee also **[docs/pipeline-operations.md](docs/pipeline-operations.md)** (Testing).\n\nQuick smoke (Docker):\n\n```bash\ndocker exec ai-factory python -m pytest tests/test_pipeline.py tests/test_pipeline_sqlite.py -v\n```\n\n## Tech Stack\n\n- **Backend:** Python FastAPI + Uvicorn\n- **Frontend:** Next.js 14 + TypeScript + Tailwind + Framer Motion\n- **Container:** Docker (Python 3.12 + Node 20)\n- **Security:** JWT, TOTP 2FA, audit logging\n- **LLM:** Pluggable providers (OpenAI-compatible, Ollama)\n\n\u003c/details\u003e\n\n---\n\n## FAQ \u0026 scope\n\n**What is AI-Factory?** An autonomous **AI software company in a box**: discovery → spec → code → QA/E2E → security → deploy → marketing — self-hosted, MIT.\n\n**How fast is it really?** Measured on the live pipeline DB (task timestamps, May 2026):\n\n| Profile | Milestone | Observed (this fleet) |\n|---------|-----------|------------------------|\n| `marketing_landing` | `CODE_COMMITTED` (previewable HTML) | **~21 min** (e.g. `prod-39fa6ca11222`) |\n| `marketing_landing` | Through QA / fix loops | **~40–90+ min** when gates fail |\n| `full_software` (simple brief) | `CODE_COMMITTED` | **~22 min** (e.g. `prod-9c6296662041`) |\n| `full_software` (complex SaaS) | `CODE_COMMITTED` after QA blocks | **~10 h+** (e.g. FleetMind `prod-46e66fe613f7`, still in `DEV_FIXING`) |\n| Either | `COMPLETED` (storefront-ready) | **0/10** active real products at last check — plan **hours**, not “15 minutes end-to-end” |\n\nReproduce timing: enqueue via `./demo.sh` / Admin → Pipeline, then `python scripts/wait_pipeline_product.py --product-id …`.\n\n**LLM cost?** Logs use `estimated_cost_usd` per call (no `product_id` on older rows). Fleet total ≈ **$85** over **15** products (~**$5.7** average including long repair loops). Short first passes are often **sub‑dollar to a few dollars** on DeepSeek; **$0.20** is possible only for a **very small** landing with no retries — not a guarantee for `full_software`.\n\n**Not a 30-second landing toy.** If you only need a fast marketing page, use **[aicom-landing](https://github.com/alexar76/aicom-landing)**. AI-Factory targets **real products** (full stack, gates, evolution).\n\n**Who is it for?** Operators who want **their keys, their data, their host** and are OK running Docker + configuring LLM providers.\n\n**Who is it not for?** Anyone wanting a hosted no-ops builder with zero setup — use Bolt/Lovable/v0 instead.\n\nQuestions: **[docs/FAQ.md](docs/FAQ.md)** · **[docs/FAQ.ru.md](docs/FAQ.ru.md)**\n\n---\n\n## Disclaimer\n\n**THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND.** See [LICENSE](LICENSE) for the full terms.\n\n**Smart contracts** (`contracts/evm/`, `contracts/solana/`) use **Ownable-gated admin functions** — only the contract owner can authorize hubs and whitelist tokens. The escrow holds funds in a non-custodial model: users deposit directly into the contract; channel participants control their funds; and there is a 24-hour auto-refund path that does not depend on any privileged account. No upgradeable proxies are used.\n\n**Deployment:** always use the provided deploy scripts (`contracts/evm/script/Deploy.s.sol` for EVM, `contracts/solana/` Anchor scripts for Solana). **Do not deploy from a personal EOA** — use a dedicated deployer key or the project's multisig to avoid key leaks and ensure deterministic CREATE2 addresses across chains.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexar76%2Faicom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexar76%2Faicom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexar76%2Faicom/lists"}