Skip to content

A chatbot built with React, SignalR and RabbitMQ that gets stock price if asked.

Notifications You must be signed in to change notification settings

ocodista/ChatBot

Repository files navigation

ChatBot Web Application

A chat bot web application focused on the high quality back-end code.

Features

  • 🔒  Authentication with IdentityServer
  • 💬  Chat Room for logged users
  • 📈  Command /stock=code gets price of stock from Stooq
  • ❌  Command errors are handled by chat Administrator
  • ⏱️  Messages are ordered by time (older ones are shown in top)
  • 💥  Only 50 messages are displayed in the chat ( No need to reload the page, js makes the magic in real-time )

Built with

Getting Started

Prerequisites

  • Docker
  • Docker Compose

or

  • .NET 5 Build Sdk && .NET 5 Runtime
  • Microsoft SQL Server 2017
  • RabbitMQ

Usage

With docker

  1. In the root folder, run
docker-compose build
  1. Then you can set it all up with
docker-compose up -d
  • Notes
    • Web and Worker containers will be restarted until RabbitMQ server container is ready for connections
    • If you´re running on Windows, you need to set COMPOSE_CONVERT_WINDOWS_PATHS=1
    • If you need to scale the worker container, just remove the container-name on docker-compose.yml and run
      docker-compose up --scale worker=3
      
  1. Open your browser in http://localhost:4000
  2. Create your account
  3. Start chatting

Without docker

  1. Start your RabbitMQ Server + MSSQL Server 2017
  2. Update the appSettings in Chat.Web/appsettings.json and Chat.Worker/appsettings.json
  3. In the root folder, run
dotnet restore
dotnet build
  1. Then, start worker with
cd Chat.Worker
dotnet run
  1. In another terminal, run the following command in the root folder, to start web application
cd Chat.Web
dotnet run
  1. Open your browser in http://localhost:5000
  2. Create your account
  3. Start chatting

Tests

On the project root, run this command to run all tests

cd Chat.Tests
dotnet test

Contact

LinkedIn

About

A chatbot built with React, SignalR and RabbitMQ that gets stock price if asked.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published