Setting up the project
Using Starters
We have a few starters available for you quickly up and running. You can use them
to skip all the configurations required in this page.
Select a starter.
Or you can start from scratch using the following steps.
Prerequisites
- Make sure that you have configured aws cli in your system.
- Have node installed, preferably >=16.10.
Enabling yarn
note
If you already have a project in place, you can skip this step.
Let's start a create react app
based app with yarn.
If you don't have yarn installed just
corepack enable
and then try
yarn -v
to check. if you get that corepack
is not installed, then you can install it with
npm i -g corepack
Creating the project
Once you have yarn installed, you can create a new project with
yarn create react-app my-ccp-app --template typescript
note
We use typescript because we love typescript. But you can use JavaScript as well.
This unfortunately will install your project with yarn 1. So we'll have to move to yarn 2.
Shifting to yarn 2 and enabling access to Neev packages
Install the required dependencies
We are going to use the Material UI components with react hooks here
yarn add @neev/ccp-api @neev/ccp-react @neev/logger @emotion/react @emotion/styled @mui/icons-material @mui/material @mui/system @mui/lab amazon-connect-chatjs amazon-connect-streams amazon-connect-taskjs
Here the packages installed are:
Neev packages
@neev/ccp-api
: Basic react independent classes and functions@neev/ccp-react
: React hooks@neev/logger
: A shared logger, let's you control the logging level of the Neev packages
Material UI packages
As required by the Material UI components.
@emotion/react
@emotion/styled
@mui/icons-material
@mui/material
@mui/system
@mui/lab
Amazon Connect packages
As required by Amazon connect.
amazon-connect-streams
amazon-connect-chatjs
amazon-connect-taskjs
caution
If you do not include chatjs or taskjs packages, then if the ccp receives them, it will crash.