This project uses the Untappd API and allows you to keep track of what beers you have had, your top-rated beers, badges you earned, and statistics about your Untappd check-ins.
The Untappd API requires that you register your application. Register your app here. Currently, new apps cannot be created to get API access. Most likely, you will need to be an insider to gain the ability to download your Untappd JSON data.
The local or AWS steps can be used for testing or production, just know that the data will need to be updated mainually if you go with local JSON files vs the use of the AWS automation.
| Tool / Package | Required Version | Purpose |
|---|---|---|
| Node.js | v20.x | Runtime for Angular and scripts |
| npm | v10.x | Package manager |
| Angular CLI | v14.x | Building and serving the app |
| Python | 3.x | Fetching Untappd data |
| pip / python-dotenv | Latest | Python dependency management |
| Terraform | v1.6.x | Deploying AWS infrastructure |
Note: We recommend using NVM (Node Version Manager) to manage Node versions. This allows you to easily switch to Node 16 for this project:
nvm install 20
nvm use 20Check your installed versions with:
node -v
npm -v
ng version
python --version
pip list
terraform -version- Create a
.envfile:
cp .env.example .envFill in your client_secret, client_id, and untappd username. These variables will be read by lambda/fetch_api_data.py.
- Install Python dependencies:
pip install -r lambda/requirements.txt- Fetch Untappd data locally:
python lambda/fetch_api_data.py- Install Node dependencies:
npm install- Start the dev environment:
npm run start:devYour Angular app will be available at http://localhost:4200.
- Create a
.envfile:
cp .env.example .envFill in variables for Untappd (client_secret, client_id, untappd username) and AWS (CLOUDFORMATION_TEMPLATE, S3_BUCKET_NAME, STACK_NAME, LAMBDA_ZIP_FILE).
- Deploy AWS resources with Terraform:
cd deploy/terraform
terraform init
terraform applyTerraform will create the necessary S3 bucket, IAM roles, and other resources. You can review the planned changes before applying.
- Use the deployment script in
deploy/to build and upload the Lambda code:
cd deploy
./liquid-stats-lambda.shThis script builds the Lambda zip from lambda/, uploads it to S3, and deploys the CloudFormation template to schedule the Lambda to run (default: 12:00 AM Monday) to fetch Untappd data.
- Once deployed, you can:
- Run
lambda/fetch_api_data.pylocally to update your local JSON copies. - Deploy the Angular app to your server; it will fetch the data from S3 according to the Lambda schedule.
- All Terraform files are in
deploy/terraform/. - Only sensitive or generated files are ignored (
terraform.auto.tfvars,.tfplan,.tfstate,.terraform/). - Core configuration files (
main.tf,provider.tf,outputs.tf,variables.tf,.terraform.lock.hcl) are tracked in Git. .terraform.lock.hclensures consistent provider versions across environments.
Chris Frome - linkedin.com/in/cfrome77