Giter Site home page Giter Site logo

prprabhu-ms / communication-services-web-chat-hero Goto Github PK

View Code? Open in Web Editor NEW

This project forked from azure-samples/communication-services-web-chat-hero

0.0 0.0 0.0 3.65 MB

Hero sample to showcase web chat capabilities for Azure Communication Services

License: MIT License

JavaScript 14.16% TypeScript 84.38% CSS 0.77% HTML 0.69%

communication-services-web-chat-hero's Introduction

page_type languages products
sample
javascript
nodejs
azure
azure-communication-services

Deploy to Azure

Group Chat Sample

Overview

This is a sample application to show how we can use the @azure/communication-react package to build a chat experience. Learn more about the Azure Communication Services UI Library. The client-side application is a React based user interface. Alongside this front-end is a NodeJS web application powered by ExpressJS that performs functionality like minting new user tokens for each chat participant.

Additional documentation for this sample can be found on Microsoft Docs.

Homepage

❤️ Feedback

We appreciate your feedback and energy helping us improve our services. Please let us know if you are satisfied with ACS through this survey.

Prerequisites

Code structure

  • ./Chat/src/app: Where the client code lives
  • ./Chat/src/app/App.tsx: Entry point into the chat sample
  • ./Chat/src/app/HomeScreen.tsx: The first screen in the chat sample
  • ./Chat/src/app/ConfigurationScreen.tsx: Where to set your name and avatar for the chat
  • ./Chat/src/app/ChatScreen.tsx: The main chat thread screen
  • ./Chat/src/app/EndScreen.tsx: The screen the user will see when they are no longer in the chat thread
  • ./Chat/src/app/ErrorScreen.tsx: The screen when an error occurs in the chat thread
  • ./Server: server code
  • ./Server/appsettings.json: Where to put your azure communication services connection string

Before running the sample for the first time

  1. Open an instance of PowerShell, Windows Terminal, Command Prompt or equivalent and navigate to the directory that you'd like to clone the sample to.
  2. git clone https://github.com/Azure-Samples/communication-services-web-chat-hero.git
  3. Get the Connection String from the Azure portal. For more information on connection strings, see Create an Azure Communication Resources
  4. Once you get the Connection String, Add the connection string to the Server/appsettings.json file found under the Chat folder. Input your connection string in the variable: ResourceConnectionString.
  5. Once you get the Endpoint, add the endpoint string to the Server/appsetting.json file. Input your connection string in the variable: EndpointUrl.
  6. Get the identity from the Azure portal. Click on Identities & User Access Tokens in Azure portal. Generate a user with Chat scope.
  7. Once you get the identity string, add the identity string to the Server/appsetting.json file. Input your identity string in the variable: AdminUserId. This is the server user to add new users to the chat thread.

Local run

  1. Set your connection string in Server/appsettings.json
  2. Set your endpoint URL string in Server/appsettings.json
  3. Set your adminUserId string in Server/appsettings.json
  4. npm run setup from the root directory
  5. npm run start from the root directory

Publish to Azure

  1. npm run setup
  2. npm run build
  3. npm run package
  4. Use the Azure extension and deploy the Chat/dist directory to your app service

Additional Reading

communication-services-web-chat-hero's People

Contributors

alex-kwan avatar alkwa-msft avatar anjulgarg avatar communication-ui-bot avatar dailam-msft avatar ddematheu2 avatar dependabot[bot] avatar dmceachernmsft avatar edwardlee-msft avatar jamesburnside avatar mgamis-msft avatar microsoft-github-operations[bot] avatar microsoftopensource avatar porternan avatar prprabhu-ms avatar ralphgabrinao avatar sgellock avatar timheuer avatar tophpalmer avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.