Skip to content

merge dev to main#1

Merged
BarkinBalci merged 12 commits intomainfrom
dev
Dec 26, 2025
Merged

merge dev to main#1
BarkinBalci merged 12 commits intomainfrom
dev

Conversation

@BarkinBalci
Copy link
Owner

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request merges development work into main, introducing a complete event analytics service with a microservices architecture. The service accepts HTTP event submissions, publishes them to SQS, and processes them asynchronously into ClickHouse for analytics.

  • Implements API service for event ingestion with immediate 202 Accepted responses
  • Implements Consumer service for SQS message processing and ClickHouse storage
  • Includes comprehensive test coverage across all layers
  • Provides Terraform infrastructure-as-code for AWS deployment with ECS Fargate

Reviewed changes

Copilot reviewed 46 out of 50 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
go.mod Go module definition with version 1.25.5 and dependencies
internal/service/*.go Event service layer with validation, bulk processing, and metrics
internal/handler/*.go HTTP handlers using Gin framework with Swagger documentation
internal/repository/clickhouse/*.go ClickHouse repository implementation with ReplacingMergeTree
internal/consumer/*.go Pipeline-based consumer with receiver, parser, and batch writer stages
internal/queue/sqs/*.go SQS client wrapper for event publishing
cmd/api/main.go API service entry point
cmd/consumer/main.go Consumer service entry point
deployments/terraform/*.tf Complete AWS infrastructure with VPC, ECS, ALB, SQS, and autoscaling
deployments/docker/*.Dockerfile Multi-stage Docker builds for API and consumer
.github/workflows/*.yml CI/CD pipelines for testing and AWS deployment
Tests (multiple files) Comprehensive unit tests with mocks for all service layers
Files not reviewed (1)
  • deployments/terraform/.terraform.lock.hcl: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +265 to +269
http = {
port = 80
protocol = "HTTP"
forward = { target_group_key = "api" }
}
Copy link

Copilot AI Dec 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The application load balancer is configured to expose the API over plain HTTP on port 80 (protocol = "HTTP"), which leaves all ingested event traffic unencrypted in transit and vulnerable to sniffing and man‑in‑the‑middle tampering. Any client communicating with this ALB can have event payloads (including user identifiers or metadata) intercepted or modified by an on‑path attacker. Configure the ALB to terminate TLS (HTTPS) with a proper certificate and restrict or redirect HTTP traffic so that sensitive API requests are always served over HTTPS.

Suggested change
http = {
port = 80
protocol = "HTTP"
forward = { target_group_key = "api" }
}
http_redirect = {
port = 80
protocol = "HTTP"
action_type = "redirect"
redirect = {
port = "443"
protocol = "HTTPS"
status_code = "HTTP_301"
}
}
https = {
port = 443
protocol = "HTTPS"
ssl_policy = "ELBSecurityPolicy-2016-08"
certificate_arn = var.acm_certificate_arn
forward = { target_group_key = "api" }
}

Copilot uses AI. Check for mistakes.
@BarkinBalci BarkinBalci merged commit 303a3e4 into main Dec 26, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant