A full-stack web application to manage a reading list of papers.
The application is composed of a React frontend and a REST API developed in Go. The infrastructure is deployed on AWS utilizing a wide array of AWS services, and is provisioned through Terraform.
The architecture follows a 3-tier pattern for scalability and fault tolerance. Deployed in a VPC across multiple Availability Zones (AZs) for high availability, the frontend is served via S3 static hosting. An Application Load Balancer routes client requests to the backend running in an ECS Fargate cluster.
- Frontend (React App): Hosted on S3 as a static website.
- Backend (Go REST API): Containerized and running on ECS (Elastic Container Service).
- Load Balancer: The API is exposed via an Application Load Balancer (ALB), providing a public entry point.
- Database: Managed relational database service using Amazon RDS for persistent storage.
- Elastic Container Registry (ECR): Stores container images for the backend application.
- Secrets Manager: Securely manages credentials, such as database credentials, API keys, etc.
- Public Subnets: Deployed across multiple AZs, the ALB is hosted here to expose the backend API to the internet.
- Private Subnets: ECS and RDS are deployed in private subnets to ensure security. The backend service can communicate with AWS Services via AWS PrivateLink.
- Multi-AZ Setup: The VPC spans multiple availability zones for high availability and resilience.
- AWS CLI installed and configured.
- Terraform installed.
- Docker installed for local development and containerization.
- Clone the repository:
git clone https://github.com/marvinlanhenke/go-paper.git
- Run the backend:
docker compose up -d
- Build the frontend & preview
make frontend-preview
The infrastructure can be provisioned using Terraform. Ensure your AWS credentials are set up, then run the following commands:
- Initialize Terraform:
terraform init
- Plan and apply the infrastructure:
terraform apply
- Deploy the application
make deploy
- Use a CDN to serve the frontend on the edge
- Use RDS Read-Replicas
- Utilize the AWS SecretsManager to savely share secrets with the backend application
This project ist licensed under the Apache License, Version 2.0