Skip to content

jf001z/MessageBoard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Message Board

This Message Board using Material-UI, Material-Table in front end and express, graphql, MongoDB, docker and docker-compose in backend, The app is using websocket to live update the latest message.

Required Apps

In order to run this app locally, following apps have to be installed.

  1. Docker
  2. Docker Compose
  3. Nodejs
  4. Yarn
  5. MongoDB Compass

Database Setup

First run following command to download the project:

git clone https://github.com/jf001z/MessageBoard

Then

cd MessageBoard

Then run following command:

docker ps -a

To check if any exist docker container using port 27018, if it is occupied please stop that container by

docker stop you_container_name.

and run following command to install database container:

docker-compose up -d

Create Test Data

After db is setup, go into server folder cd server inside folder MessageBoard. Then run

yarn

to install depending modules. Then run

yarn generateTestData

to create test data. You can check if the test data has been created on Compass:

Run Api Server

Then inside folder server, run 'yarn dev' to start the api server. The api is using epxress and graphql. You can check the server by visit following url

http://localhost:4000/graphql

it will be like this:

graphql playgound

Run Frontend Server

If the api server is running ok, open another cmd window and going into frontend folder, run

yarn

to install modules, then run

yarn dev

If the api server is running ok, open another cmd window and going into frontend folder, run yarn to install modules, then run yarn dev. This will start the frontend server, you can see the page using following url:

http://localhost:3030

and the page is like this:

basic_layout

It is using websocket to live update the latest message, the performance is like this:

basic_layout

The app worked and tested on Mac system. I didn't test it on windows, because I don't have window pc.

Things needs to be improved

  1. Layout needs to be improved with better design.

  2. Have no time to write the Unit test. If have more time, will do it.

  3. more functions needs to be added to the message list like sort, pagination.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages