Simple Messenger is a self-hosted tool for communication with your friends :D
- Install dependencies
npm install
-
Create a Firebase Project (https://firebase.google.com)
-
Create an Auth Method at
Authentication > Sign-in method > Email/Password -
Enable first option and
e-mail linktoo. -
Create a Realtime Database Project
-
Setup environment variables
- Copy and rename
.env.exampleto.env.local - Replace
.env.localcontent with your configuration
REACT_APP_API_KEY=your-web-api-key
REACT_APP_AUTH_DOMAIN=your-app.firebaseapp.com
REACT_APP_DATABASE_URL=https://your-app.firebaseio.com
REACT_APP_PROJECT_ID=your-app
REACT_APP_MESSEAGING_SENDER_ID=your-sender-id
REACT_APP_WEB_PUSH_CERTIFICATES=your-web-push-certificates
REACT_APP_APP_ID=-your-app-id
To discovery your key, at Firebase console go to Settings > Project Settings.
-
Change your sender id in
firebase-messaging-sw.jsandmanifest.json. -
Change your Database rule at
Database > rulesto:
{
"rules": {
".read": true,
".write": true
}
}
CAUTION! THIS WILL OPEN YOUR DATABASE! KEEP YOUR KEY SAFE!
Visit https://firebase.google.com/docs/database/security to learn more about security rules.
- Run the project
npm start
-
In the client application (http://localhost:3000) create a user with your e-mail
-
Go to
adminand install dependencies
cd admin
npm install
-
In
/admin/set-user-admin.jsline 11 set your e-mail. -
Download your credentials at Firebase console
Settings > Service accounts- or click here. -
Change this file for
simple-messenger-oss-firebase-adminsdk.json. NEVER COMMIT YOUR CREDENTIAL JSON! -
Run
node set-user-admin.js;
Okay, your user now is admin and can see a list of contacts.
- Go to
functionsand install dependencies
cd functions
npm install
- Deploy functions by running
npm run deploy
And you all set to go, notifications will be sent if browser is in background and messages exchange from user and admin.
Help us to build this:

