Overview
How Ghosty works - technical details
Ghosty app is built using socket.io for real-time communication between wallet-to-wallet.

Socket.IO is an event-driven library for real-time web applications. It enables real-time, bi-directional communication between web clients and servers.
Ghosty App Flow:
- 1.The user will be directed to the NEAR wallet for the login authentication process --> At this stage Ghosty will store address data in the form of the accountId property into MongoDB which is obtained from the NEAR login authentication process.
- 2.When successfully logged in, the user will be immediately directed to the chat page --> The chat page in question is the CHAT ROOM INTERFACE
- 3.User adds the user address in the Add Address modal --> In this process the user will search for the NEAR user address by calling nodeUrl with the following property:
jsonrpc: '2.0', id: 'dontcare', method: 'query', params: { request_type: 'view_account', finality: 'final', account_id: <wallet_address>, }
if the value sent is the same and the user adds it, the accountId will be post to databasealias: <accountId>
- 4.In this process the user can send a message in the form of text, images, and also emojis that have been provided by Ghosty. --> All these processes are done with the help of socket.io for real-time wallet-to-wallet communication.
Login with NEAR Wallet Add wallet addres Let's Talk!👻
Last modified 6mo ago