{"id":35133649,"url":"https://github.com/jfreed-dev/n8n-codex","last_synced_at":"2026-01-13T22:57:49.063Z","repository":{"id":330795506,"uuid":"1116326953","full_name":"jfreed-dev/n8n-codex","owner":"jfreed-dev","description":"Opinionated starter to run n8n in Docker with PostgreSQL, a Claude-powered AI agent for network intelligence, and UniFi health/config monitoring with Slack alerts.","archived":false,"fork":false,"pushed_at":"2026-01-12T04:33:49.000Z","size":160,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-12T13:50:28.374Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/jfreed-dev/n8n-codex","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/jfreed-dev.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":"2025-12-14T16:38:08.000Z","updated_at":"2026-01-12T04:33:53.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/jfreed-dev/n8n-codex","commit_stats":null,"previous_names":["jfreed-dev/n8n-codex"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/jfreed-dev/n8n-codex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfreed-dev%2Fn8n-codex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfreed-dev%2Fn8n-codex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfreed-dev%2Fn8n-codex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfreed-dev%2Fn8n-codex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jfreed-dev","download_url":"https://codeload.github.com/jfreed-dev/n8n-codex/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfreed-dev%2Fn8n-codex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28400533,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2025-12-28T07:37:27.384Z","updated_at":"2026-01-13T22:57:49.058Z","avatar_url":"https://github.com/jfreed-dev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# n8n + Claude Agent + UniFi Health\n\n[![CI](https://github.com/jfreed-dev/n8n-codex/actions/workflows/ci.yml/badge.svg)](https://github.com/jfreed-dev/n8n-codex/actions/workflows/ci.yml)\n[![Release](https://img.shields.io/github/v/release/jfreed-dev/n8n-codex)](https://github.com/jfreed-dev/n8n-codex/releases/latest)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nOpinionated starter to run n8n in Docker with PostgreSQL, a Claude-powered AI agent for network intelligence, and UniFi health/config monitoring with Slack alerts.\n\n## What you get\n- `docker-compose.yml` to run n8n + Postgres + Claude Agent + ChromaDB with persistent volumes.\n- `.env.example` for all required secrets.\n- `claude-agent/` – AI-powered UniFi network expert with Slack integration and HTTP API.\n- `workflows/unifi_health_to_slack.json` – scheduled UniFi health poller with AI analysis and Slack alerting.\n- `workflows/unifi_best_practices_audit.json` – daily security audit with AI recommendations.\n- `ARCHITECTURE.md` – visual Mermaid diagrams of service topology, data flows, and component interactions.\n\n## Prereqs\n- Docker + docker compose\n- Anthropic API key (for Claude Agent)\n- UniFi API token with read scope (`Settings \u003e System \u003e Advanced \u003e API Access` on recent controllers)\n- UniFi controller credentials (username/password) for best practices audit\n- Slack Bot token (chat:write scope) and signing secret\n\n## Docker Images\n\nPre-built images are available from GitHub Container Registry:\n\n```bash\n# Pull the latest Claude Agent image\ndocker pull ghcr.io/jfreed-dev/n8n-codex/claude-agent:latest\n\n# Or a specific version\ndocker pull ghcr.io/jfreed-dev/n8n-codex/claude-agent:1.0.1\n```\n\n## Setup\n1) Copy env template and edit:\n```bash\ncp .env.example .env\n# fill POSTGRES_*, N8N_HOST, WEBHOOK_URL, N8N_ENCRYPTION_KEY\n# add ANTHROPIC_API_KEY for Claude Agent\n# add UNIFI_BASE_URL / UNIFI_API_TOKEN / UNIFI_SITE (Integration API)\n# add UNIFI_USERNAME / UNIFI_PASSWORD (Local Controller API for audits)\n# add SLACK_BOT_TOKEN / SLACK_APP_TOKEN / SLACK_SIGNING_SECRET / SLACK_CHANNEL\n```\n\n2) Start the stack (builds locally or uses pre-built image):\n```bash\ndocker compose up -d\n```\n- n8n UI: http://localhost:5678\n- Claude Agent API: http://localhost:8080\n- ChromaDB: http://localhost:8000\n- Data persists in `.n8n_data`, `chromadb_data/`, and the named Postgres volume.\n\n3) Import workflows in n8n UI:\n- `Import from File` → pick `workflows/unifi_health_to_slack.json`\n- `Import from File` → pick `workflows/unifi_best_practices_audit.json`\n\n4) Wire credentials\n- UniFi Integration API: supply `UNIFI_BASE_URL`, `UNIFI_API_TOKEN`, `UNIFI_SITE`. If your cert is self-signed, `allowUnauthorizedCerts` is enabled in the HTTP nodes.\n- UniFi Local Controller API: supply `UNIFI_USERNAME`, `UNIFI_PASSWORD` for cookie-based auth.\n- Slack: bot token for chat.postMessage; app token for Socket Mode (Claude Agent).\n\n## Workflow notes\n### Claude Agent\nThe Claude Agent service provides AI-powered UniFi network intelligence:\n- **Slack Q\u0026A**: @mention the bot or DM to ask questions about your network\n- **HTTP API**: Endpoints for n8n workflows to get AI analysis (`/api/analyze/health`, `/api/analyze/audit`)\n- **Knowledge Base**: WiFi best practices, UniFi 10.x features, security guides stored in ChromaDB\n- **Live Queries**: Tools to query UniFi APIs for real-time device status\n\n### UniFi Health to Slack\nUses the UniFi Network Integration API with `X-API-KEY`.\n- Cron (every 15m) → Get Sites → pick site by `UNIFI_SITE` → fetch devices → analyze health → If degraded → Claude Agent AI analysis → Slack alert\n\n### UniFi Best Practices Audit\nUses the UniFi Local Controller API with cookie-based auth.\n- Daily (8 AM) → Authenticate → Fetch (Networks, WLANs, Firewall, Devices) → Analyze → If critical → Claude Agent AI recommendations → Slack alert\n\n## Customization ideas\n- Replace HTTP Slack call with the native Slack node using OAuth (reuse the same bot token).\n- Add alert throttling with `Move` + `Wait` or a Redis-based rate limiter.\n- Add custom knowledge documents to `claude-agent/knowledge/` to enhance AI responses.\n- Expose n8n behind HTTPS by putting Traefik/Caddy in front if you'll run it remotely.\n\n## Running locally\n- Stop stack: `docker compose down`\n- View logs:\n  - n8n: `docker compose logs -f n8n`\n  - Claude Agent: `docker compose logs -f claude-agent`\n  - ChromaDB: `docker compose logs -f chromadb`\n\n## Security\n- Set a strong `N8N_ENCRYPTION_KEY` before first launch; changing it later invalidates saved credentials.\n- If running on the internet, place n8n behind auth (reverse proxy + basic auth/OIDC) and use HTTPS.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjfreed-dev%2Fn8n-codex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjfreed-dev%2Fn8n-codex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjfreed-dev%2Fn8n-codex/lists"}