Skip to main content
Before deploying the CGIAR Risk Intelligence Tool, ensure you have the following dependencies and services configured.

System Requirements

Node.js

Minimum Version: Node.js >= 20 The platform requires Node.js 20 or later for both local development and AWS Lambda runtime.
# Check your Node.js version
node --version

# Should output v20.x.x or higher
AWS Lambdas are configured to use Node.js 20 runtime. Ensure your local Node.js version matches to avoid compatibility issues.

pnpm

Minimum Version: pnpm >= 9 This project uses pnpm as the package manager for efficient monorepo dependency management.
# Install pnpm globally
npm install -g pnpm

# Verify installation
pnpm --version
Do not use npm or yarn. The project relies on pnpm workspace features and has pnpm.onlyBuiltDependencies configuration that is specific to pnpm.

Database

PostgreSQL

Version: PostgreSQL 15 For local development, you need a PostgreSQL 15 instance.
# Install PostgreSQL
brew install postgresql@15

# Start PostgreSQL service
brew services start postgresql@15

# Create database
psql postgres
CREATE DATABASE alliance_risk_dev;
\q
Production Note: In production, the platform uses AWS RDS PostgreSQL 15 in a private VPC. The RDS instance is unreachable from outside the VPC and can only be accessed by Lambda functions.

AWS Services

AWS CLI

Minimum Version: AWS CLI v2 Required for infrastructure deployment, Cognito management, and remote database operations.
# Install AWS CLI v2
brew install awscli

# Verify installation
aws --version

Configure AWS Credentials

Configure your AWS credentials with appropriate permissions:
aws configure
You’ll need:
  • AWS Access Key ID
  • AWS Secret Access Key
  • Default region (e.g., us-east-1)
  • Default output format (recommended: json)
Required AWS Permissions: Your IAM user or role needs permissions for:
  • CloudFormation (stack creation, updates)
  • Cognito (User Pool management)
  • RDS (database provisioning)
  • Lambda (function deployment, invocation)
  • S3 (bucket creation, file uploads)
  • CloudFront (distribution management)
  • IAM (role and policy management)
  • Bedrock (model access)

AWS Account Requirements

The following AWS services must be available in your account and region:
ServicePurposeNotes
CognitoUser authenticationUser Pool with email-based auth
RDS PostgreSQL 15Primary databaseDeployed in private VPC
LambdaAPI and Worker functionsARM64, Node.js 20 runtime
API GatewayHTTP API for NestJS backend30s timeout
S3File storage + static hostingTwo buckets (files, web)
CloudFrontCDN for static frontendSPA fallback routing
BedrockAI model accessClaude 3.5 Sonnet v2
Secrets ManagerDatabase credentialsPostgreSQL password
VPCNetwork isolationPrivate subnets for RDS
Bedrock Access: Ensure your AWS account has access to AWS Bedrock and that Claude 3.5 Sonnet v2 is enabled in your region. You may need to request model access through the AWS Console.

Development Tools

Prisma Studio - Database GUI (included with Prisma CLI)
cd packages/api
npx prisma studio
PostgreSQL Client - For direct database access
# Install psql (if not included with PostgreSQL)
brew install libpq  # macOS
sudo apt install postgresql-client  # Ubuntu/Debian

Next Steps

Once all prerequisites are installed:
  1. Set up your local development environment
  2. Configure environment variables
  3. Deploy infrastructure using AWS CDK or CloudFormation

Build docs developers (and LLMs) love