This is the repository for the Talent Catalog (TC), which manages data for refugees looking for skilled migration pathways into safe countries and employment.
This repository is a "mono-repo", meaning it contains multiple sub-modules all of which make up the Talent Catalog system. In particular, it contains:
- server: the backend module of the system providing secure API (REST) access to the data, stored in an SQL Database. This module is written in Java / Spring Boot.
- candidate-portal: the frontend module through which candidates (refugees seeking skilled
migration) are able to register and manage their details. This is written in Angular and connects
to the REST API endpoints under
/api/candidate
provided by the server. - admin-portal: the frontend module through which admin staff are able to view, manage and annotate
candidate details. This is written in Angular and connects to the REST API endpoints under
/api/admin
provided by the server. - public-portal: a module through which anyone can access publicly available data.
This is written in Angular and connects to the REST API endpoints under
/api/public
provided by the server.
Contributions are very welcome. Please see our contribution guidelines. They should be submitted as pull request.
IMPORTANT NOTE:
These instructions are tailored for Mac users using Intellij, as this is what we use for development.
On a Mac, installing with Homebrew usually works well. eg "brew install xxx".
It is also probably easier to install Java directly (or from your development IDE - see below) rather than using brew.
Download and install the latest of the following tools.
-
Homebrew - Homebrew website
-
IntelliJ IDEA - Intellij website
- Import standard settings and run configurations from another developer
- In development it is best to build using Intellij rather than gradle. Change the Intellij setting for "Build, Execution & Deployment" > "Build Tools" > "Gradle" to build with Intellij.
-
Java 21
-
Java 21 is required. One way (but you can choose whichever method you like) to manage Java versions is with sdkman. A .sdkmanrc file exists when you check out the repository. You can get sdkman by running the following:
curl -s "https://get.sdkman.io" | bash source "$HOME/.sdkman/bin/sdkman-init.sh" sdk install java 21.0.2-amzn
-
Intellij will load the JDK through the .sdkmanrc file.
-
Update the Project SDK:
- Go to File / Project Structure / Project and set the SDK to corretto-21
-
IntelliJ Settings:
- Go to IntelliJ / Settings / Build,Execution,Deployment / Compiler / Java Compiler
- Add
-parameters
to theAdditional command line parameters
textbox. - Set the
Project bytecode version
to 20.
- Add
- Go to IntelliJ / Settings / Build,Execution,Deployment / Build Tools / Gradle
- Set the GradleJVM from the drop list to use the Project SDK.
- Go to IntelliJ / Settings / Build,Execution,Deployment / Compiler / Java Compiler
-
-
Code Style
- Download the intellij-java-google-style.xml file from the google/styleguide repository here.
- Launch IntelliJ and go to the IntelliJ > Settings... menu and expand the Code Style sub-menu underneath Editor. Here, you will see a list of supported languages. Select Java.
- Next to the Scheme drop-down menu select the gear icon then Import Scheme > IntelliJ IDEA code style XML then select the intellij-java-google-style.xml file you downloaded from GitHub.
- Give the schema a name (or use the default GoogeStyle name from the import). Click OK or Apply for the settings to take effect.
-
Gradle https://gradle.org/install/
brew install gradle
-
- Note that developers should use the latest version of Node for which Intellij supports Angular debugging - currently that is Node 16 (which is not the latest Node with long term support LTS).
- See https://www.jetbrains.com/help/idea/angular.html and https://nodejs.org/en/about/releases/
brew install node@16
- Note the messages from brew at the end of the install. You will have to manually set up the path.
-
Angular CLI https://angular.io/cli
npm install -g @angular/cli@16
- Note that we cannot use the most recent version of Angular CLI because it requires a version of node greater than 16 (see note on node version above). See https://angular.io/guide/versions
- To upgrade Angular versions, see https://update.angular.io/
-
Docker
- Install Docker Desktop for Mac - see docker website
- Note for Mac Silicon users. The current Docker doc (link above) implies that installing Rosetta is optional. But if you don't do it you won't be able to install Docker. You need to execute softwareupdate --install-rosetta just to run Docker for the first time after installing it.
-
Elasticsearch (for text search)
- Install Docker image. See Elastic search website Just pull the image to install. See later for how to run.
docker pull docker.elastic.co/elasticsearch/elasticsearch:7.17.11
-
Kibana (for monitoring Elasticsearch)
- Install Docker image. See Elastic search website Just pull the image to install. See later for how to run.
docker pull docker.elastic.co/kibana/kibana:7.17.11
-
Git - see Git website - Not really necessary now with Intellij which will prompt you install Git if needed
-
PostgreSQL - Postgres website
- Homebrew - see https://wiki.postgresql.org/wiki/Homebrew
brew install postgresql@14
brew services restart postgresql@14
These tools do not need to be installed in order to get the code up and running on your development
machine. However, they are needed if you want to build the TC's AWS cloud infrastructure
from the Terraform definitions in the infra
folder.
- AWS CLI - see AWS CLI website
Once installed, needs to be configured. Log in to your AWS account, click on user top right, select Security Credentials, create access key, then download to CSV file. Then, theoretically this should work
aws configure import --csv path-to-downloaded-file.csv
...but it doesn't currently (it fails saying that it is missing a User Name header). Instead, just run this and manually copy/paste the values from the CSV file as prompted.
aws configure
- Terraform (for setting up our AWS infrastructure)
brew install terraform
Once installed, you can run Terraform from the directory containing your main Terraform
file (main.tf).
In order to populate "secret" configuration values that Terraform needs to set up as
environment variables for the TC software, you need to copy a special file terraform.tfvars
to that directory before running terraform. Contact support@talentcatalog.net for a copy of that
file.
Then you can run init
(only need to do this once), and then plan
or apply
, as needed.
terraform init
terraform plan
terraform apply
Use the psql tool.
< 8000 div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="psql postgres">psql postgres