Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Coding Challenge — Modular Chatbot with Router, Agents, Security, and Observability

License

Notifications You must be signed in to change notification settings

ElderSam/chatbot

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

221 Commits
221 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 Chatbot Project

A modular InfinitePay chatbot prototype, tailored for the InfinitePay platform (see ajuda.infinitepay.io), featuring specialized agents, platform-specific logic, basic security, and initial observability.


📋 Quick Reference

1. 🐳 How to run locally (Docker)

See Infrastructure Guide - Docker for complete setup commands.

2. ☸️ How to run on Kubernetes

See Kubernetes Deploy Guide for full deployment steps, including Redis, Backend, Frontend, and URLs for challenge.md.

3. 🏗️ Architecture (Router, Agents, Logs, Redis)

See Backend Setup - System Architecture for complete architecture diagram and component details.

4. 💻 Frontend access

Local (Development): http://localhost:3000

Production/Kubernetes:

Cloud Deploy: See Cloud Deploy Guide for public URLs

Configure the frontend .env file according to the environment:

# Local
VITE_BACKEND_URL=http://localhost:3000

# Production/Kubernetes
# VITE_BACKEND_URL=/api

See Frontend README for detailed instructions.

5. 📊 Example logs (JSON)

See Backend Setup for complete request/response/log examples.

6. 🔐 Security implementation

  • Input sanitization: HTML/JS removal via SanitizePipe
  • Prompt injection: Pattern blocking via PromptGuardService
  • Details: Security Guide

7. 🧪 How to run tests (backend)

See Backend Setup for test commands and coverage details.


🚀 Quick Start

Local Development

git clone https://github.com/ElderSam/chatbot.git
cd chatbot

Choose your setup:

Production Deployment

💡 Works without API keys for testing. For full functionality, see Backend Setup.


🏗️ What's Built

  • RouterAgentKnowledgeAgent + MathAgent → Specialized responses
  • Security: Input sanitization, prompt injection prevention
  • Observability: Structured logs in Redis
  • Docker: Containerized with health checks
  • Kubernetes: Production-ready YAML manifests

📚 Documentation


🛠️ Tech Stack

  • Backend: NestJS (TypeScript)
  • LLM: Groq (Llama 3.1) + HuggingFace (Embeddings)
  • Database: Redis
  • Container: Docker + Kubernetes
  • Testing: Jest (76 tests passing)

Status:Production Ready | 🧪 Main features Tested | 🚀 Cloud Native

About

Coding Challenge — Modular Chatbot with Router, Agents, Security, and Observability

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.