AWS Builder Center

Weekend Showcase Challenge AWS Builder Rewards Tracker

I built a web dashboard to track daily activities and badge progress for the AWS Student Rewards program. It uses browser storage and AWS Amplify to help builders keep their activity streaks alive without needing a backend database.

Developer
When I began my journey to collect all twenty one badges for the AWS Student Rewards program I noticed a huge problem. Staying consistent was extremely difficult. You must visit the website every single day. You must like content regularly. You must leave meaningful comments. Some tasks require a seven day streak. Other tasks require a thirty day streak. The biggest challenge requires a massive ninety day streak. Remembering all these rules was simply too hard. Sometimes I read an amazing article but forgot to leave a comment. That single mistake would reset my entire long streak back to zero. I decided I needed one unified place to track every single action I took. So I created the AWS Builder Rewards Tracker. This is a visual web dashboard that tracks my daily goals and my overall badge progress in one clean view. The main purpose of this tool is to replace human memory with a visual checklist. When I open the application I see exactly what I need to complete for the day. The interface is split into two distinct areas. The first area is the daily checklist. It includes empty checkboxes for visiting the site liking content leaving comments and voting on community wishes. I simply click the box when the task is finished. The second area focuses on long term badge tracking. Here I monitor my progress for the big twenty one badges. If I need ten replies to my comments to earn a specific badge I can log that exact number. It gives me a clear picture of what is already done and what still needs my attention. I wanted to build this application fast. I wanted to keep the codebase very simple. I decided to use plain HTML CSS and vanilla JavaScript. I avoided setting up a complex backend database just to check off a few daily tasks. For data storage I utilized the browser LocalStorage API. All the checkbox states and streak numbers are saved right in the local browser cache. The application works instantly without making any slow backend network requests. For the hosting architecture I chose AWS Amplify Hosting. This specific service falls under the AWS Free Tier. It is absolutely perfect for hosting static web applications. The deployment flow is very direct and fast. I push my code changes to my Github repository. AWS Amplify detects the change automatically. It then updates the live production website immediately. The flow goes from the user directly to AWS Amplify Hosting which serves the HTML CSS and JavaScript files. The browser then handles the LocalStorage data. Building this tracker was not totally smooth. I ran into a major problem with the streak calculation logic. At first my code just added a number to the streak every time I clicked the daily visit button. But if I refreshed the page and clicked the button again the streak number went up again. I had to rewrite the javascript logic to check the actual calendar date. Working with dates in javascript is notoriously confusing because of timezones and local device settings. I had to write a custom function that compares the current time with the last saved timestamp stored inside LocalStorage. If the difference is exactly one calendar day the streak goes up by one point. If the difference is more than one day the streak resets back to zero instantly. Getting that specific math right took me several hours of frustrating debugging sessions. I printed console logs endlessly until the dates matched perfectly. Another big challenge was the user interface screen layout. The dashboard looked great on my wide laptop monitor. It was completely broken when I opened it on my mobile phone screen. The layout cards overlapped each other. The checkboxes were way too small to tap with my thumb accurately. I had to spend an entire afternoon rewriting my CSS flexbox rules from scratch. I added multiple media queries to make the interface stack neatly on mobile screens. Making the site responsive was a tough lesson in mobile first design principles. This project taught me a very valuable lesson. You do not need a massive complex architecture to solve a real world problem. Using simple browser storage was enough for the first version. I also learned how incredibly easy it is to host a project on AWS Amplify. Connecting a code repository and getting a live secure URL took only a few minutes. It gave me a lot of confidence to deploy more applications in the future. Right now the data only lives on one specific device. If I check my phone it will not show what I already completed on my laptop. In the future I want to add Amazon Cognito for user authentication. I also plan to add Amazon DynamoDB to store the progress safely in the cloud so it syncs everywhere.
I want to tag @benfowleraws for keeping all of us motivated to build things this summer. Seeing everyone share their work really pushed me to finally finish this tracker and share it with the community.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article