Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clientserver UI #1

Open
wants to merge 49 commits into
base: main
Choose a base branch
from
Open

Clientserver UI #1

wants to merge 49 commits into from

Conversation

JiayingWu-work
Copy link
Owner

we have an MVP now!

chia-lun and others added 30 commits November 17, 2022 16:14
- server setup in server.js
- client setup in js/main.js
- chat ui in public folder

how to run:
npm run dev
added:
- new UI join screen
- Server / Client folders for socket.io
- CSS for login
commented out chat.js
1. modified the encryption and decryption methods to make them compatible with our front end.
2. decryption method unfinished. 
3. called both methods in Chat.js file.
- In Encryption/index.js, improved encryption and decryption methods, added getCryptoKey() and arraybufferToString() methods
- In Chat.js, do encryption in sendMessage()
- in Join.js, generate encryption key and put it in url after a hash
- In Message.js, added test code
- in Chat.js: this is where encryption takes place. We pass the array that contains buffer array and iv to Message.js
- in Join.js: use & rather than # for now
- in Message.js: where decryption takes place. We convert the string of buffer array and iv from Chat.js to array buffer (for the encrypted message) and Uint8Array (for iv). Note that there are two cases: (1) when message is sent from server and (2) when message is sent from another client
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants