Skip to content

ericmt-98/botwhatsapp

Repository files navigation

botwhatsapp

Monorepo for a WhatsApp Cloud API bot with an operator dashboard, built around Claude (Anthropic) for message classification and a Fastify + Prisma backend.

Structure

apps/
  bot/         Fastify API + WhatsApp webhook + AI engine (Prisma/Postgres)
  dashboard/   React + Vite + Tailwind operator UI
packages/
  shared/      Shared TypeScript types

Requirements

  • Node.js 20+
  • pnpm 9+
  • PostgreSQL 14+
  • Redis 7+
  • S3-compatible storage (optional, for asset uploads)

Setup

pnpm install
cp .env.example .env   # fill in credentials
pnpm db:migrate
pnpm db:seed

Develop

pnpm dev:bot         # Fastify API on $BOT_PORT (default 3001)
pnpm dev:dashboard   # Vite dev server on $DASHBOARD_PORT (default 3000)

Test

pnpm test                 # full bot suite
pnpm test:unit
pnpm test:adversarial     # prompt-injection / tripwire scenarios

Simulation

pnpm simulate             # offline conversation simulation (mock AI)
pnpm simulate:real-ai     # uses ANTHROPIC_API_KEY
pnpm scenario:all         # run every scripted scenario

Build

pnpm build       # builds shared -> bot -> dashboard
pnpm typecheck

License

MIT — see LICENSE.

About

WhatsApp Cloud API bot with operator dashboard. Monorepo (Fastify + Prisma + React + Vite) using Claude for message classification.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors