React/Redux-powered UI to front Serverless API. This project utilises TypeScript for type checking and transpliation to browser-friendly ES5 JavaScript. Auth0 handles authentication. Users must sign up/login to generate an auth token and gain access to the secured area. All endpoints in the API check validity of the auth token and return unauthorised if invalid, the UI then prompts the user to log in again. The API also determines the identity of the user via the auth token.
- React
- Redux
- Redux-saga
- Auth0 Lock
- React Router
- Reselect
- Rebass & Reflexbox
- React Loadable
- Webpack
- TypeScript
- Node.js
--
AUTH0_CLIENT_ID, AUTH0_DOMAIN and API_BASE_URI environment variable must be set before yarn run
commands below.
E.g. AUTH0_CLIENT_ID=YOUR_CLIENT_ID AUTH0_DOMAIN=YOUR_DOMAIN API_BASE_URI="https://serverless-web-api.amazon.com" yarn run dev
- Run the following commands in the app's root directory then open http://localhost:3001
yarn install
yarn run dev
- Run the following commands in the app's root directory then submit requests to http://localhost:3001.
docker build -t sls-api .
docker run -p 3001:3001 -e AUTH0_CLIENT_ID=YOUR_CLIENT_ID -e AUTH0_DOMAIN=YOUR_DOMAIN -e API_BASE_URI=YOUR_API sls-api
- Run the following commands in the app's root directory then check the /dist folder
yarn install
yarn run build
- Run the following commands in the app's root directory then open http://localhost:3001
yarn install
yarn run prod
Refer to the /infrastructure directory.