{"id":48693874,"url":"https://github.com/localstore-platform/infra","last_synced_at":"2026-04-11T06:46:14.174Z","repository":{"id":326295489,"uuid":"1103387386","full_name":"localstore-platform/infra","owner":"localstore-platform","description":"🏗️ Infrastructure as Code for LocalStore Platform - Terraform configurations for  AWS deployment, Docker Compose for local dev, and CI/CD pipelines. Single-server  MVP setup (~$20/month) with scaling path to production architecture.","archived":false,"fork":false,"pushed_at":"2025-12-07T16:15:09.000Z","size":45,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-11T06:45:53.306Z","etag":null,"topics":["aws","ci-cd","cost-optimization","devops","docker","docker-compose","github-actions","infrastructure-as-code","startup-infra","terraform"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/localstore-platform.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-24T20:02:20.000Z","updated_at":"2025-12-07T16:15:13.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/localstore-platform/infra","commit_stats":null,"previous_names":["localstore-platform/infra"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/localstore-platform/infra","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localstore-platform%2Finfra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localstore-platform%2Finfra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localstore-platform%2Finfra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localstore-platform%2Finfra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/localstore-platform","download_url":"https://codeload.github.com/localstore-platform/infra/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localstore-platform%2Finfra/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31671630,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T17:19:37.612Z","status":"online","status_checked_at":"2026-04-11T02:00:05.776Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","ci-cd","cost-optimization","devops","docker","docker-compose","github-actions","infrastructure-as-code","startup-infra","terraform"],"created_at":"2026-04-11T06:46:13.042Z","updated_at":"2026-04-11T06:46:14.134Z","avatar_url":"https://github.com/localstore-platform.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🏗️ LocalStore Platform - Infrastructure\n\nInfrastructure and deployment repository for the LocalStore Platform. Hosts Terraform configurations for AWS deployment, Docker Compose for local development, and CI/CD pipeline configurations.\n\n**Spec Version:** v1.1-specs  \n**Repository:** `infra`  \n**Status:** 🟡 In Progress\n\n---\n\n## 📋 Overview\n\nThis repository contains:\n\n- **Terraform configurations** for AWS infrastructure (VPC, EC2, RDS, etc.)\n- **Docker Compose** files for local development and production\n- **CI/CD pipelines** using GitHub Actions\n- **Kubernetes manifests** (future scaling path)\n\n### Tech Stack\n\n- **IaC:** Terraform 1.5+\n- **Container Runtime:** Docker 24+, Docker Compose 2.20+\n- **Cloud Provider:** AWS (ap-southeast-1 - Singapore region)\n- **CI/CD:** GitHub Actions\n- **DNS/CDN:** CloudFlare (optional)\n\n### Target Architecture\n\n```plaintext\nMVP ($20/month):\n┌─────────────────────────────────────────┐\n│           AWS EC2 (t2.small)            │\n│  ┌─────────────────────────────────┐    │\n│  │        Docker Compose           │    │\n│  │  ┌─────────┐  ┌─────────┐      │    │\n│  │  │ NestJS  │  │ Python  │      │    │\n│  │  │  API    │  │   AI    │      │    │\n│  │  └────┬────┘  └────┬────┘      │    │\n│  │       │            │           │    │\n│  │  ┌────┴────────────┴────┐      │    │\n│  │  │     PostgreSQL       │      │    │\n│  │  │       + Redis        │      │    │\n│  │  └──────────────────────┘      │    │\n│  └─────────────────────────────────┘    │\n└─────────────────────────────────────────┘\n```\n\n---\n\n## 📁 Repository Structure\n\n```plaintext\ninfra/\n├── .github/\n│   ├── workflows/           # CI/CD pipelines\n│   │   ├── terraform-plan.yml\n│   │   ├── terraform-apply.yml\n│   │   └── docker-build.yml\n│   ├── CODEOWNERS\n│   ├── PULL_REQUEST_TEMPLATE.md\n│   └── copilot-instructions.md\n│\n├── terraform/\n│   ├── environments/\n│   │   ├── dev/             # Development environment\n│   │   ├── staging/         # Staging environment\n│   │   └── prod/            # Production environment\n│   ├── modules/\n│   │   ├── vpc/             # VPC, subnets, security groups\n│   │   ├── ec2/             # EC2 instances\n│   │   ├── rds/             # RDS PostgreSQL (future)\n│   │   └── s3/              # S3 buckets\n│   └── shared/              # Shared variables and outputs\n│\n├── docker/\n│   ├── compose/\n│   │   ├── docker-compose.yml        # Local dev\n│   │   ├── docker-compose.prod.yml   # Production\n│   │   └── docker-compose.test.yml   # Testing\n│   ├── nginx/               # Nginx reverse proxy configs\n│   └── scripts/             # Helper scripts\n│\n├── k8s/                     # Kubernetes manifests (future)\n│   ├── base/\n│   └── overlays/\n│\n├── scripts/\n│   ├── deploy.sh            # Deployment script\n│   ├── config.sh            # Environment configuration generator\n│   └── ecr.mk               # ECR operations Makefile\n│\n├── docs/\n│   ├── DEPLOYMENT.md        # Deployment guide\n│   ├── SECURITY.md          # Security configuration\n│   └── MONITORING.md        # Monitoring setup\n│\n├── .env.example             # Environment template\n├── SPEC_LINKS.md            # Links to specifications\n├── GIT_WORKFLOW.md          # Git workflow guide\n└── README.md                # This file\n```\n\n---\n\n## 🚀 Quick Start\n\n### Prerequisites\n\n```bash\n# Check required tools\nterraform --version    # Need 1.5+\ndocker --version       # Need 24+\ndocker compose version # Need 2.20+\naws --version          # Need 2.0+\n```\n\n### Local Development\n\n```bash\n# Clone repository\ngit clone https://github.com/localstore-platform/infra.git\ncd infra\n\n# Copy environment template\ncp .env.example .env\n# Edit .env with your settings\n\n# Start local development environment\ncd docker/compose\ndocker compose up -d\n\n# Verify services are running\ndocker compose ps\n```\n\n### AWS Deployment (MVP)\n\n```bash\n# Configure AWS credentials\naws configure\n\n# Initialize Terraform\ncd terraform/environments/prod\nterraform init\n\n# Preview changes\nterraform plan -out=plan.tfplan\n\n# Apply changes\nterraform apply plan.tfplan\n```\n\n---\n\n## 🔧 Configuration\n\n### Environment Variables\n\nSee [.env.example](.env.example) for all required environment variables.\n\nKey variables:\n\n| Variable | Description | Example |\n|----------|-------------|---------|\n| `AWS_REGION` | AWS region | `ap-southeast-1` |\n| `EC2_INSTANCE_TYPE` | EC2 instance size | `t2.small` |\n| `DOMAIN_NAME` | Primary domain | `quanly.ai` |\n| `DB_PASSWORD` | Database password | (secret) |\n\n### Infrastructure Costs (Estimated)\n\n| Component | Monthly Cost |\n|-----------|--------------|\n| EC2 t2.small | ~$15 |\n| EBS Storage (20GB) | ~$2 |\n| Data Transfer | ~$3 |\n| **Total MVP** | **~$20/month** |\n\n---\n\n## 📊 Monitoring\n\n### CloudWatch Metrics\n\n- CPU utilization\n- Memory usage\n- Disk I/O\n- Network traffic\n\n### Alerts (Production)\n\n- CPU \u003e 80% for 5 minutes\n- Memory \u003e 85%\n- Disk usage \u003e 90%\n- API response time \u003e 2s\n\n---\n\n## 🔐 Security\n\n### Security Groups\n\n| Port | Service | Source |\n|------|---------|--------|\n| 22 | SSH | Admin IPs only |\n| 80 | HTTP | 0.0.0.0/0 |\n| 443 | HTTPS | 0.0.0.0/0 |\n| 5432 | PostgreSQL | VPC only |\n| 6379 | Redis | VPC only |\n\n### Best Practices\n\n- ✅ Never commit secrets to repository\n- ✅ Use AWS Secrets Manager or Parameter Store\n- ✅ Enable VPC flow logs\n- ✅ Regular security patching\n- ✅ SSL/TLS for all external traffic\n\n---\n\n## 📚 Documentation\n\n- [Deployment Guide](docs/DEPLOYMENT.md)\n- [Security Configuration](docs/SECURITY.md)\n- [Monitoring Setup](docs/MONITORING.md)\n- [Specification Links](SPEC_LINKS.md)\n- [Git Workflow](GIT_WORKFLOW.md)\n\n---\n\n## 🔗 Related Repositories\n\n| Repository | Description | Status |\n|------------|-------------|--------|\n| [specs](https://github.com/localstore-platform/specs) | Documentation \u0026 specifications | ✅ Complete |\n| [api](https://github.com/localstore-platform/api) | NestJS backend API | ✅ Sprint 0.5 |\n| [menu](https://github.com/localstore-platform/menu) | Next.js public menu website | 🟡 In Progress |\n| [contracts](https://github.com/localstore-platform/contracts) | TypeScript shared types | ✅ v0.1.0 |\n| [dashboard](https://github.com/localstore-platform/dashboard) | Next.js owner dashboard | 🟡 Docs Only |\n| [mobile](https://github.com/localstore-platform/mobile) | Flutter mobile app | 🟡 Docs Only |\n\n---\n\n## 👥 Team \u0026 Ownership\n\n**CODEOWNERS:** @localstore-platform/infra-team\n\nFor infrastructure support or questions:\n\n- Create an issue in this repository\n- Tag `@localstore-platform/infra-team` in PRs\n- Reference relevant spec sections in [SPEC_LINKS.md](SPEC_LINKS.md)\n\n---\n\n## 📄 License\n\nMIT License - see [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocalstore-platform%2Finfra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flocalstore-platform%2Finfra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocalstore-platform%2Finfra/lists"}