Enterprise-grade hiring platform designed to help HR teams manage hiring processes efficiently for client companies through structured, skill-based evaluation pipelines.
HireTrust focuses on true skills assessment through a structured, multi-stage evaluation pipeline. Instead of relying solely on resumes, the platform evaluates candidates through:
hire-trust/
├── apps/ # Applications
│ ├── hosts/ # Frontend host applications (Module Federation)
│ │ ├── admin/ # Admin portal
│ │ ├── applicant/ # Applicant portal
│ │ ├── employer/ # Employer portal
│ │ ├── jobs/ # Public jobs portal
│ │ ├── support/ # Support portal
│ │ └── web/ # Marketing website
│ └── server/ # Backend applications
│ ├── api/ # Main API server
│ ├── schedulers/ # Scheduled tasks
│ └── sdk/ # SDK generation
├── dist/ # Build artifacts (not in git)
│ └── api-docs/ # Static API Documentation site
├── libs/ # Shared libraries
│ ├── api/ # Backend libraries
│ │ ├── features/ # Feature modules (domain-specific)
│ │ └── shared/ # Shared backend utilities
│ ├── data-access/ # Frontend data access layer
│ ├── shared/ # Framework-agnostic shared code
│ │ ├── models/ # Shared models/interfaces
│ │ └── utils/ # Shared utilities
│ └── ui/ # Frontend UI libraries
│ ├── components/ # Reusable UI components
│ ├── features/ # Frontend features
│ └── modules/ # Frontend modules
├── infra/ # Infrastructure as Code
│ ├── terraform/ # Terraform configurations
│ ├── scripts/ # Infrastructure automation scripts
│ ├── kubernetes/ # Kubernetes manifests (future)
│ └── elastic/ # Elasticsearch/ELK configs (future)
├── .cursor/ # Cursor AI configuration
│ ├── rules/ # Project rules and guidelines
│ └── commands/ # Reusable commands
└── cypress/ # E2E test configurationsNew developers: See docs/DEVELOPER_SETUP.md for a complete setup guide.
# Install dependencies
yarn install
# Verify setup
./scripts/verify-builds.shFor detailed infrastructure setup, see:
Quick setup:
Example :# Configure cloud authentication (one-time)
./infra/scripts/setup-gcp-auth.sh
./infra/scripts/setup-firebase-auth.shThis will:
IMPORTANT: This workspace is configured to prevent accidental deployments to wrong GCP/Firebase projects.
Project IDs:
hiretrust-sandboxhiretrust-staginghiretrustSafeguards in place:
.firebaserc - Explicit Firebase project aliases (dev, staging, production).gcloudrc - gcloud project selection helper (mirrors .firebaserc)--project flags instead of global gcloud configterraform.tfvars per environmentmigrate.ts and seed.tsenvironment.ts filesdirenv (.envrc) - Optional project-scoped env vars for GOOGLE_APPLICATION_CREDENTIALS, FIREBASE_PROJECT_ID, GOOGLE_CLOUD_PROJECT (recommended if you work across many GCP accounts/projects)Before deploying, validate workspace:
Example :./scripts/validate-workspace.sh [dev|staging|production]To keep Google credentials scoped to this repo only (no global shell profile leakage):
Example :brew install direnv
# add to ~/.zshrc: eval "$(direnv hook zsh)"
cp .envrc.example .envrc
direnv allowBest practices:
./scripts/deploy-*.sh <env>make plan ENV=devfirebase use dev (not project IDs)source .gcloudrc && gcloud-use dev (or use explicit --project flags)gcloud config get-value project or gcloud-current# Create GCS buckets for Terraform state storage
make create-state-buckets# Setup Terraform for dev environment
make setup-terraform ENV=dev
# This creates terraform.tfvars from example
# Edit infra/terraform/environments/dev/terraform.tfvars if needed# Initialize Terraform
make terraform-init ENV=dev
# Review planned changes
make terraform-plan ENV=dev
# Apply infrastructure changes
make terraform-apply ENV=devBefore running the application, set up the sandbox infrastructure:
Example :# Run automated setup script
bash scripts/setup-sandbox-infra.sh
# Or manually:
# 1. Initialize Terraform
make terraform-init ENV=dev
# 2. Validate configuration
make terraform-validate ENV=dev
# 3. Review plan
make terraform-plan ENV=dev
# 4. Apply infrastructure
make terraform-apply ENV=dev# Start all development servers
make dev
# Start individual services
make dev-admin # Admin portal
make dev-applicant # Applicant portal
make dev-employer # Employer portal
make dev-api # API serverTo enable Google/Outlook calendar connect and automatic interview event creation:
CALENDAR_OAUTH_STATE_SECRET (random secret for signing OAuth state)CALENDAR_TOKEN_ENCRYPTION_KEY (base64-encoded 32-byte AES key for encrypting tokens)GOOGLE_CALENDAR_CLIENT_IDGOOGLE_CALENDAR_CLIENT_SECRETOUTLOOK_CLIENT_IDOUTLOOK_CLIENT_SECRETUsers connect under Settings → Integrations and enable Auto sync on their availability rule.
# Run all tests
make test
# Run specific test suites
make test-unit # Unit tests
make test-e2e # E2E tests# Lint code
make lint
# Format code
make formatSonarCloud analysis runs in GitLab CI for merge requests and main. Configure SONAR_TOKEN, SONAR_HOST_URL, SONAR_PROJECT_KEY, and SONAR_ORGANIZATION in GitLab CI/CD variables (see docs/GITLAB-CI-VARIABLES.md).
# Initialize Terraform for an environment
make terraform-init ENV=dev
# Plan infrastructure changes
make terraform-plan ENV=dev
# Apply infrastructure changes
make terraform-apply ENV=dev
# Validate Terraform configuration
make terraform-validate# Run migrations for an environment
make migrate-dev # Development
make migrate-staging # Staging
make migrate-prod # Production
# Or use nx directly
nx run migrations:migrate --env=dev
nx run migrations:migrate --env=staging --dry-runMigrations are versioned and tracked in Firestore's _migrations collection. Each migration includes:
See libs/api/shared/infrastructure/firebase/migrations/README.md for details.
# Seed data for development/staging
make seed-dev # Seed dev environment
make seed-staging # Seed staging environment
# Clear existing data and seed
make seed-dev-clear # Clear and seed dev
make seed-staging-clear # Clear and seed staging
# Seed specific collections
nx run migrations:seed --env=dev --collections=users,companiesSeed data ensures consistent test data across environments. See libs/api/shared/infrastructure/firebase/migrations/seed/ for seed data definitions.
# Deploy to development
make deploy-dev
# Deploy to staging (requires confirmation)
make deploy-staging
# Deploy to production (requires explicit confirmation)
make deploy-productionThe project supports multiple runner configurations:
GitLab.com Shared Runners (Free Tier)
Self-Hosted Runner (Recommended)
Hybrid Approach
# Self-hosted runner is managed manually outside this repo.
# Ensure the runner is registered in GitLab with tags: hire-trust,nodejsRunner setup is intentionally not automated via Terraform in this repo.
The platform supports three environments:
hiretrust-sandbox (Project: 671888418700)hiretrust-staging (Project: 1088795973754)hiretrust (Project: 230244526406)Each environment has separate:
Lower Environments (dev, staging):
admin.{env}.hire.astatinn.comapplicant.{env}.hire.astatinn.comemployer.{env}.hire.astatinn.comjobs.{env}.hire.astatinn.comProduction:
admin.hire.astatinn.comapplicant.hire.astatinn.comemployer.hire.astatinn.comjobs.hire.astatinn.comCustom domains are configured via Firebase CLI after hosting sites are created. See infra/terraform/README.md for details.
Single Branch Workflow: All environments use the main branch.
Sandbox (Auto-deploy):
main → Runs validate, build, testStaging (Manual):
migrate:staging (if needed)deploy:apps:stagingProduction (Manual with Versioning):
migrate:production (if needed)deploy:apps:productionpackage.json versionv1.2.3)Version is automatically calculated from commit messages:
BREAKING CHANGE: or feat!:)feat:)fix:, perf:, refactor:)If production deployment has issues:
Before pushing to GitLab, run validation locally:
Example :# Run all checks (lint, build, test)
./scripts/pre-push.sh
# Or set up git hook (runs automatically on git push)
./scripts/setup-git-hooks.shThis ensures lint, build, and test phases pass locally before pushing to GitLab.
See docs/CI-CD-WORKFLOW.md for detailed pipeline configuration and docs/GITLAB-CI-VARIABLES.md for required CI/CD variables.
.cursor/rules/01-architecture.mdc.cursor/rules/02-coding-guidelines.mdc.cursor/rules/06-project-specifications.mdcinfra/README.mdinfra/terraform/README.mddocs/SENDGRID_SENDER_SETUP.mddocs/email/TEMPLATES.mdTo build and deploy the interactive API documentation locally:
Example :# Build the documentation static site
yarn build:api-docs
# Deploy documentation to current environment (dev/staging/production)
yarn deploy:api-docs <env>The documentation is automatically built and deployed to Firebase Hosting via GitLab CI/CD on every push to main.
Please read CODE_OF_CONDUCT.md and follow the project's coding guidelines in .cursor/rules/.
Copyright (c) 2025 Astatinn. All rights reserved.
For questions or issues, please contact the development team.
Last Updated: 2026-01-03