Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,11 @@ AWS_S3_BUCKET=your-s3-bucket-name
AWS_S3_BUCKET_NAME=your-s3-bucket-name
AWS_KMS_KEY_ID=your-kms-key-id
AWS_CLOUDFRONT_DISTRIBUTION_ID=your-cloudfront-distribution-id
AWS_SQS_NOTIFICATION_QUEUE_URL=https://sqs.us-east-1.amazonaws.com/your-account-id/teachlink-notifications-dev
AWS_SNS_NOTIFICATION_TOPIC_ARN=arn:aws:sns:us-east-1:your-account-id:teachlink-notifications-dev
AWS_HEALTH_URL=https://sts.amazonaws.com


# Session Configuration
SESSION_SECRET=your-session-secret-min-10-chars
SESSION_COOKIE_NAME=teachlink.sid
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
/dist
/node_modules
/build
*.tsbuildinfo

package-lock.json

# Logs
logs
Expand Down
2 changes: 1 addition & 1 deletion compliance/configs/license-policy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ review_required_for:
- packages:
- name: '@opentelemetry/*'
reason: Verify export compliance
action: Technical review required
action: Technical review required
15 changes: 15 additions & 0 deletions infrastructure/sns-topics.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
resource "aws_sns_topic" "notifications" {
name = "teachlink-notifications-${var.environment}"
}

resource "aws_sns_topic_subscription" "email_queue_subscription" {
topic_arn = aws_sns_topic.notifications.arn
protocol = "sqs"
endpoint = aws_sqs_queue.notification_queue.arn
}

resource "aws_sns_topic_subscription" "push_queue_subscription" {
topic_arn = aws_sns_topic.notifications.arn
protocol = "sqs"
endpoint = aws_sqs_queue.push_notification_queue.arn
}
35 changes: 35 additions & 0 deletions infrastructure/sqs-queues.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Main Notification Queue
resource "aws_sqs_queue" "notification_queue" {
name = "teachlink-notifications-${var.environment}"
delay_seconds = 0
max_message_size = 262144
message_retention_seconds = 86400
receive_wait_time_seconds = 10
visibility_timeout_seconds = 30

redrive_policy = jsonencode({
deadLetterTargetArn = aws_sqs_queue.notification_dlq.arn
maxReceiveCount = 5
})
}

# Dead Letter Queue for Notifications
resource "aws_sqs_queue" "notification_dlq" {
name = "teachlink-notifications-dlq-${var.environment}"
}

# Push Notification Queue
resource "aws_sqs_queue" "push_notification_queue" {
name = "teachlink-push-notifications-${var.environment}"
visibility_timeout_seconds = 30

redrive_policy = jsonencode({
deadLetterTargetArn = aws_sqs_queue.push_notification_dlq.arn
maxReceiveCount = 5
})
}

# Dead Letter Queue for Push Notifications
resource "aws_sqs_queue" "push_notification_dlq" {
name = "teachlink-push-notifications-dlq-${var.environment}"
}
146 changes: 143 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
"@aws-sdk/client-kms": "^3.978.0",
"@aws-sdk/client-s3": "^3.975.0",
"@aws-sdk/client-secrets-manager": "^3.978.0",
"@aws-sdk/client-sns": "^3.1038.0",
"@aws-sdk/client-sqs": "^3.1038.0",
"@elastic/elasticsearch": "^9.3.4",
"@huggingface/inference": "^4.13.12",
"@nestjs-modules/ioredis": "^2.0.2",
Expand Down
Loading
Loading