Giter Club home page Giter Club logo

chatstockbot's Introduction

ChatStockBot - .NET Core 2.0

This is a chat application written in C# .NET Core 2.0, using a ASP.NET Core Web Application implementing SignalR for realtime comunication and a Decoupled ChatBot Microservice that communicates with the WebApp using RabbitMQ.

Features

  • User Registration and Login using an email
  • Chatroom for several users
  • Stock Updates with command \stock=stock_symbol

Installation

ChatStockBot requires Visual Studio 2017 With .NET Core 2.0 Installed. It also needs RabbitMQs v3.7.17, RabbitMQ requires ERLang OTP v22.

ChatStockBot needs at least SQL Server Express for it's data persistence needs.

Nuget Package Manager will automatically restore all the dependencies required for each project when opening the project or atempting to compile it.

Migrations

ChatStockBot uses .NET Core Entity Framework code first approach for it's Data Access Layer, currently I have the connection string configured to use SQL Server Express LocalDB. The Connection string needs to be updated if a different version of SQL Server is used.

In order to execute the migration for the table creation, run the following command in the Package Manager Console, located at Tools > Nuget Package Manager > Package Manager Console Make sure the Default Project is ChatLogicLayer

$ Update-Database 

Migrations can also be run with the dotnet cli command, preferably in a PowerShell terminal

$ cd {ChatLogicLayer Project folder inside the Solution}
$ dotnet ef database update

Running the App

In order to run the ChatBotBroker and the WebApp I recommend configuring the solution to run Multiple Startup Projects in order to configure this right click the solution and go to Properties inside the dialog select CommonProperties > Startup Project. Select Multiple startup projects and set ChatBotBroker and ChatLogicLayer action to Start

Tests

Tests can be run using the integrated Visual Studio tool or using the dotnet cli tool in a PowerShell terminal:

$ cd {test project folder}
$ dotnet test

Projects

Project Description
ChatLogicLayer Web Application
ChatBotBroker Console App with the Bot Broker Service
ChatBotBroker.Test xUnit Test Project
ChatBot.Models Class Library

TODOs

  • Add Repository Pattern for the EF DbContext
  • Add Signed SSL
  • When moving to production RabbitMQ should have non-default username and password
  • Find a way to have a single configuration file elegantly (I found a way but it's too hacky)

chatstockbot's People

Contributors

gadiel avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.