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.
- Download the code from main branch
- create a new database called "gatorchat" in MySQL by using
CREATE DATABASE gatorchat
- open database/db.go and modify the configuration statements (name and password) according to your own MySQL settings
- run the app by typing
go run main.go
- open a browser and jump to http://127.0.0.1 then have fun :)
sprint4-demo.mp4
- run Gatorchat
go run main.go
- execute the following command to open Cypress
yarn run cypress open
- click on the test file (test.js) to start the test
Sprint4-Cypress.mp4
yarn add --dev jest
yarn test
unit-test.mp4
https://easydoc.net/s/88012132
https://github.com/DandyAkira/CEN5035_Project/projects
https://github.com/DandyAkira/CEN5035_Project
- The logic for background parsing of parameters in request messages has been optimized [see model/request/ and utils/parsearg.go]
- Add test cases for adding friends
- Background HTTP request packet format optimization
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.
- Register
- Login
- Private Chat
- Group Chat
-
Public Chat(Deleted) - Friend System
- Send Emoji
- Send Picture
- Change Nick Name
- Change Avatar
- Send Video
- Voice Chat
- Download the code from main branch
- create a new database called "gatorchat" in MySQL by using
CREATE DATABASE gatorchat
- open database/db.go and modify the configuration statements (name and password) according to your own MySQL settings
- run the app by typing
go run main.go
- open a browser and jump to http://127.0.0.1 then have fun :)
- Add Test Cases of "Change Nickname" and "Create New Group"
- Optimized some background logic
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:
- "code":-1,"msg":"new name same to current one"
- "code":-1,"msg":"illegal nickname"
- "code":0,"msg":"Change Name Sucess"
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:
- {"code":0,"msg":"New Group Success","data":{"id":1,"name":"group_sEdQ","ownerid":1,"icon":"/asset/images/community.png","cate":0,"memo":"","createat":"2022-03-30T17:00:00.3993923-04:00"}}
- {"code":-1,"msg":"you already created too many groups"}
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 can change their nickname in profile page
- Password encryption implemented
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.
- Add Friend via email (no need to know friend's ID)
- Increase jump correlation between pages