tempus-app / tempus

Resource Onboarding & Management Application built for CAL & Associates
https://cal-tempus.azurewebsites.net/signin
MIT License
4 stars 0 forks source link
angular docker nestjs nx typescript

workflow

Tempus

Table Of Contents

🎯 Motivation & Project Description

Tempus is an application built for CAL & Associates, an enterprise resource management company, that scouts and hires resources to fulfil their clients (banks etc.) needs. Before Tempus, CAL undertook the manual work of reviewing the resources, building standardized resumes, and handling the onboarding process and project assignment for their resources, losing time.

Tempus aims to smoothen this process by allowing resources to build profiles within the application, and for CAL to invite, manage, review and assign a resource to CAL's Client projects.

Tempus II is a timesheet tracking web application. Resources can submit and track their hours, and projects that require supervisor approval can be tracked as well. Supervisors and Client Representatives must approve timesheets.

🎯 Tempus II Objectives

⚙️ Core Features

🌗 Phase 1 (Jan-April 2022)

🌕 Phase 2 (September-April 2022)

🌗 Phase 3 (Jan-April 2023)

🌕 Phase 4 (September-December 2023)

❤️ Contributors

This project was built by:

🛣️ Project Management

Tempus

The Project Management for this application is documented in the tempus wiki

Sprint Planning was done through github projects

Tempus II

The Project Management for this application is documented in the Tempus II wiki

Sprint Planning was done through Jira

The project initial overview can be found here Tempus II wiki

🎨 UI/UX Design

The Design System, along with the mockups built using figma can be viewed on the wiki

🧠 Technical Details

🔨 Tech Stack Overview

PostgreSQL

PostgreSQL was used as the database, as the data we were dealing with was structured, and there were many relationships between the entities. Learn more about PostgreSQL.

NestJs (TypeScript)

NestJs was used to build the backend API, as it provided many MVC capabilites, and had out of the box support for testing, database integration, and allowed consistency with the frontend through the use of TypeScript. Learn more about NestJs.

Angular

Angular is used for the frontend application, as it has out of the box support for the features we use such as routing, form control. Learn more about Angular.

NX

NX was used to build our monorepo project, as it helps generate libraries, components for both the backend and frontend of our application. Learn more about Nx.

Docker

Docker is used to containerize the application so it is easier to run and deploy. Learn more about Docker.

📁 File Structure

An in-depth guide to understanding Tempus vile strucutre is located here.

📝 Contributing

Contributions to the backend and the frontend can be found in their own respective sections with the docs/ directory. Please follow the following guide.

💼 Database

Information about the tempus database, and datastore can be found here.

🔧 Backend

Information about the tempus backend,its functionalities, architecutre, and how to contribute can be found here.

🖌️ Frontend

Information about the tempus client,its functionalities, how to contribute, can be found here.

✨ Misc

Misc information about the tempus repo, and contribution can be found here.

🎬 Testing

Currently, only backend unit tests are implemented in main. More indepth discussion about the testing strategy can be found in the backend, and frontend (TODO) directories. Use the following commands to run tests:

🧰 Installation + Running

Docker can be used to install and run the application. While docker does heavily smoothen set up, however, it does take longer to build, load and will consume more of your CPU power.

The first steps are general to both docker & non-docker set up.

  1. Set up .env file in the root directory, following the env.example file. Any value that is filled in the example file can be copied into the env variable as well for development purposes.

  2. To set up the test email server, head over to ethereal.com, and create an account. After the account is filled, you can fill in the following env variables. To test if the emails have gone through properly, login to Etheral and check the messages tab.

    EMAIL_USERNAME=<username>
    EMAIL_PASSWORD=<password>
    EMAIL_ADDRESS=<username>
  3. To set up the resume parser (which is currently under refactor):

    • Clone the resume-parser repo and follow the instructions listed in the README of the repo.
    • Run the application by entering in python main.py in the pipenv shell
    • The resume's uploaded will now be parsed through this endpoint

Docker Set Up

  1. To run using docker, you must first install docker, following the instructions here

  2. Additionally, if running through only docker, set the .env files as follows: DB_HOST=postgres DB_PORT=5432 DB_USERNAME=postgres DB_PASSWORD=<password> DB_NAME=postgres If you want to support both docker & local development, it is recommended to set these variables directly in the docker-compose.yml file.

  3. After docker is successfully installed, you should be able to use the following commands to run/stop the containers

    • docker-compose up: starts up docker container for the onboarding api (our backend app), onboarding client (our frontend), postgres database (image) and adminer (image)
      • After the containers come up, visit http://localhost:4200 to see the application running
      • To debug database issues, head over to http://localhost:8080, this should open up adminer which shows the postgres database, use the credentials in your env file, and set system to postgreSQL.
    • docker-compose build: rebuilds the containers, especially useful if there are new changes (that aren't reflected when running docker-compose up)
    • docker-compose down: stops and removed any of the running containers
    • Alternatively, to save on resources, certain containers can be built through the docker compose rather than all of them. For example, if you wish to run the client and api locally but need the database, you may run it by entering in docker-compose up postgres. By specifiying the names of the containers, only those entered will be brought up.

Local Set Up

  1. First install node, here. The current version of node run is v16.14.0. To avoid unneeded modifications to package lock files, ensure this is the local version as well. If you need to modify/update/downgrade versions, using nvm. Node also includes npm and npx, which is needed to run this application. If you have installed node previously, check to make sure both npm and npx are installed

  2. Additionally, a local Postgres Database must be installed to run the application. You can install postgres here, or through homebrew (if using a Mac).

  3. After downloading and setting up postgres, connect to your local postgres instance (varies depending on device), and run the following command CREATE DB <db-name>. You must then set the env variables as follows to have the local database ready.

       DB_HOST=localhost
       DB_PORT=5432
       DB_USERNAME=<device-username>
       DB_PASSWORD=example
       DB_NAME=<db-name>
  4. After the database is set up, you can run npm install to install all relevant node modules.

  5. After the node modules are installed, you should be ready to run the application using the following commands: npm run start:onboarding-api: starts the backend npm run start:client: starts the client