NodeJS v16.15
or greater- Serverless v3
npm install -g serverless@3
- Yarn (preferably latest version)
npm i -g yarn
- Java Runtime Engine (JRE)
6.x
or greater (used byserverless-dynamodb-local
)
-
Install dependencies
yarn install
-
install the dynamodb-local instance
cd backend && serverless dynamodb install
-
Configure the
.env
variable underui/.env
andbackend/.env
(optional, by default is already pointed to the local serverless instance)ui/.env
REACT_APP_BACKEND_ENDPOINT="YOUR_SERVERLESS_API_ENDPOINT"
backend/.env
API_ENDPOINT="YOUR_SERVERLESS_API_ENDPOINT"
-
Go back to the repo directory (
cd ..
) and run the project- For Unix & Unix-like systems
yarn dev
- Windows - Open two terminal tabs and run the following commands on each session (in order to run in parallel):
yarn ui
yarn backend
- Frontend:
yarn test:ui
- Backend (requires that the backend is running/deployed):
yarn test:backend
stateDiagram-v2
state App {
direction LR
state Frontend {
React --> Redux_RTK
Redux_RTK --> ServerlessFunctions
ServerlessFunctions --> Redux_RTK
}
state Backend {
ServerlessFunctions --> DynamoDB
DynamoDB --> ServerlessFunctions
}
}