Read the full tutorial here: >> How to Build Angular Chat Application
This demo uses:
- CometChat Pro
- CometChat UI Kit
- Firebase
- Angular
- Uuid
- Validator
- @ctrl/ngx-emoji-mart
To run the demo follow these steps:
- Head to CometChat Pro and create an account
- From the dashboard, add a new app called "angular-chat-app"
- Select this newly added app from the list.
- From the Quick Start copy the APP_ID, APP_REGION and AUTH_KEY. These will be used later.
- Also copy the REST_API_KEY from the API & Auth Key tab.
- Navigate to the Users tab, and delete all the default users and groups leaving it clean (very important).
- Download the repository here or by running
git clone https://github.com/hieptlccc/angular-chat-app.git
and open it in a code editor. - Head to Firebase and create a new project
- Import and inject your secret keys in the src/environments/environment.ts.ts file containing your CometChat and Firebase in this manner.
export const environment = {
production: false,
firebaseApiKey: "xxx - xxx - xxx - xxx - xxx - xxx - xxx - xxx",
firebaseAuthDomain: "xxx - xxx - xxx - xxx - xxx - xxx - xxx - xxx",
firebaseDatabaseUrl: "xxx - xxx - xxx - xxx - xxx - xxx - xxx - xxx",
firebaseStorageBucket: "xxx - xxx - xxx - xxx - xxx - xxx - xxx - xxx",
firebaseProjectId: "xxx - xxx - xxx - xxx - xxx - xxx - xxx - xxx",
firebaseMessageSenderId: "xxx - xxx - xxx - xxx - xxx - xxx - xxx - xxx",
firebaseAppId: "xxx - xxx - xxx - xxx - xxx - xxx - xxx - xxx",
cometChatAppId: "xxx - xxx - xxx - xxx - xxx - xxx - xxx - xxx",
cometChatRegion: "xxx - xxx - xxx - xxx - xxx - xxx - xxx - xxx",
cometChatAuthKey: "xxx - xxx - xxx - xxx - xxx - xxx - xxx - xxx",
cometChatApiKey: "xxx - xxx - xxx - xxx - xxx - xxx - xxx - xxx",
};
- Make sure to exclude .env in your gitIgnore file from being exposed online.
- Run the following command to install the app.
npm install
ng serve
Questions about running the demo? Open an issue. We're here to help โ๏ธ
- ๐ CometChat Homepage
- ๐ Create your free account
- ๐ Documentation
- ๐พ GitHub
- ๐ฅ Firebase
- ๐ท Angular