eoc-customer-support-assistant
2.7K
EOC Customer Support Assistant is an AI-powered NestJS service for automating and orchestrating customer support workflows. It integrates with Chatwoot and GitHub, leverages AWS Bedrock AI models for intelligent conversation routing and knowledge management, and uses Redis and Qdrant for operational context storage and vector search capabilities.
The application follows a modular NestJS architecture:
src/
├── modules/
│ ├── chatwoot/ # Chatwoot webhook ingestion and conversation orchestration
│ ├── github-webhook/ # GitHub webhook processing and KB embedding sync
│ ├── health/ # Liveness/readiness probes
│ ├── ai/ # AI service for Bedrock integration
│ ├── memory/ # Episodic and permanent memory management
│ └── app/ # Core application module
├── integrations/
│ ├── redis/ # Redis client and caching
│ ├── bedrock/ # AWS Bedrock AI integration
│ ├── qdrant/ # Qdrant vector database client
│ ├── bullmq/ # Job queue processing
│ └── chatwoot/ # Chatwoot API client
├── core/
│ ├── config/ # Typed configuration and environment validation
│ ├── guards/ # Authentication and authorization guards
│ ├── http/ # HTTP filters and interceptors
│ └── logger/ # Application logging
/api (configurable via APP_BASE_PATH environment variable)GET /api/health/liveGET /api/health/ready# Install dependencies
npm install
# Copy environment template
cp .env.example .env
# Configure environment variables
# Edit .env with your credentials and deployment-specific values
# Development mode with hot reload
npm run start:dev
# Production build
npm run build
# Production mode
npm run start:prod
Send a POST request to /api/chatwoot/webhook with a valid Chatwoot payload. The service will:
curl http://localhost:3000/api/health/live
# Lint code
npm run lint
# Build application
npm run build
# Run unit tests
npm run test
# Run end-to-end tests
npm run test:e2e
# Check code formatting
npm run format:check
src/**/*.spec.tstest/app.e2e-spec.tsdocker build -t eoc-customer-support-assistant .
docker compose up --build
docker run -p 3000:3000 --env-file .env eoc-customer-support-assistant
Use docker-compose.yml for local development or simple deployments.
Use the Helm chart in charts/eoc-customer-support-assistant/ for Kubernetes deployments:
helm install eoc-customer-support-assistant ./charts/eoc-customer-support-assistant
Adapt environment variables and secrets for your cloud provider (AWS, GCP, Azure). Use secret management services for sensitive credentials.
See .env.example for the complete variable matrix. Core configuration categories:
NODE_ENV: Application environment (development, production, test)PORT: Server port (default: 3000)APP_BASE_PATH: API base path (default: /api)LOG_LEVEL: Logging level (debug, info, warn, error)CORS_ORIGINS: Allowed CORS origins (comma-separated)BODY_LIMIT: Maximum request body sizeREQUEST_TIMEOUT_MS: Request timeout in millisecondsTRUST_PROXY: Enable when behind a reverse proxyRATE_LIMIT_TTL_MS: Rate limit time windowRATE_LIMIT_LIMIT: Maximum requests per windowREDIS_HOST: Redis server hostnameREDIS_PORT: Redis server portREDIS_PASSWORD: Redis authentication passwordREDIS_DB: Redis database numberBEDROCK_AWS_REGION: AWS region for BedrockBEDROCK_AWS_ACCESS_KEY_ID: AWS access keyBEDROCK_AWS_SECRET_ACCESS_KEY: AWS secret keyQDRANT_URL: Qdrant server URL (e.g. https://xyz-example.qdrant.io)QDRANT_API_KEY: Qdrant API key (if authentication enabled)QDRANT_PORT: Qdrant port (default: 443)QDRANT_USE_HTTPS: Use HTTPS for Qdrant connection (default: true)QDRANT_COLLECTION_NAME: Qdrant collection used for RAG semantic search (required, e.g. product_knowledge - same box that doc-sync writes to)Powers Swagger UI (/swagger) and the REST API (POST /api/documentation/seed, remove, seed-all) to sync markdown documentation files into Qdrant vectors.
DOCUMENTATION_SYNC_ENABLED: Master toggle for documentation synchronization and queue processingDOCUMENTATION_SYNC_API_KEY: Secure admin API key for Swagger UI authorization and REST endpoint authenticationDOCUMENTATION_SYNC_GITHUB_TOKEN: GitHub Personal Access Token to fetch repository trees/blobs (increases rate limits)DOCUMENTATION_SYNC_ALLOWED_ORGS: Comma-separated allowlist of approved GitHub organizations (default: radiantlogic-v8)DOCUMENTATION_SYNC_COLLECTION_NAME: Target Qdrant collection (defaults to QDRANT_COLLECTION_NAME if omitted)DOCUMENTATION_SYNC_CLIENTS: Optional JSON map of service client IDs to HMAC secrets for machine-to-machine requestsDOCUMENTATION_SYNC_SIGNATURE_TOLERANCE_SECONDS: Window for HMAC timestamp tolerance (default: 300)DOCUMENTATION_SYNC_NONCE_TTL_SECONDS: Anti-replay nonce TTL in Redis (default: 300)DOCUMENTATION_SYNC_JOB_RETENTION_SECONDS: Job history and event retention TTL in Redis (default: 2592000 = 30 days)DOCUMENTATION_SYNC_LOCK_TTL_SECONDS: Distributed concurrency lock TTL in Redis (default: 21600 = 6 hours)CHATWOOT_BASE_URL: Chatwoot instance URLCHATWOOT_AGENT_BOT_ACCESS_TOKEN: Bot access tokenCHATWOOT_USER_ACCESS_TOKEN: User access tokenCHATWOOT_WEBHOOK_SECRET: Webhook signature secretCHATWOOT_ACCOUNT_ID: Chatwoot account IDListens for incoming GitHub repository push events at POST /api/webhooks/github.
Note: Not needed if you are using the Swagger REST endpoints to seed and sync documentation.
GITHUB_WEBHOOK_ENABLED: Master toggle for the GitHub webhook endpoint (default: false)GITHUB_WEBHOOK_SECRET: Secret configured in GitHub Repo Settings -> WebhooksThis is a private enterprise application. Internal contributions should follow these guidelines:
devnpm run testnpm run lintCopyright (c) Radiant Logic, Inc. All rights reserved.
This software is proprietary and confidential. Unauthorized copying, distribution, or use of this software, via any medium, is strictly prohibited. This software is provided "AS IS" without warranty of any kind.
Content type
Image
Digest
sha256:dd5c71ec1…
Size
223.2 MB
Last updated
about 1 month ago
docker pull radiantone/eoc-customer-support-assistant:dev