Skip to content

Repository files navigation

ChatRoom

ChatRoom is a simple chat Service

You can access the development environment here !

Summary

  1. Requirement
  2. Launch
  3. Business Process

Requirement

First of all, you must install the following dependencies, Docker for the database, .NET for the back office part and NodeJS and Angular for the front end part.

We recommend that you install an editor like VS Code or Jet Brains Rider to be able to better manage the environment if you ever want to launch the application in debugger mode.

Docker

Go to the Official Docker website and install the version that corresponds to your operating system. This dependency will be used to launch the database in a pre-made environment.

.NET

Install .NET SDK to be able to launch the API, for this you must go to the SDK download link and download the version corresponding to your system.

Angular

For the front end application you must download NodeJS which will then install the NPM packet manager where you will then have to type the following commands in a terminal.

~$ npm i -g @angular/cli
~$ npm i -g pnpm
~$ cd ./chatroom-app
~$ pnpm i

Note

We recommend that you install NodeJS using Node Version Manager (NVM), the tool will allow you to change version of NodeJS and NPM easily if necessary.

Launch

Now that all the project dependencies are installed, you can launch it without worries by following the series of commands indicated in the 3 steps below.

First of all you must go to the root of the project by typing the following command:

~$ cd ~/ChatRoom

Database

To launch the database, use the following docker command:

~$ docker compose up db

Check if dotnet ef tools are installed with the good version:

~$ dotnet ef --version
Entity Framework Core .NET Command-line Tools
9.0.0

If not install them with the following command:

~$ dotnet tool install --global dotnet-ef

Note

Don't forget to run the docker daemon if this is not the case with ~$ sudo dockerd.

API

In a second terminal, type the following commands:

~$ cd ./ChatRoom.Startup
~$ dotnet run

Update to database previous version

After having modified model classes, if you want to update the database with changes, use the following command

~$ cd ./ChatRoom.Repository
~$ dotnet ef migrations add ChatRoomName -s ..\Chat.Startup\ 

The launch of the app will execute the migration.

In the case the migration you have to rollback to is 20241224111800_OfferBatchUpdateAt:

~$ cd ./ChatRoom.Repository
~$ dotnet ef database update -s ..\ChatRoom.Startup\ 20241224111800_OfferBatchUpdateAt

Client APP

In a final terminal, type the following commands:

~$ cd ./chatroom-app
~$ pnpm start

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages