BentoChat - a platform for group organisation
-
Upload
lorenzo-paoliani -
Category
Technology
-
view
65 -
download
0
Transcript of BentoChat - a platform for group organisation
Local deploymentMac OS X
Docker
RethinkDBio.js
BentoAPI
Grunt
Bento front-end App
expressJS
nodemonWebpack
Front-end Back-end
POST /login Create and sign tokenStore token in
localStorage
GET /chat Verify JWTFetch data
Load Authenticated View
Render ChatList
Front-end Back-end
Establish socket.io handshake
Send JWT through socket
Send new messages through
authenticated socket
Verify JWT
Create authenticated
socket
Establish socket.io handshake
User authenticates with email and password POST /login
Static server
API server
React App
Database
1 Browser requests page 2 Sends index.html and minified JS files
3 React App loads root view
4
7 Save JWT in localStorage. React loads authenticated section of app
5 Hash password and check if OK
6 If OK, respond with signed JWT containing user information
8 Chat component mounts and initiates action to fetch the data it needs
9 Verify JWT signature
1 0 Retrieve all messages for group
1 1 Chat component renders messages
1 2User sends a message.
Chat component initiates sendMessage action.
1 6 Socket receives new_message event and dispatches the update
1 3Authenticated socket receives the message
1 4 Save new message
1 5 Message is pushed to all connected users
Socket.io HTTP Local
Designing user interfaces is really hard
It would be beneficial to invest some time upfront building mockups before implementing the UI
Technological Investment
Find the right balance between writing higher-level code and not
drowning in tutorials
Technological Investment
Find the right balance between writing higher-level code and not
drowning in tutorials
“ Hofstadter's Law: It always takes longer than you expect, even when you take into
account Hofstadter's Law.
”