{"id":50865060,"url":"https://github.com/eddndev-studio/eddnbot","last_synced_at":"2026-06-15T00:06:05.862Z","repository":{"id":342713810,"uuid":"1173229361","full_name":"eddndev-studio/eddnbot","owner":"eddndev-studio","description":"WhatsApp automation with AI — multi-tenant SaaS platform. Fastify + React + PostgreSQL + OpenAI/Anthropic/Gemini.","archived":false,"fork":false,"pushed_at":"2026-03-07T06:21:33.000Z","size":343,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-07T06:23:09.845Z","etag":null,"topics":["ai","anthropic","chatbot","drizzle-orm","fastify","gemini","multi-tenant","openai","postgresql","react","saas","typescript","whatsapp","whatsapp-api"],"latest_commit_sha":null,"homepage":"https://app.eddn.dev","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eddndev-studio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"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-03-05T06:19:52.000Z","updated_at":"2026-03-07T06:21:36.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/eddndev-studio/eddnbot","commit_stats":null,"previous_names":["eddndev-studio/eddnbot"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/eddndev-studio/eddnbot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddndev-studio%2Feddnbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddndev-studio%2Feddnbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddndev-studio%2Feddnbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddndev-studio%2Feddnbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eddndev-studio","download_url":"https://codeload.github.com/eddndev-studio/eddnbot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddndev-studio%2Feddnbot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34342107,"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-06-14T02:00:07.365Z","response_time":62,"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","anthropic","chatbot","drizzle-orm","fastify","gemini","multi-tenant","openai","postgresql","react","saas","typescript","whatsapp","whatsapp-api"],"created_at":"2026-06-15T00:06:04.966Z","updated_at":"2026-06-15T00:06:05.850Z","avatar_url":"https://github.com/eddndev-studio.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eddnbot\n\nWhatsApp automation with AI — multi-tenant SaaS platform.\n\nReceive WhatsApp messages, process them with AI (OpenAI, Anthropic, Gemini), and auto-reply intelligently. Built for operators who manage multiple tenants from a single admin panel.\n\n## Features\n\n- **Multi-tenant architecture** — isolated data, API keys, and quotas per tenant\n- **AI auto-reply** — conversational AI powered by OpenAI, Anthropic, or Google Gemini\n- **Audio transcription** — Whisper integration for voice message processing\n- **WhatsApp Cloud API** — native integration with zero external dependencies\n- **Admin dashboard** — full SaaS operator panel for managing tenants, keys, configs, and usage\n- **Tenant dashboard** — self-service panel for AI configs, WhatsApp accounts, quotas, and usage\n- **Usage tracking \u0026 rate limiting** — per-tenant quotas for AI tokens, messages, and API requests\n- **TDD** — 170+ tests with Vitest\n\n## Tech Stack\n\n| Layer | Technology |\n|-------|-----------|\n| Monorepo | Turborepo + pnpm 10 workspaces |\n| Runtime | Node.js \u003e= 22, ESM |\n| API | Fastify 5 |\n| Web | Vite + React 19 + TanStack Router |\n| UI | shadcn/ui + Tailwind CSS 4 |\n| Database | PostgreSQL 17 + Drizzle ORM |\n| Cache | Redis 7 |\n| AI | OpenAI, Anthropic, Google Gemini, Whisper |\n| WhatsApp | Meta Cloud API (native fetch + crypto) |\n| Testing | Vitest 4, TDD |\n| Deploy | Docker Compose + GitHub Actions (self-hosted) |\n\n## Project Structure\n\n```\neddnbot/\n  apps/\n    api/          — Fastify REST API (port 3001)\n    web/          — React SPA dashboard (port 3000)\n  packages/\n    ai/           — Multi-provider AI engine\n    db/           — Drizzle ORM schema \u0026 migrations\n    whatsapp/     — WhatsApp Cloud API client\n    config-ts/    — Shared TypeScript config\n    config-lint/  — Shared ESLint config\n  tooling/\n    docker/       — Docker Compose \u0026 nginx configs\n```\n\n## Getting Started\n\n### Prerequisites\n\n- Node.js \u003e= 22\n- pnpm 10\n- PostgreSQL 17\n- Redis 7\n\n### Setup\n\n```bash\n# Install dependencies\npnpm install\n\n# Copy environment variables\ncp .env.example .env\n# Edit .env with your database, Redis, and API keys\n\n# Run database migrations\npnpm --filter db db:migrate\n\n# Start development servers\npnpm dev\n```\n\nThe API runs on `http://localhost:3001` and the web dashboard on `http://localhost:3000`.\n\n### Testing\n\n```bash\n# Run all tests\npnpm test\n\n# Run API tests only\npnpm --filter api test\n```\n\n## Authentication\n\n### Tenant Auth\nAPI key-based (`ek_live_*`). Keys are SHA-256 hashed and stored in the database. Pass via `X-API-Key` header.\n\n### Admin Auth\nSingle operator token via `ADMIN_SECRET` env var. Pass via `X-Admin-Token` header. All `/admin/*` routes require this token.\n\n## API Routes\n\n### Admin (`/admin/*` — requires `X-Admin-Token`)\n- `GET /admin/auth/verify` — validate admin token\n- `POST/GET /admin/tenants` — create \u0026 list tenants\n- `GET/PATCH/DELETE /admin/tenants/:id` — tenant CRUD\n- `POST/GET/DELETE /admin/tenants/:id/api-keys` — API key management\n- `GET /admin/tenants/:id/ai-configs` — tenant AI configs\n- `GET /admin/tenants/:id/whatsapp-accounts` — tenant WhatsApp accounts\n- `GET/PUT /admin/tenants/:id/quotas` — tenant quota management\n- `GET /admin/overview/stats` — global platform stats\n- `GET /admin/usage` — global usage breakdown\n- `GET /admin/usage/:tenantId` — per-tenant usage\n\n### Tenant (`/` — requires `X-API-Key`)\n- `POST/GET/PATCH/DELETE /ai/configs` — AI configuration CRUD\n- `POST /ai/chat` — AI chat completion\n- `POST /ai/transcribe` — audio transcription\n- `POST/GET/PATCH/DELETE /whatsapp/accounts` — WhatsApp account CRUD\n- `POST /whatsapp/send` — send WhatsApp message\n- `GET/POST /whatsapp/webhook` — Meta webhook (public)\n- `GET/PUT/DELETE /quotas` — quota management\n- `GET /usage` — usage summary\n\n## Deployment\n\nProduction deployment uses Docker Compose with GitHub Actions on a self-hosted runner:\n\n```bash\ncd tooling/docker\ncp /opt/eddnbot/.env .env\ndocker compose -f docker-compose.prod.yml --env-file .env up -d --build\n```\n\nServices: PostgreSQL, Redis, API, Web (nginx), and a migration runner.\n\n## Links\n\n- **App**: [app.eddn.dev](https://app.eddn.dev)\n- **Admin**: [app.eddn.dev/admin/login](https://app.eddn.dev/admin/login)\n- **Privacy Policy**: [app.eddn.dev/privacy](https://app.eddn.dev/privacy)\n- **Terms of Service**: [app.eddn.dev/terms](https://app.eddn.dev/terms)\n\n## License\n\nPrivate — All rights reserved.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feddndev-studio%2Feddnbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feddndev-studio%2Feddnbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feddndev-studio%2Feddnbot/lists"}