Skip to content
ogesebastienPublic

About

This project implements a modern cloud infrastructure using AWS ECS, Elasticsearch, and a microservices architecture with Go backend and Next.js frontend.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

Avengers Infrastructure Project

This project implements a modern cloud infrastructure using AWS ECS, Elasticsearch, and a microservices architecture with Go backend and Next.js frontend.

CI/CD Pipeline Architecture

graph TD
    %% Style definitions
    classDef mainPipeline fill:#4a148c,stroke:#9c27b0,stroke-width:4px,color:#fff,rx:10px
    classDef terraformStage fill:#01579b,stroke:#29b6f6,stroke-width:2px,color:#fff,rx:8px
    classDef appStage fill:#2e7d32,stroke:#66bb6a,stroke-width:2px,color:#fff,rx:8px
    classDef imageStage fill:#bf360c,stroke:#ff7043,stroke-width:2px,color:#fff,rx:8px

    %% Main Pipeline
    Main(🎯 CI/CD Pipeline):::mainPipeline --> Terraform
    Main --> Application

    %% Terraform Pipeline
    subgraph Terraform[⚙️ Infrastructure Pipeline]
        direction TB
        T1[🔍 Validate Terraform] --> T2[📋 Plan Resources]
        T2 --> T3[🚀 Apply Changes]
        T3 --> T4[♻️ Cleanup/Destroy]
    end

    %% Application Pipeline
    subgraph Application[📦 Application Pipeline]
        direction TB
        A1[⚡ Run Tests] --> A2[🏭 Build Artifacts]
        A2 --> A3[🚀 Production Deploy]
        A2 --> |Build Backend| BS[🖥️ Go API Image]:::imageStage
        A2 --> |Build Frontend| BC[🎨 Next.js Image]:::imageStage
        BS --> A3
        BC --> A3
    end

    %% Subgraph Styles
    style Terraform fill:#01579b,stroke:#29b6f6,stroke-width:3px
    style Application fill:#2e7d32,stroke:#66bb6a,stroke-width:3px
Loading

Project Structure

├── client/               # Next.js frontend application
├── server/              # Go backend service
├── database/            # Elasticsearch configuration
├── Terraform/           # Infrastructure as Code
└── docker-compose files # Development and production environments

Quick Start

Development Environment

make up-dev

Production Environment

make up-prod

Services

  • Frontend: Next.js application (Port 3000)
  • Backend: Go service (Port 8080)
  • Database: Elasticsearch (Ports 9200, 9300)

Deployment

The project uses GitLab CI/CD pipeline with three stages:

  1. Test: Run Go tests
  2. Build: Build and push Docker images to ECR
  3. Deploy: Deploy to ECS (PreProd/Prod environments)

Infrastructure

  • AWS ECS: Container orchestration
  • AWS ALB: Load balancing
  • AWS VPC: Network infrastructure
  • Elasticsearch: Search and analytics engine

Schema

infra schema

Development

  1. Clone the repository
  2. Set up environment variables
  3. Run make up-dev for development environment

Environment Variables

Required environment variables:

  • MONGO_USER
  • MONGO_PASS
  • JWT_KEY
  • CLIENT_DOMAIN
  • AWS credentials for deployment

Contributing

  1. Create a feature branch
  2. Make changes
  3. Submit a merge request

About

This project implements a modern cloud infrastructure using AWS ECS, Elasticsearch, and a microservices architecture with Go backend and Next.js frontend.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages