{"id":50356685,"url":"https://github.com/alexar76/aicom-landing","last_synced_at":"2026-05-29T23:04:01.414Z","repository":{"id":358134828,"uuid":"1240085497","full_name":"alexar76/aicom-landing","owner":"alexar76","description":"AI landing generator — one prompt → self-contained HTML in ~30-60s (MIT, 20 style presets).","archived":false,"fork":false,"pushed_at":"2026-05-27T18:27:38.000Z","size":6785,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-27T19:15:42.401Z","etag":null,"topics":["ai","deepseek","html-generator","javascript","landing-page","landing-page-generator","llm","mit-license","no-database","nodejs","ollama","openai","self-hosted","static-site"],"latest_commit_sha":null,"homepage":"https://magic-ai-factory.com/landing-page-generation/","language":"JavaScript","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":null,"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":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-15T18:50:00.000Z","updated_at":"2026-05-27T18:55:10.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/alexar76/aicom-landing","commit_stats":null,"previous_names":["alexar76/aicom-landing"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alexar76/aicom-landing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexar76%2Faicom-landing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexar76%2Faicom-landing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexar76%2Faicom-landing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexar76%2Faicom-landing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexar76","download_url":"https://codeload.github.com/alexar76/aicom-landing/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexar76%2Faicom-landing/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33673653,"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":["ai","deepseek","html-generator","javascript","landing-page","landing-page-generator","llm","mit-license","no-database","nodejs","ollama","openai","self-hosted","static-site"],"created_at":"2026-05-29T23:04:00.690Z","updated_at":"2026-05-29T23:04:01.401Z","avatar_url":"https://github.com/alexar76.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- aicom-mirror-notice --\u003e\n\u003e **Mirror — read-only.**\n\u003e The canonical source for `aicom-landing` lives in the AI-Factory monorepo.\n\u003e Open issues and PRs at `Superowner/aicom`; commits pushed here are\n\u003e overwritten by `scripts/mirror_satellites.sh` on the next sync run.\n\u003e See `docs/repository-canonical-policy.md` for the policy.\n\n# AI landing generator\n\n**MIT · one prompt → one self-contained HTML landing in ~30–60 seconds.**\n\n\u003e ## ▶ [Open the live generator](https://magic-ai-factory.com/landing-page-generation/)\n\u003e\n\u003e **Try it in the browser** — enter a prompt, pick a style, generate, preview, download `landing.zip`.  \n\u003e Part of the **[AI-Factory](https://magic-ai-factory.com/)** ecosystem · [GitHub](https://github.com/alexar76/aicom-landing) · [AI-Factory source](https://github.com/alexar76/aicom)\n\nA fast, self-hosted page generator. Two LLM agents — **Architect** (structure + visual plan) → **Developer** (single HTML file) — plus **20** style presets. No admin panel, no database, no QA pipeline: ideal for MVPs, A/B copy, and “ship the landing today” workflows.\n\n| | **AI landing generator** | **[AI-Factory](https://magic-ai-factory.com/)** |\n|---|-------------------|------------------|\n| **Time** | ~30–120 s | \u003e30 min |\n| **Output** | One `index.html` (+ optional ZIP) | Full product + gates |\n| **Best for** | Landing hypothesis, marketing experiments | Production software |\n\n**API (hosted):** `POST` [`https://magic-ai-factory.com/landing-page-generation/api/generate`](https://magic-ai-factory.com/landing-page-generation/api/generate) — JSON body; send `Origin` / `Referer` for the same host (not a GET link in the browser). Optional: `\"agent_to_website\": true` — see [`docs/AGENT-TO-WEBSITE.md`](docs/AGENT-TO-WEBSITE.md).\n\n---\n\n## Screenshots\n\n### Generator UI (local preview)\n\nType a product brief, pick a visual preset (or Auto), optionally enable **Agent-To-Website** (embedded demo chat on the page), generate, preview in-page, download `landing.zip`.\n\n![aicom landing generator UI — Agent-To-Website toggle enabled](docs/screenshots/ui-generator.png)\n\n```bash\nnpm run serve\n# → http://127.0.0.1:3847/\n```\n\nUI languages: **en** (default), **ru**, **es** — set `AICOM_LANDING_UI_LOCALE=en` in `.env`, or open `?lang=ru` for a one-off switch. Sample prompts: [`docs/PROMPTS.md`](docs/PROMPTS.md).\n\n---\n\n## Example landings (generated with this repo)\n\nReal outputs from the CLI (DeepSeek, May 2026). Each file is **one HTML document** with an embedded **demo AI agent** (chat open in screenshots) — open locally or host anywhere static.\n\n### 1 · SaaS task manager · `midnight-terminal`\n\n**Prompt:** *SaaS landing for an AI task manager built for remote teams — calm, trustworthy, dark command-center UI with clear pricing.*\n\n[![SaaS task manager landing](docs/screenshots/example-saas-task-manager.png)](docs/examples/saas-task-manager.html)\n\n→ [Open `docs/examples/saas-task-manager.html`](docs/examples/saas-task-manager.html)\n\n### 2 · Fintech payments · `luxe-gold-obsidian`\n\n**Prompt:** *Fintech app for cross-border payments for freelancers — trust, speed, premium dark UI.*\n\n[![Fintech payments landing](docs/screenshots/example-fintech-payments.png)](docs/examples/fintech-payments.html)\n\n→ [Open `docs/examples/fintech-payments.html`](docs/examples/fintech-payments.html)\n\n### 3 · Home solar · `sage-organic`\n\n**Prompt:** *Green energy startup landing for home solar panels — warm, optimistic, organic wellness aesthetic.*\n\n[![Home solar landing](docs/screenshots/example-green-solar.png)](docs/examples/green-solar.html)\n\n→ [Open `docs/examples/green-solar.html`](docs/examples/green-solar.html)\n\nRegenerate or add your own:\n\n```bash\nnode cli.mjs \"Your product pitch\" --style aurora-glass --out docs/examples/my-landing.html\nnpx aicom-landing --list-styles\n```\n\nMore detail: [`docs/examples/README.md`](docs/examples/README.md).\n\n---\n\n## Quick start\n\n**Requirements:** Node.js **18+** (native `fetch`). One LLM provider:\n\n- `ANTHROPIC_API_KEY`, or\n- **`DEEPSEEK_API_KEY`** (recommended if OpenAI is region-blocked), or\n- `OPENAI_API_KEY`, or\n- local **Ollama** (`OLLAMA_HOST` / `OLLAMA_MODEL`)\n\n```bash\ncd aicom-landing\ncp .env.example .env          # add your API key\nnpm run serve                 # web UI on :3847\n```\n\n**CLI** (writes `output/index.html` by default):\n\n```bash\nnpx aicom-landing \"SaaS landing for an AI task manager for remote teams\"\nnpx aicom-landing \"Green energy startup\" --style sage-organic --out ./dist/page.html\nnpx aicom-landing \"Florist with on-page AI guide\" --agent\n```\n\nKeys and `AICOM_LANDING_UI_LOCALE` load from `.env` at startup (`.env` overrides shell exports). Provider choice and models: [**LLM providers**](#llm-providers) below.\n\n---\n\n## LLM providers\n\nThere is **no provider toggle in the UI** — the server picks the first configured cloud key, otherwise Ollama. Routing lives in [`llm/provider.js`](llm/provider.js).\n\n### Where API keys live\n\n| Environment | File / location |\n|-------------|-----------------|\n| **Local** (`npm run serve`, CLI) | `.env` next to `package.json` (copy from [`.env.example`](.env.example); **never commit** — listed in `.gitignore`) |\n| **Docker** | Host `./.env`, mounted via `env_file:` in [`docker-compose.yml`](docker-compose.yml) |\n| **Production (VPS)** | e.g. `/opt/aicom-landing/.env` on the server — **separate** from your laptop; edit on the host, then `docker compose up -d --build` |\n\nKeys are read only on the **server** (Architect → Developer pipeline). The browser never sees `DEEPSEEK_API_KEY` or other secrets.\n\nAfter changing `.env`, restart the process (`npm run serve` or recreate the container).\n\n### Which provider is used (priority)\n\n| Order | If this env var is set | Default model | Optional model override |\n|------:|------------------------|---------------|-------------------------|\n| 1 | `ANTHROPIC_API_KEY` | `claude-sonnet-4-6` | `ANTHROPIC_MODEL` |\n| 2 | `DEEPSEEK_API_KEY` | `deepseek-chat` | `DEEPSEEK_MODEL`, `DEEPSEEK_BASE_URL` (default `https://api.deepseek.com/v1`) |\n| 3 | `OPENAI_API_KEY` | `gpt-4o-mini` | `OPENAI_MODEL`, `OPENAI_BASE_URL` (Groq / other OpenAI-compatible APIs) |\n| 4 | *(none of the above)* | Ollama | `OLLAMA_HOST` (default `http://127.0.0.1:11434`), `OLLAMA_MODEL` (default `llama3.2`) |\n\n**DeepSeek only:** set `DEEPSEEK_API_KEY` and leave `ANTHROPIC_API_KEY` / `OPENAI_API_KEY` unset (or commented out) in `.env`.\n\n**Example `.env` (DeepSeek):**\n\n```bash\nDEEPSEEK_API_KEY=sk-...\n# DEEPSEEK_MODEL=deepseek-chat\n# DEEPSEEK_BASE_URL=https://api.deepseek.com/v1\nAICOM_LANDING_UI_LOCALE=ru\n```\n\n### Generation tuning (optional)\n\n| Variable | Default | Purpose |\n|----------|---------|---------|\n| `AICOM_LANDING_JSON_RETRIES` | `3` | Retries per stage when model JSON is malformed or truncated |\n| `AICOM_LANDING_FETCH_RETRIES` | `3` | Retries for transient LLM HTTP/network errors |\n\nArchitect / Developer output token caps are fixed in code (**8192** / **16384**). Troubleshooting JSON errors: [`docs/DEPLOY.md`](docs/DEPLOY.md#troubleshooting-invalid-json-architect--developer).\n\n---\n\n## Configuration\n\n| Variable | Default | Purpose |\n|----------|---------|---------|\n| `AICOM_LANDING_HOST` | `127.0.0.1` | Preview server bind |\n| `AICOM_LANDING_PORT` / `PORT` | `3847` | Preview server port |\n| `AICOM_LANDING_UI_LOCALE` | `en` | UI + fallback landing language (`en` \\| `ru` \\| `es`) |\n| `AICOM_LANDING_BADGE_ENABLED` | `true` | Footer “Powered by” pill on generated pages |\n| `AICOM_LANDING_BADGE_URL` | `https://magic-ai-factory.com/` | Badge link |\n| `AICOM_LANDING_BADGE_LABEL` | `Powered by AI-Factory` | Badge text |\n| `AICOM_LANDING_RATE_LIMIT` | `20` | Max `POST /api/generate` per client IP per 15 minutes (`0` = off) |\n| `AICOM_LANDING_TRUST_PROXY` | *(unset)* | Set to `true` only behind your own reverse proxy so rate limits honor `X-Forwarded-For` safely |\n| `AICOM_LANDING_BASE_PATH` | *(empty)* | Browser URL prefix when the app is not at domain root (e.g. `/landing-page-generation`). Prefer a **subdomain** instead — see [`docs/DEPLOY.md`](docs/DEPLOY.md). |\n| `AICOM_LANDING_AGENT_STRICT` | *(on)* | Replace LLM agent widget if risky JS detected (`false` to disable) |\n| `AICOM_LANDING_SKIP_AGENT_INJECT` | *(off)* | `true` = never inject safe fallback widget |\n\n**Agent-To-Website:** [`docs/AGENT-TO-WEBSITE.md`](docs/AGENT-TO-WEBSITE.md) — embedded chat, demo mode, security model.\n\n**Production / reverse proxy:** see [`docs/DEPLOY.md`](docs/DEPLOY.md) (subdomain recommended, TLS, nginx).\n\nThe badge is **injected after generation** (`lib/badgeConfig.mjs`), not left to the LLM — so URL/label stay exact. When the page includes **`#aicom-agent`** (Agent-To-Website), the badge is placed **left of the chat FAB** (`bottom: 0.625rem`, `right: 5.85rem`) so it does not cover the button.\n\n**Generation limits (built-in):** Architect uses up to **8192** output tokens; Developer up to **16384**. Malformed or truncated JSON is retried (`AICOM_LANDING_JSON_RETRIES`, default **3**). See [`docs/DEPLOY.md`](docs/DEPLOY.md#troubleshooting-invalid-json-architect--developer).\n\n**Security:** the preview iframe uses **`sandbox`** (scripts/forms only; **no `allow-same-origin`**) so generated JS cannot read this UI’s cookies or DOM. Responses add **CSP** on the shell page and on `/preview/:id`. Still treat LLM output as untrusted: host behind auth/TLS on anything beyond a personal machine.\n\n| Concern | Mitigation |\n|--------|------------|\n| Preview / ZIP payload | Session IDs are unguessable + TTL; CSP on preview; iframe sandbox isolates the parent UI |\n| CSRF on `POST /api/generate` | `Origin` / `Referer` hostname must match `Host` hostname (default ports like `:443` / `:80` ignored so TLS proxies work) |\n| Abuse / cost | Optional rate limit: `AICOM_LANDING_RATE_LIMIT` (default **20** POSTs per IP per **15** min; `0` disables) |\n| Agent widget JS | Strict audit + safe fallback; demo chat does not call your LLM — [`docs/AGENT-TO-WEBSITE.md`](docs/AGENT-TO-WEBSITE.md) |\n\nProgrammatic `POST /api/generate` from non-browser tools must send `Origin` or `Referer` whose **hostname** matches the request `Host` hostname (e.g. `-H \"Origin: http://127.0.0.1:3847\"`).\n\n---\n\n## Docker\n\nBuild once; pass secrets at **run** time only (never bake keys into the image). Put keys in **`.env` on the host** and pass `--env-file .env` (or use Compose below) so they **survive container restart/recreate** — see [`docs/DEPLOY.md`](docs/DEPLOY.md).\n\nThe image sets **`AICOM_LANDING_HOST=0.0.0.0`** so the process listens on all interfaces (unlike the default `127.0.0.1` when run with Node locally). There is **no authentication** and **no HTTPS** inside the container — expose it only on trusted networks or put **TLS + auth** (reverse proxy, VPN, etc.) in front. The process runs as a **non-root** user inside the image (`uid 1001`).\n\n```bash\ncp .env.example .env   # DEEPSEEK_API_KEY, AICOM_LANDING_UI_LOCALE=en, …\n\n# Preview UI (Compose — env persists on host)\ndocker compose up -d --build\n\n# Or one-off / manual\ndocker build -t aicom-landing .\ndocker run --rm -p 3847:3847 --env-file ./.env \\\n  --entrypoint node aicom-landing /app/preview-server.mjs\n\n# CLI one-shot\ndocker run --rm --env-file ./.env -v \"$PWD/out:/out\" aicom-landing \\\n  \"Fintech app for freelancers\" --out /out/index.html\n\n# Disable badge / custom label\ndocker run --rm -p 3847:3847 \\\n  -e DEEPSEEK_API_KEY \\\n  -e AICOM_LANDING_BADGE_ENABLED=false \\\n  --entrypoint node aicom-landing /app/preview-server.mjs\n```\n\n---\n\n## How it works\n\n```\nUser prompt + style preset\n        ↓\n   Architect (JSON: layout, copy language, visual plan, sections)\n        ↓\n   Developer (single HTML: embedded CSS, inline SVG, optional JS)\n        ↓\n   Badge inject (env) → preview / ZIP / disk\n```\n\n- **20 presets** in `styles/presets.json` (glass, brutalist, editorial, organic, cyberpunk, …).\n- **Landing copy language** follows the prompt; if unclear, uses `ui_locale` from the UI (not English by default).\n- **Funnel:** optional footer CTA to [magic-ai-factory.com](https://magic-ai-factory.com/) when the badge is enabled.\n\n---\n\n## Community\n\n- [License](LICENSE) (MIT)\n- [Code of conduct](CODE_OF_CONDUCT.md)\n- [Contributing](CONTRIBUTING.md)\n- [Security policy](SECURITY.md)\n\n---\n\n## Repo layout\n\n```\naicom-landing/\n├── cli.mjs                 # CLI entry\n├── preview-server.mjs      # Web UI + /api/generate + preview + zip\n├── public/index.html       # Generator UI\n├── lib/\n│   ├── generate.mjs        # Architect → Developer pipeline\n│   ├── agentToWebsite.mjs  # Agent-To-Website widget + security audit\n│   ├── badgeConfig.mjs     # Powered-by env + HTML inject\n│   ├── uiLocale.mjs        # UI strings (en / ru / es)\n│   └── …\n├── llm/                    # provider + prompts\n├── styles/presets.json\n├── docs/\n│   ├── AGENT-TO-WEBSITE.md # Embedded agent mode + security\n│   ├── screenshots/        # README images\n│   └── examples/           # Sample generated landings\n└── Dockerfile\n```\n\nSee [Contributing](CONTRIBUTING.md) for how to propose changes.\n\n---\n\n## License\n\nThis project is released under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexar76%2Faicom-landing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexar76%2Faicom-landing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexar76%2Faicom-landing/lists"}