NAME | GITHUB NAME | DUTY | |
---|---|---|---|
Ruoyang Xiong | KalmanXiong | xiongruoyang@ufl.edu | Front-End |
Yandi Ma | DandyAkira | yandi.ma@ufl.edu | Back-End |
Zixuan Feng | ErerF | zixuan.feng@ufl.edu | Front-End |
Jiaqi Cheng | TR280 | jiaqicheng@ufl.edu | Back-End |
In the project, we designed a project named GatorChat.By using the Web-App, users can add friends by email, and send messages, emojis, and images to their friends. Besides, they can build groups or join groups by id. People in the same group can chat with others.
We implemented the backend by using Golang, and implement the frontend by using NodeJS. We used Cypress and Jtest to test our frontend code.
CREATE DATABASE gatorchat
run the app by typing
go run main.go
open a browser and jump to http://127.0.0.1 then have fun :)
go run main.go
yarn run cypress open
yarn add --dev jest
yarn test
https://easydoc.net/s/88012132
https://github.com/DandyAkira/CEN5035_Project/projects
https://github.com/DandyAkira/CEN5035_Project
the first 2 users are chosen to send add friend request to himself, all other users, and users who already is their friend.
each of these 2 users should receive several response from server:
{"code":0,"msg":"Add Friend Success"}
{"code":-1,"msg":"you can not add yourself as a friend"}
{"code":-1,"msg":"this user is already your friend"}
and the server's terminal will show serveral info like:
Receive Add Friend Requset from: userid to dstid
The test results showed no errors.
CREATE DATABASE gatorchat
run the app by typing
go run main.go
open a browser and jump to http://127.0.0.1 then have fun :)
The test file will send 3 requests to change the nickname on behalf of each user in the database, They will request their nickname be changed to NULL, the same name to original one, and a different name, respectively. They each receive three responses from the server, where code = 0 means success and code = -1 means fail:
The results are as follows, there is no fault during the tests:
The test file will send 7 requests to to create new groups on behalf of each user in the database, since the backend logic limits the number of groups that each user can create to 5, so after there are 5 groups created by the same user, he can not create groups anymore, for each user they will receive responses from server as follows:
The results of testing create group cases of one user is as follows, no fault happens:
Now users' default icon is a gator icon, users can also change their icon by using the images under /assets/images, and can be normally and correctly shown on other clients' sides. Fully customed avatar still can not be correctly displayed on other clients.
Users' password will not be directly saved in database, it will be mixed with a random salt string and will be MD5 encrypted. The salt string will change everytime the user login, so the encrypted password saved in the database will keep changing.