A serverless quiz POC application built with a Go backend and a Svelte frontend, deployed on AWS using Terraform.
The application follows a modern serverless architecture designed for maximum cost-efficiency:
backend/: Go source code for the Lambda API.frontend/: Svelte application code.terraform/: Infrastructure as Code definitions.The Lambda function uses the provided.al2023 runtime, requiring the binary to be named bootstrap and arm64 architecture.
cd backend/questions
GOOS=linux GOARCH=arm64 go build -o build/bootstrap main.go models.go
Navigate to the terraform directory and initialize with your backend configuration:
cd terraform
terraform init -backend-config=backend.hcl
Review and apply the changes:
terraform plan
terraform apply
Once the infrastructure is deployed, note the api_endpoint output. Configure your frontend environment:
Create frontend/.env:
VITE_GET_URL=your_api_gateway_endpoint
Build the application:
cd frontend
npm install
npm run build
Upload the contents of frontend/build/ to the frontend S3 bucket created by Terraform.
This project is licensed under the MIT License - see the LICENSE file for details.