Microchat is a simple chat made withOUT microservices architecture. First, it was being developed as a challenge to join Ioasys. However, I was hired by another company, so I developed it just to learn more about sockets and NOT microservices.
- Sign up
- Sign in
- Sign out
- Create rooms
- Index rooms
- Index user's rooms
- Join rooms
- Kick users out of rooms
- Leave room
- Send messages
- Index messages
METHOD | PATH | SHORT DESCRIPTION |
---|---|---|
GET | /messages/{room_id} | Index room's messages |
POST | /messages | Send a message |
GET | /rooms | Index rooms |
POST | /rooms | Create a room |
GET | /rooms/users/me | Index rooms the user is participating |
GET | /rooms/users/{room_id} | Index room's participants |
POST | /rooms/users/kick | Kick a user out of a room |
POST | /rooms/users | Join a room |
DELETE | /rooms/users/{room_id} | Leave a room |
GET | /users | Show current user's data |
POST | /users | Sign up |
POST | /users/sessions | Sign in |
DELETE | /users/sessions | Sign out |
-
Go to
backend
folder -
Run
yarn
ornpm install
to install project's dependecies -
Run
docker-compose up -d
to setup containers and start them 3.1. You can create adocker-compose.override.yml
before running this command to change the values you want (optional step) -
Copy
ormconfig.example.json
to a newormconfig.json
file and fill it with the data that you have setup insidedocker-compose.yml
anddocker-compose.override.yml
-
Run
yarn typeorm migrations:run
to setup database tables -
Copy
.env.example
to a new.env
file and fill it with the data that you have setup insidedocker-compose.yml
anddocker-compose.override.yml
-
Run
yarn dev
ornpm run dev
to start the project on the development mode
-
Go to
frontend
folder -
Run
yarn
ornpm install
to install project's dependecies -
Run
yarn start
ornpm run start
to start the project on the development mode
-
Go to
backend
folder -
Run
yarn build
ornpm run build
-
Remember to setup all config files listed on the
How to run
section -
Copy
ecosystem.config.example.js
to a newecosystem.config.js
file and change its data if you want to -
Run
yarn prod
ornpm run prod
to start the project on the production mode
-
Go to
frontend
folder -
Run
yarn build
ornpm run build
-
Serve the static files using any serving lib or deploy it at any CDN
-
Go to
backend
folder -
Run
yarn test
ornpm run test
-
Open
coverage/lcov-report/index.html
file to see the coverage reports
If you want to contribute with me to improve it and add new features, you can open a pull request or contact me by any contact method listed in my Github Profile.
MIT © Daniel Oliveira