This is an internal project for Knowit Objectnet. The project aims to create a tool to gauge the employees' skills and motivations through a web form, and to make the analyses based on the form available for the individual employees and managers.
Documentation for the external API can be found at this projects Github Pages.
This project requires npm and the Amplify CLI.
Currently, the latest version of the project lies within the dev
branch. To run the project locally:
- Clone the GitHub repo.
- Run
$ cd kompetansekartlegging-gui(or whatever you've chosen to name the project in the cloning process). - Run
$ amplify init, and choose an existing environment---by default, the name of an environment will match the name of a branch, so for thedevbranch the environment name will bedev. - Run
$ amplify pullto make sure that you have the most recent cloud configuration locally. - Run
$ npm install - Run
npm start.
NOTE: There seems to be a bug with Amplify auth that makes it impossible to log in using Google locally, because the URL redirects to another URL. Amplify allows to specify multiple redirect URLs, but it appears that it doesn't work as intended.
Contributing to this project is a little more involved since we're using Amplify.
There are two different ways to contribute to an Amplify project,
either by sharing
environments or by using
sandbox
environments. For
contributing to the master and dev branches, sandbox environments
should be utilized.
- Open the AWS IAM Console.
- Go to Users
- Click "Add user"
- Choose user name, and check AWS Management Console access
- Click Next
- Select "Copy permissions from existing user" and select a user with correct policies (such as yourself)
- Click next until the user is created.
NOTE: Creating a sandbox environment should only be done if necessary as the steps necessary are somewhat complicated.
amplify init- Use existing environment: No
- AWS profile: Yes
- Google Web Client ID and secret: Get from team-provider-info.json
dev > categories > auth > kompetansekartlegging > hostedUIProviderCreds
amplify push- Update Environment table ID:
- Go to tables in DynamoDB
- Find a table from your newly created env. Tables are named: TableType-generatedid-envname, and open this table.
- Authorize redirect URL:
- Open Google Developer Console
- Open Project "Kompetansekartlegging". If this cannot be found, access must be granted by asking drift.
- Open Credentials > OAuth 2.0 Client IDs > Cognito
- Add URI: copy one of the existing URI, and change the environment name to yours.
- Save
- To make enviroment accessible by others:
git secret hide && git push
To update an Amplify category, i.e. auth, run the command $ amplify update category.
Questions related to Amplify not covered by this document can be
directed to bjorn.iversen@knowit.no.