Skip to content

Simple. Secure. Reliable messaging. With Message Hub, you'll get fast, simple, secure messaging for free*, available on the web all over the world. Data charges may apply. Contact your provider for details.

Notifications You must be signed in to change notification settings

Nktech-Official/message

Repository files navigation

Message Hub

Simple. Secure. Reliable messaging. With Message Hub, you'll get fast, simple, secure messaging for free*, available on the web all over the world. Data charges may apply. Contact your provider for details.

Database

firebase's Realtime Database is used to store your encrypted messages. This allows client's to communicate with each other in RealTime. Firebase Cloud Storage is used to store profile pictures of your.

Authentication

Firebase Authentication is used to identify user's so in this way your email is shared with firebase aka google for registration purpose. *plannig to add more way to authenticate.

End-to-End Encryption

Thanks to Seald-Io-SDK end-to-end encryption is possible for this chat app. chat's are encrypted with Seald-Io-SDK by creating a your identity on Seald-Io-SDK allowing the app and sdk to identify who send the messages and make sure only the intendent resiptent be able to decrypt it and no one else not even the admin of the seald sdk or firebase database because only encrypted message is sent from frontend to backend and this encrypted message get stores in the database. So your private messages remain private.

Technology used

Firebase

  1. Database
  2. Sotrage
  3. Authentication

React Js- Frontend

The Web app is powered by React Js frontend Library. various library are used along with React Js. react routers are used to make single page application and hassel free and smooth page load. consuming less data

Chakra-ui

Chakra-Ui is used as css framework along with react js . In short Chkra-ui is component based css framework for ReactJs.

Axios

Axios used to make api request with backend .

firebase-client

Firebase client library is used to acces firebase database,storage and authentication.

Seald-Io-SDK

Seald-Io-SDK @seald-io/sdk-web Library is used for the end-to-end encryption of the private messages and @seald-io/sdk-plugin-ssks-password is used to protect and store identity of user on SSKS-Server the identity on the server is protected by password used to login, the password is hashed so there is no leaking of password either.

NodeJs - Backend

The server is powered by NODEJS to use javascript on the backend .

Express

epxress is used to make server for api request .

Firebase-admin

firebase admin sdk is used for verifying and writing to database .

Identity On Device

your Identity is stored in the database in your browser's IndexDbor most suitable database depending on your browser, Database is protected by a databaseKey generated by the server and send to the client each time you login or signup so only the app can access your identity to decrypt the messages for you. Database Path includes your sessionId so it's unique to each session. Storing Identity on Your Browser allow you to remain login to the app and the Seald-SDK.

Environment Setup

  1. first fork this repo and then clone it on your local machine run yarn install or npm install (use any one) in the root folder and in the /message-frontend
  2. First register a app on firebase copy the code key
  3. create a ./message-frontend/.env file and set environment variable. REACT_APP_apiKey, REACT_APP_authDomain, REACT_APP_databaseURL, REACT_APP_projectId, REACT_APP_storageBucket, REACT_APP_messagingSenderId, REACT_APP_appId
  4. assing the copied value to the variables for ex assign value copied from apiKey to REACT_APP_apiKey
  5. create a firebase service account and download the generated the json file.
  6. create .env file in the root of the project and add these variables project_id, private_key_id , client_email, ,client_id , auth_uri, token_uri, storageBucket, auth_provider_x509_cert_url, client_x509_cert_url , private_key you will find value of this variable in the downloaded json file just assign the value respectively. for storageBucket use the value of REACT_APP_storageBucket.
  7. create a seald-Io account .
  8. Add this env variable to the .env file in the root :- seald_appId, seald_validationKeyId, seald_validationKey,
  9. you will get vaule for this variable after creating the seald-io accoutn just copy and paste the values Respectively
  10. create on last variable named serverSession_secret and assign any random string to it. Recommendation use crypto.randomBytes to genrate a random string or use your own does not matter
  11. change directory to message-frontend using command cd ./message-frontend and run command yarn build after build complete go back to parent directory using command cd ..
  12. Use command yarn start to start the server.
  13. open locahost:8081 in your browser and now your can see the websie running in your browser.

use this for developing your own chat app project with new and cool fetures or you can contribute to this project and help me growing and developing this project.

Note :- you can set value to env variables like this env_var_name=value for eg :- serverSession_secret=myServerSessionSecret

About

Simple. Secure. Reliable messaging. With Message Hub, you'll get fast, simple, secure messaging for free*, available on the web all over the world. Data charges may apply. Contact your provider for details.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages