Skip to content

CDH-Studio/I-Talent

Repository files navigation

I-Talent Logo

An improved directory and employee search tool.

👋 Introduction

I-Talent is an internal web-application that would enable employees to share information about their employment status, job position, skills, and credentials. ISED employees can login to I-Talent with their windows credentials, where they can create a profile or search for employees with the right expertise, education, competencies, experience and other essential qualifications at any time for talent management, staffing, succession planning, or simply for insight on a project or file.

Helpful links

Access the live testing environments

DEV Deployment UAT Deployment

Drupal DEV Drupal UAT

Testing and Building Services

SonarQube Frontend SonarQube Backend Jenkins

Hosting servers/services

OpenShift-DEV OpenShift-UAT

📌 Table of Content

⭐Getting started

Background

Docker

The project has been set up with Docker and Docker-Compose to simplify onboarding and standardize the development environment. Before getting started with this project, we strongly recommend you become comfortable with the basics of Docker.

Useful links:

Git

We use Git and GitHub to version control the project. Once again, we strongly recommend you become comfortable with these technologies before contributing to this project. You will also need a GitHub account prior to contributing.

Useful links:

Step 1: Install VS Code

We strongly recommend installing VS Code for development. It provides seamless integration for docker and other tools that we can take advantage of for this project.

Please also install all of the following VS Code extentions:

NOTE: If you are setting up I-Talent outside of Docker, skip Steps 2-4 and scroll down to the Non-Docker Setup section.

Step 2: Install Docker

Docker helps standardize the development environment independent of the developer's OS. This gives us the flexibility to support Windows, Mac, and Linux. As we advance, we will highlight the steps to set up the project for windows and Mac but the steps should be similar for Linux.

Install Docker on Windows

Docker now recommends using WSL2 instead of the traditional Hyper-V VM on Windows machines. This make the setup slightly different from docker on Mac, but it provides significant performance improvements over Hyper-V.

  1. Before installing Docker, make sure you enable WSL for windows by using the following Microsoft Dcoumentation *we recommend ubuntu 20.04 LTS as the linux distro for WSL*

  2. Install Docker Desktop for Windows

  3. Configure Docker Desktop to use the WSL2 engine and set the default Distro to ubuntu 20.04 LTS using the following guide.

  4. Don't try to open the project yet. there are a few more steps to go!

Install Docker on Mac

Download and install Docker Desktop for Mac

Step 3: Install/Launch the App On Docker

Because of the WSL2 configuration that we just did for Windows, the steps to get the project running is also slightly different for Windows vs. Mac.

Run on Windows

Open the Ubuntu distro that you just installed in Windows by searching for it by name in the start menu. This will open a terminal window connected to the Ubuntu instance.

  1. On the first bootup of the Ubuntu instance, it asks for a username and password. You can set these to whatever you would like. It will not affect the project. Just make sure you remember the password.
  2. Use the command git clone to download the project in the home directory
  3. Now cd into the project directory that was just downloaded
  4. run the command code .
  5. You should see an instance of VS code open. This instance of VS code is running in Windows but it is connected to the project directory inside the Linux instant. *Magic of WSL*
  6. Please keep in mind that you may need to reinstall the VS Code extensions that we installed in the first stage in this "WSL enabled" instance of VS Code. Sometime these extension will get auto disabled in "WSL enabled" instance for security reasons.
  7. At this stage you will need to create three files to define the environment variables, one at the root of the project and two in the env folder. To get those variables, ask the current developers.
  8. Right-click on thr docker-compose.yaml file in the project directory and hit compose up from the menu. If you do not see this option, make sure the docker VS code extension is installed.
  9. Wait a few minutes and the app should show up at localhost:3000

Run on Mac

