project Settings
this steps for production and local installation
- after download, you will have
source.zipunzip this file you will getv_chat_sdk_backendfolder - which contain typescript files
.env file
IS_USER_ONE_SIGNAL_AND_NO_FIREBASEI have made this chose because firebase forbidden from some country I recommend to userfirebasecurrentonesignalnot supported- if =
truethen you must create account on one signal and provideONESIGNAL_AUTHORIZATIONvalue to start use intestinal instead of firebase iftruethen the app will user firebase to pushnotifications ACCESS_TOKEN_SECRETEupdate this value with strong password and don't change it ever will course all users logout if you change it in productionMONGODB_URLmongo db url if you will run it locally then doesn't change itENABLE_MIGRATE_OLD_USERSif your app already in production then update this value to true to enable migrate api to worksENABLE_MIGRATE_OLD_USERSafter finish with migrate old users you must update this value too false to disable the add users apiMAX_CHAT_FILES_SIZEset limit to chat share files and videosPASSWORD_HASH_KEYset storage password has key make sure it same key with flutter side other users can register only and cant login it will say invalid credentialsMAX_GROUP_USERS_COUNTset limit to max group countMACHIN_PUBLIC_URLyour server public key (required only for show big image notification in android)
don't update the .env
ACCESS_TOKEN_SECRETEorPASSWORD_HASH_KEYeverPASSWORD_HASH_KEYmust be same with flutter side other login will fail !!!
update default users image
- open
v_chat_sdk_backend/public/profile/default_user_image.png - update
default_user_image.pngmake sure this image smaller than300KBand with the same name asdefault_user_image.png
Firebase Admin sdk
- the firebase project must be the same as flutter side
- if you set
IS_USER_ONE_SIGNAL_AND_NO_FIREBASE=falsethen you must provide yourfirebase-adminsdk.jsonfile - first open firebase console create or open existing firebase account
- and navigate to
project settingthenservice accountsthen generate new private key selectNode.js - after download
firebase-adminsdk.jsonupdate this file by your firebase generated file but rename it tofirebase-adminsdk.json
One Single setup (coming soon)
- if you set
IS_USER_ONE_SIGNAL_AND_NO_FIREBASE=truethen you must provide yourONESIGNAL_AUTHORIZATION - create or open new account on onesignal app
- add new android and ios apps add your firebase sender id and token
- then open dashboard/settings/Keys&IDs copy Rest API Key
- paste it in
ONESIGNAL_AUTHORIZATIONdon't deleteBasicjust update"Basic M2Ey--------------------BlNWY5"M2Ey--------------------BlNWY5 and leave the space between theBasicand your rest api key
other
- don't update any package on
package.jsonlet me update and test then push to you