Running the app on Mac is less involved and can be done with a few easy steps

  1. Use the command git clone to download the project in the home directory
  2. Now cd into the project directory that was just downloaded
  3. run the command code .
  4. At this stage you will need to create three files to define the environment variables, one at the root of the project and two in the env folder. To get those variables, ask the current developers.
  5. Right-click on thr docker-compose.yaml file in the project directory and hit compose up from the menu. If you do not see this option, make sure the docker VS code extension is installed.
  6. Wait a few minutes and the app should show up at localhost:3000

Step 4: Try out the different services of the app

You can now access different components of the web application:

Note: Internet connection is required to run the application unless you setup keycloak locally with the steps described in the wiki

Visit backend README and the frontend README for more information.

⚙️ Advanced

Project Building Blocks

I-Talent Architecture

Local Keycloak setup

Keycloak is the SSO service that the app utilizes to authenticate users. Therefore, an Internet connection is required to run the application unless you setup keycloak locally with the steps described here:

  1. Add the following keycloak service under services: in the docker-compose.yml file:
keycloak:
  container_name: "italent-keycloak"
  image: "jboss/keycloak"
  ports:
    - 8180:8180
  volumes:
    - ./keycloak:/opt/jboss/keycloak/keycloak
  hostname: keycloak
  command:
    - "-Dkeycloak.import=/opt/jboss/keycloak/keycloak/realm-export.json -Djboss.http.port=8180"
  environment:
    DB_VENDOR: postgres
    DB_ADDR: postgres
    DB_PORT: 5432
    DB_DATABASE: testdb
    DB_SCHEMA: public
    DB_USER: api
    DB_PASSWORD: api
    KEYCLOAK_USER: administrator
    KEYCLOAK_PASSWORD: password
  1. Obtain your ip address. You can view it by running ipconfig in your command prompt (windows).
  2. Update the REACT_APP_KEYCLOAK_SERVER_URL variable in your web.env file and the KEYCLOAK_AUTH_SERVER_URL variable in your backend.env file to http://[YOUR IP ADDRESS]:8180/auth

The credentials for the users when using the local keycloak are specified in the realm-export.json file

Non-Docker Setup

Step 1

Enable WSL 1 for Windows by using the following Microsoft Dcoumentation *we recommend ubuntu 20.04 LTS as the linux distro for WSL*

Step 2

Step 3

  • Download PostgreSQL: https://www.postgresql.org/download/
  • Open pgAdmin, a management tool for PostgreSQL that should have been downloaded with PostgreSQL. If it was not, download pgAdmin from here: https://www.pgadmin.org/download/
  • Under the default PostgreSQL server, create a new database named testdb
  • Under Login/Group Roles for the default server, create a new user named api
    • When creating the user, in the Definition section, set the user's password to api
    • In the Privileges section, select Can login? and Superuser?
  • Click on the testdb database you created, go over to the Properties section, click the edit button, and set the owner of the database to the new api user.

Step 4

Open Command Prompt or Powershell and use the command git clone to download the project.

Step 5

Create three .env files, one in each of the following directories:

  • I-Talent
  • I-Talent\services\backend
  • I-Talent\services\frontend

Talk to an active I-Talent developer to obtain the enviroment variables for each file.

Step 6

Open Command Prompt or Powershell, cd into the I-Talent\services\backend directory, and run the following commands:

yarn install
npm i -g [email protected]
prisma generate
prisma migrate dev
yarn -s seed
yarn -s dev

Step 7

Open Command Prompt or Powershell, cd into the I-Talent\services\frontend directory, and run the following commands:

yarn install
yarn dev

Contribution

We encourage contributions to the project! We are a friendly team and are always looking for things to improve on. We just as that you follow our contribution guidelines to help us keep things well documented and organized.

Contributors

Our full stack developers

Active developers Previous developers
Paul Barasa Ali Nouri
Rizvi Rab Benoît Jeaurond
Mohamed Radwan
Kate Thornley
Mamadou Bah
Sagal Maxamud
Sukhsimranpreet Sekhon
Trevor Bivi

Contact

This application is developed by students at CDH Studio