<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Attila Olbrich</title>
    <description>The latest articles on DEV Community by Attila Olbrich (@attila_olbrich_ce45a12c58).</description>
    <link>https://dev.to/attila_olbrich_ce45a12c58</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2793791%2Fa5b94c58-e4d1-4aa6-a825-93cae180e8fa.jpg</url>
      <title>DEV Community: Attila Olbrich</title>
      <link>https://dev.to/attila_olbrich_ce45a12c58</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/attila_olbrich_ce45a12c58"/>
    <language>en</language>
    <item>
      <title>Automated Code Reviews and Docs with AI — Seamlessly in GitHub Actions or from the CLI</title>
      <dc:creator>Attila Olbrich</dc:creator>
      <pubDate>Sun, 11 May 2025 19:49:33 +0000</pubDate>
      <link>https://dev.to/attila_olbrich_ce45a12c58/automated-code-reviews-and-docs-with-ai-seamlessly-in-github-actions-or-from-the-cli-2cdp</link>
      <guid>https://dev.to/attila_olbrich_ce45a12c58/automated-code-reviews-and-docs-with-ai-seamlessly-in-github-actions-or-from-the-cli-2cdp</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/aws-amazon-q-v2025-04-30"&gt;Amazon Q Developer "Quack The Code" Challenge&lt;/a&gt;: Crushing the Command Line&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;I created an automation tool using golang, called QReview that enhances code review workflows using Amazon Q Developer CLI, and optionally integrates with GitHub, Ollama, and Amazon Bedrock. It helps developers automate reviews, generate documentation, and surface security or improvement suggestions — all from the command line.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;Here’s a quick demo of QReview in action: Note: This video uses AI voice over.&lt;/p&gt;

&lt;p&gt;[![Watch the video]&lt;br&gt;
  &lt;iframe src="https://www.youtube.com/embed/Lw0Toupu_q0"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;You’ll see:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;At the beginning of the video I explain what the tool can do&lt;/li&gt;
&lt;li&gt;Terminal reviews and summaries&lt;/li&gt;
&lt;li&gt;Markdown + HTML output generation&lt;/li&gt;
&lt;li&gt;PR inline comments via GitHub API&lt;/li&gt;
&lt;li&gt;Dynamic, timestamped documentation&lt;/li&gt;
&lt;li&gt;GitGub action set-up&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Code Repository
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/olbrichattila/qreview" rel="noopener noreferrer"&gt;https://github.com/olbrichattila/qreview&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Key Features:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Local or GitHub PR Code Review:&lt;/strong&gt;
Perform in-depth reviews using local changes or GitHub Pull Requests. Output can be shown directly in the terminal (with formatting and colors) or posted as inline comments in the PR.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Auto-Generated Documentation:&lt;/strong&gt;
Creates structured local HTML documentation for each review session — broken down by year, month/day, and hour/minute — and includes:&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Review Documentation:&lt;/strong&gt; AI-driven comments and suggestions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Code Documentation:&lt;/strong&gt; Describes what the code does&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Update Documentation:&lt;/strong&gt; Explains what changed and why&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Custom Prompt Support:&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Extend reviews using your own YAML configuration. You can define prompts, input modes (diff, file, etc.), and outputs (HTML, Markdown, PR comments). Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;prompt&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Summarize&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;the&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;differences."&lt;/span&gt;
  &lt;span class="na"&gt;retrieverKind&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;diff&lt;/span&gt;
  &lt;span class="na"&gt;commentOnPr&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
  &lt;span class="na"&gt;reporters&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;html&lt;/span&gt;
      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;diff-summary&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;markdown&lt;/span&gt;
      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;diff-summary&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Flexible AI Client Integration:&lt;/strong&gt;
Supports Amazon Q Developer CLI by default, but can also run with:&lt;/li&gt;
&lt;li&gt;Amazon Bedrock&lt;/li&gt;
&lt;li&gt;Ollama (locally installed)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;GitHub Action Support:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Fully automatable via GitHub workflows. Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;name: Run code review on PR

on:
  pull_request:
    types: [opened]

jobs:
  run-qreview:
    runs-on: ubuntu-latest
    steps:
      - name: Pull Docker image
        run: docker pull aolb/qreview:latest

      - name: Run the container
        env:
          AI_CLIENT: ${{ secrets.AI_CLIENT }}
          PR_URL: ${{ github.event.pull_request.html_url }}
          GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          AWS_REGION: ${{ secrets.AWS_REGION }}
        run: |
          docker run \
            -e PR_URL="$PR_URL" \
            -e AI_CLIENT="$AI_CLIENT" \
            -e GITHUB_TOKEN="$GITHUB_TOKEN" \
            -e AWS_ACCESS_KEY_ID="$AWS_ACCESS_KEY_ID" \
            -e AWS_SECRET_ACCESS_KEY="$AWS_SECRET_ACCESS_KEY" \
            -e AWS_REGION="$AWS_REGION" \
            aolb/qreview
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Note: Amazon Q Developer CLI currently requires interactive login, so GitHub Action support is limited to Bedrock or other backends unless expanded.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  Possible Future Improvements
&lt;/h3&gt;

&lt;p&gt;This project is already quite powerful, but there are several areas I plan to enhance further:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Improve Code Quality and Refactoring:&lt;/strong&gt;&lt;br&gt;
The tool has grown quickly, and parts of the codebase would benefit from refactoring and better organization. As it continues to evolve, I plan to clean up internal abstractions, enforce stricter typing, and improve test coverage.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Additional Reporter Types:&lt;/strong&gt;&lt;br&gt;
Expand the current HTML and Markdown reporters to include:&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Direct uploads to Amazon S3 for documentation hosting&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Integration with Confluence for team-wide visibility&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Custom API calls to push documentation or review results to internal systems&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Dynamic Documentation Portal:&lt;/strong&gt;&lt;br&gt;
Create a dedicated documentation viewer site with search and filtering by file, time, and type (review, code explanation, change summary). This would make it easier for teams to explore the review history over time.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Better GitHub Integration:&lt;/strong&gt;&lt;br&gt;
Support for more GitHub workflows (e.g., triggered on push or comment), better diff visualization, and inline responses to review comments.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Slack or Other Chat Notifications for Reviews:&lt;/strong&gt;&lt;br&gt;
Add integration with Slack (or similar chat platforms) to send real-time notifications when a new review is completed. This could include summaries, critical suggestions, and direct links to full reports or PR comments — helping teams stay informed and act faster.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Domain-Aware, Agentic AI Reviews:&lt;/strong&gt;&lt;br&gt;
Extend the reviewer with agentic AI capabilities using Retrieval-Augmented Generation (RAG), where reviews can be enhanced by specific domain knowledge or internal documentation. This would allow the tool to not only identify code issues, but also evaluate business logic, validate domain-specific rules, and flag inconsistencies based on proprietary requirements or best practices.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These improvements aim to make the tool even more developer-friendly, team-scalable, and capable of reasoning beyond the code itself.&lt;/p&gt;




&lt;h2&gt;
  
  
  Screenshots
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Command line&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5gczjkbjv0os9kjr3yf4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5gczjkbjv0os9kjr3yf4.png" alt="Command line screenshot"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Running in GitHub action&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu4w2ua41312o64oaaesh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu4w2ua41312o64oaaesh.png" alt="Running in GitHub action screenshot"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Review is done in GitHub action&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr8es1scl77337v2i1tag.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr8es1scl77337v2i1tag.png" alt="Review is done in GitHub action screenshot"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;8 Comment added to the pull request&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0thdearvlxq84g8ti2o6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0thdearvlxq84g8ti2o6.png" alt="8 Comment added to the pull request screenshot"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Example comment&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbuaogg0ew9h4pua5gvi2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbuaogg0ew9h4pua5gvi2.png" alt="Example comment screenshot"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Reports
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Report - menu&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg1h10qcmnlbsit4oon1f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg1h10qcmnlbsit4oon1f.png" alt="Example comment screenshot"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Report - file list&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa93n94gf1ae1v14e1179.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa93n94gf1ae1v14e1179.png" alt="Example comment screenshot"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Report - example&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4sro2zqwxox0srcx5z7v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4sro2zqwxox0srcx5z7v.png" alt="Example comment screenshot"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  How I Used Amazon Q Developer
&lt;/h2&gt;

&lt;p&gt;Amazon Q Developer CLI is at the heart of this project. I used it to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Analyze code diffs and full files using custom prompts&lt;/li&gt;
&lt;li&gt;Extract improvement proposals, summaries, and documentation&lt;/li&gt;
&lt;li&gt;Output structured, reliable feedback in both markdown and HTML&lt;/li&gt;
&lt;li&gt;The Amazon Badrock implementation was done by Q developer, installed in vscode with a prompt like please use the existing interface like ollama and create a Badrock implementation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;After I finished the prototype:&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;I was curious to see if the Q developer could continue implementing features in the system while following the interfaces and code style I had established. I asked Q to create a new reporter that should implement my existing interface—but I didn’t mention this requirement explicitly. I wanted to see if it could figure it out on its own.&lt;/p&gt;

&lt;p&gt;Q not only implemented the feature but also correctly identified that it needed to conform to the existing interface and be added to the existing factory.&lt;/p&gt;

&lt;p&gt;Here is my conversation with Q:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My question&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftw5hnhncwatln6dalod3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftw5hnhncwatln6dalod3.png" alt="Question screenshot"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Modifications&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Famthgkxyd233rrnil11x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Famthgkxyd233rrnil11x.png" alt="Modifications screenshot"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Q Review explanation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4pgqai25d53xbvnfpmk3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4pgqai25d53xbvnfpmk3.png" alt="Explanation screenshot"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;An interesting fact:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I created a pull request with the new code, and the automated AI review highlighted several potential improvements. However, it failed to notice that the code generated by Q had effectively copy-pasted a function from the reference code I provided—but never actually used it. As a result, there was an orphaned function left in the generated code.&lt;/p&gt;

&lt;p&gt;This highlights an important limitation of current AI review tools: while they can catch stylistic issues and suggest optimizations, they may miss higher-level problems like unused or redundant code. It reinforces the need for human oversight—especially when AI-generated contributions are involved.&lt;/p&gt;




&lt;h2&gt;
  
  
  Development Experience and Challenges
&lt;/h2&gt;

&lt;p&gt;What started as a quick automation experiment quickly evolved into a much larger and more powerful tool as new ideas emerged during development — especially around making the system modular, with support for multiple and extendable reporters (e.g., HTML, Markdown, PR comments).&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Challenges:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Aligning Reviews to the Correct Lines in GitHub PRs&lt;/strong&gt;&lt;br&gt;
One of the most complex problems was ensuring that AI-generated comments could be accurately mapped to the correct lines in a Pull Request. Since the AI (Amazon Q or others) may tokenize input, omit blank lines, or slightly reformat code internally, it often drifted from the original structure.&lt;br&gt;
To solve this, I preprocess the full source file (removing blank lines) before feeding it into the model, then carefully map the cleaned lines back to their positions in the raw file. This also includes parsing and respecting the Git diff hunk headers &lt;code&gt;@@ -a,b +c,d @@&lt;/code&gt; to ensure the review appears exactly where intended in the PR.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Handling Incomplete Context in Diffs:&lt;/strong&gt;&lt;br&gt;
Reviewing just the diff often lacked enough context, leading to poor or irrelevant suggestions. I had to design a hybrid approach that uses both the full source file (for context-aware reviews) and the diff (for accurate line mapping and change detection).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Unexpected but Welcome Feedback — From Itself:&lt;/strong&gt;&lt;br&gt;
Once the system was functional, I turned it loose on its own source code. The result? A cascade of inline suggestions and improvement ideas — effectively reviewing and improving itself. This was a rewarding moment that reinforced the value and practical utility of the tool&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What began as a utility has grown into a versatile, self-improving, and extensible code review companion.&lt;/p&gt;

&lt;h2&gt;
  
  
  Local installation guide:
&lt;/h2&gt;

&lt;p&gt;Please use the command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;go install github.com/olbrichattila/qreview@latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Usage:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Review local git changes&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;qreview 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Locally review GitHub Pull request&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;qreview -gitHubPr=&amp;lt;your PR url&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Locally review GitHub Pull request and comment on the PR in GitHub&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;qreview -gitHubPr=&amp;lt;your PR url&amp;gt; -comment
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  GitHub automation installation guide:
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Set Up GitHub Secrets
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;AI_CLIENT=bedrock
FILE_EXTENSIONS=php,go,js  # Add/extend file types to analyze
GH_TOKEN=&amp;lt;your_GitHub_token&amp;gt;  
AWS_ACCESS_KEY_ID=&amp;lt;your_AWS_access_key&amp;gt;  
AWS_SECRET_ACCESS_KEY=&amp;lt;your_AWS_secret_key&amp;gt;  
AWS_REGION=&amp;lt;your_AWS_region&amp;gt;  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Note: Ensure your AWS IAM user has permissions for Amazon Bedrock (anthropic.claude-v2).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ol&gt;
&lt;li&gt;Create GitHub Workflow&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Add this YAML to .github/workflows/code-review.yml:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Automated Code Review on PR&lt;/span&gt;  

&lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;  
  &lt;span class="na"&gt;pull_request&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;  
    &lt;span class="na"&gt;types&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;opened&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;  

&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;  
  &lt;span class="na"&gt;review&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;  
    &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-latest&lt;/span&gt;  
    &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;  
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Pull QReview Docker Image&lt;/span&gt;  
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;docker pull aolb/qreview:latest&lt;/span&gt;  

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Run Code Review&lt;/span&gt;  
        &lt;span class="na"&gt;env&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;  
          &lt;span class="na"&gt;AI_CLIENT&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.AI_CLIENT }}&lt;/span&gt;  
          &lt;span class="na"&gt;FILE_EXTENSIONS&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.FILE_EXTENSIONS }}&lt;/span&gt;  
          &lt;span class="na"&gt;PR_URL&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ github.event.pull_request.html_url }}&lt;/span&gt;  
          &lt;span class="na"&gt;GITHUB_TOKEN&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.GH_TOKEN }}&lt;/span&gt;  
          &lt;span class="na"&gt;AWS_ACCESS_KEY_ID&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.AWS_ACCESS_KEY_ID }}&lt;/span&gt;  
          &lt;span class="na"&gt;AWS_SECRET_ACCESS_KEY&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.AWS_SECRET_ACCESS_KEY }}&lt;/span&gt;  
          &lt;span class="na"&gt;AWS_REGION&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.AWS_REGION }}&lt;/span&gt;  
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;  
          &lt;span class="s"&gt;docker run \  &lt;/span&gt;
            &lt;span class="s"&gt;-e PR_URL="$PR_URL" \  &lt;/span&gt;
            &lt;span class="s"&gt;-e AI_CLIENT="$AI_CLIENT" \  &lt;/span&gt;
            &lt;span class="s"&gt;-e FILE_EXTENSIONS="$FILE_EXTENSIONS" \  &lt;/span&gt;
            &lt;span class="s"&gt;-e GITHUB_TOKEN="$GITHUB_TOKEN" \  &lt;/span&gt;
            &lt;span class="s"&gt;-e AWS_ACCESS_KEY_ID="$AWS_ACCESS_KEY_ID" \  &lt;/span&gt;
            &lt;span class="s"&gt;-e AWS_SECRET_ACCESS_KEY="$AWS_SECRET_ACCESS_KEY" \  &lt;/span&gt;
            &lt;span class="s"&gt;-e AWS_REGION="$AWS_REGION" \  &lt;/span&gt;
            &lt;span class="s"&gt;aolb/qreview  &lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Usage&lt;/strong&gt;&lt;br&gt;
The Pull Request is automatically reviewed when it is created.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Notes:&lt;/strong&gt;&lt;br&gt;
Default model: anthropic.claude-v2 (ensure IAM permissions).&lt;br&gt;
Extend FILE_EXTENSIONS to include other languages as needed.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>awschallenge</category>
      <category>ai</category>
      <category>webdev</category>
    </item>
    <item>
      <title>ExplainMate, the Browser Context Helper AI Extension</title>
      <dc:creator>Attila Olbrich</dc:creator>
      <pubDate>Fri, 09 May 2025 07:44:44 +0000</pubDate>
      <link>https://dev.to/attila_olbrich_ce45a12c58/explainmate-the-browser-context-helper-ai-extension-452j</link>
      <guid>https://dev.to/attila_olbrich_ce45a12c58/explainmate-the-browser-context-helper-ai-extension-452j</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/aws-amazon-q-v2025-04-30"&gt;Amazon Q Developer "Quack The Code" Challenge&lt;/a&gt;: Exploring the Possibilities&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;ExplainMate is a browser extension powered by a Golang backend that uses Amazon Bedrock via Q Developer to explain any selected content on the web. Just highlight the text you want to understand better, right-click, and choose “Explain with AI.” A popup window will appear with an AI-generated explanation you can scroll through — all without leaving the page.&lt;/p&gt;

&lt;p&gt;This project represents a novel use of Amazon Q Developer because it was built entirely with Q — I didn’t write a single line of code myself. I simply provided a todo.txt file with high-level requirements, and Q Developer took care of everything from scaffolding the project to writing backend code, generating the browser extension, and even producing a README.md for setup and usage. This shows the transformative potential of Q Developer for rapid prototyping and AI-driven development.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;📽️ Video Demo – AI Voiceover Included&lt;/p&gt;

&lt;p&gt;&lt;a href="https://youtu.be/d9OXnjJzrzA" rel="noopener noreferrer"&gt;https://youtu.be/d9OXnjJzrzA&lt;/a&gt;&lt;br&gt;
  &lt;iframe src="https://www.youtube.com/embed/d9OXnjJzrzA"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Screenshot
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsw7mrxve2lhcfi51x4rm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsw7mrxve2lhcfi51x4rm.png" alt="https://raw.githubusercontent.com/olbrichattila/explainmate/refs/heads/main/screenshots/explain.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Code Repository
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/olbrichattila/explainmate" rel="noopener noreferrer"&gt;https://github.com/olbrichattila/explainmate&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Used Amazon Q Developer
&lt;/h2&gt;

&lt;p&gt;This project was created entirely through Amazon Q Developer. I began by uploading a plain text file containing my project requirements. From there, Q Developer generated the full project — including backend logic in Golang, the browser extension UI, and supporting configuration files. It even authored the documentation.&lt;/p&gt;

&lt;p&gt;The only manual intervention I needed was when Q Developer hit a timeout while trying to generate icon assets. I prompted it to continue, and eventually the full project was generated.&lt;/p&gt;

&lt;p&gt;This experience was eye-opening. In under 30 minutes, I had a fully functioning prototype — all from a natural-language task list. It made me reflect deeply on how the role of software engineers is shifting. We’re entering an era where working with AI tools like Q Developer will be essential. Rather than writing every line of code manually, developers can now act as architects and collaborators with AI, accelerating delivery while maintaining creative control.&lt;/p&gt;

&lt;p&gt;To share the journey, I’ve included the full conversation thread with Q Developer that led to the final implementation.&lt;/p&gt;




&lt;h2&gt;
  
  
  My todo.txt prompt
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Implement Browser Context Helper Extension

- Build a Chrome extension that allows users to highlight text on a webpage and select “Explain” to generate a detailed explanation.
- Develop a Golang backend that communicates with AWS Bedrock for generating explanations.
- Ensure the backend retrieves AWS security keys from OS environment variables.
- Host the backend on a server (e.g., Amazon EC2 or DigitalOcean droplet).
- Allow users to configure the API endpoint via the extension's settings page.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Conversation with Q Developer
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv4frqge8ivxsfci8hiww.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv4frqge8ivxsfci8hiww.png" alt="https://raw.githubusercontent.com/olbrichattila/explainmate/refs/heads/main/screenshots/explain.png"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fksaxj2w9pzmp353b016m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fksaxj2w9pzmp353b016m.png" alt="https://raw.githubusercontent.com/olbrichattila/explainmate/refs/heads/main/screenshots/explain.png"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fazvq0tsinibdlzkjv0be.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fazvq0tsinibdlzkjv0be.png" alt="https://raw.githubusercontent.com/olbrichattila/explainmate/refs/heads/main/screenshots/explain.png"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Freneq8vckxae8oew46g7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Freneq8vckxae8oew46g7.png" alt="https://raw.githubusercontent.com/olbrichattila/explainmate/refs/heads/main/screenshots/explain.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Full conversation
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;can you put together this project from my todo.txt here?

I'll help you put together the project based on your todo.txt file. Let me first check the contents of that file to understand what needs to be done.

I'll help you implement this Browser Context Helper Extension project. Based on your todo.txt, we need to create:

A Chrome extension with text highlighting and explanation functionality

A Golang backend that uses AWS Bedrock

Configuration options for the extension

Let's start by setting up the project structure and implementing each component:

Let's create the project structure. I'll start by setting up the backend and then the Chrome extension.

Creating a README.md file to document the project structure, setup instructions, and usage.

Creating the main project directories for the backend and extension components.

Now, let's implement the backend first:

Creating the main Go backend file that handles API requests and communicates with AWS Bedrock.

Creating the go.mod file to define the Go module and its dependencies.

Now, let's create the Chrome extension files:

Creating the manifest.json file that defines the Chrome extension properties and permissions.

Creating the images directory for the extension icons.

Creating the background.js file that handles context menu creation and API communication.

Creating the content.js file that handles displaying the explanation popup on the webpage.

Creating the popup.html file that displays when the user clicks the extension icon.

Creating the popup.js file that handles popup button interactions.

Creating the options.html file that allows users to configure the extension settings.

Creating the options.js file that handles saving and loading extension settings.

Creating a Dockerfile for the backend to facilitate deployment to servers like EC2 or DigitalOcean.

Creating a placeholder 16x16 icon for the extension.

Creating a placeholder 48x48 icon for the extension.

You took too long to respond - try to split up the work into smaller steps. Do not apologize.

I'll continue implementing the project in smaller steps. Let's create the remaining icon file:

You took too long to respond - try to split up the work into smaller steps. Do not apologize.

You took too long to respond - try to split up the work into smaller steps. Do not apologize.

You took too long to respond - try to split up the work into smaller steps. Do not apologize.

I'll continue implementing the project in smaller steps. Let's check what we've created so far and then add the remaining files.

You took too long to respond - try to split up the work into smaller steps. Do not apologize.

You took too long to respond - try to split up the work into smaller steps. Do not apologize.

Response timed out - message took too long to generate

can you continue where you left off with ExplainMate is a browser extension powered by AI that helps you understand and explain content directly within your web browser context.

You took too long to respond - try to split up the work into smaller steps. Do not apologize.

Response timed out - message took too long to generate

Response timed out - message took too long to generate

Please try to continue again

Response timed out - message took too long to generate

can you continue?

You took too long to respond - try to split up the work into smaller steps. Do not apologize.

Response timed out - message took too long to generate

I can see you always have a response timeout and it is probably the icon file generation. Can you continue generating the scrpts and I will sort out the iconds manually later?

Response timed out - message took too long to generate

I can see you always have a response timeout and it is probably the icon file generation. Can you continue generating the scrpts and I will sort out the iconds manually later?

Response timed out - message took too long to generate

I can see you always have a response timeout and it is probably the icon file generation.
Can you continue generating the scrpts and I will sort out the iconds manually later?

Response timed out - message took too long to generate

Can you continue generating the scrpts and I will sort out the iconds manually later, or ask you later?

Response timed out - message took too long to generate

What does it mean when you say ersponse timed out, can i do something to fix it in my Ide VsCode?

Response timed out - message took too long to generate


---

You left off my code generatin with response timeout, can we prioritize generating the rest of the script and leage the icons to the end?

I'll prioritize generating the rest of the script for your browser extension. Let me first check what files we have in the project to understand the structure.

Let me check the backend code first to understand what we're working with:

Now I'll create the missing icon128.png file. Let me first check if there's a todo.txt file that might have more information:

Now I'll create the missing icon128.png file:

Creating a placeholder icon128.png file for the Chrome extension

Based on the files I've examined, I can see that most of the extension is already implemented, but we need to complete a few things. Let me prioritize generating the remaining scripts for your browser extension.

Let me enhance the content.js file to improve the explanation popup functionality:

Enhancing the content.js file with improved popup styling, error handling, draggable functionality, and better content formatting

Enhancing the background.js file with improved error handling, health check functionality, and direct explanation requests from popup

Enhancing the popup.html file with improved styling, direct input functionality, API status indicator, and loading spinner

Enhancing the popup.js file with API status checking, direct explanation functionality, and improved result formatting

Enhancing the options.js file with connection testing, input validation, and reset functionality

Enhancing the options.html file with improved styling, connection testing button, reset functionality, and setup information

Enhancing the README.md file with more comprehensive documentation including features, deployment options, security considerations, and troubleshooting

Great! I've completed the implementation of your Browser Context Helper extension. Here's a summary of what I've done:

Enhanced Content Script (content.js):

Improved the explanation popup with better styling

Added draggable functionality to the popup

Improved error handling and content formatting

Added a footer with "Powered by AWS Bedrock" text

Enhanced Background Script (background.js):

Added better error handling for API requests

Implemented health check functionality to verify API status

Added support for direct explanation requests from the popup

Enhanced Popup UI (popup.html/js):

Added direct text input functionality for quick explanations

Implemented API status indicator to show backend connectivity

Added loading spinner during API requests

Improved styling and user experience

Enhanced Options Page (options.html/js):

Added connection testing functionality

Implemented input validation for API endpoint

Added reset to default functionality

Improved styling and added setup information

Updated README.md:

Added comprehensive documentation

Included features list, deployment options

Added security considerations and troubleshooting sections

Created Icon128.png:

Added the missing icon file for the extension

All the core functionality is now implemented and should work as expected. The extension allows users to:

Highlight text on any webpage and get AI-powered explanations

Input text directly in the popup for quick explanations

Configure the API endpoint to connect to their backend

Check the API status to ensure connectivity

To use the extension:

Start the Go backend server

Load the extension in Chrome

Highlight text on any webpage and right-click to select "Explain with AI"

View the explanation in the popup

Is there anything specific you'd like me to explain or any other features you'd like to add to the extension?

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Readme generated by Q developer:
&lt;/h2&gt;

&lt;p&gt;A Chrome extension that allows users to highlight text on a webpage and get AI-powered explanations using AWS Bedrock.&lt;/p&gt;

&lt;h2&gt;
  
  
  Components
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Chrome Extension&lt;/strong&gt;: Frontend that allows users to highlight text and request explanations&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Golang Backend&lt;/strong&gt;: Server that processes requests and communicates with AWS Bedrock&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Setup Instructions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Backend Setup
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Ensure you have Go installed on your system&lt;/li&gt;
&lt;li&gt;Set the required AWS environment variables:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   export AWS_ACCESS_KEY_ID=your_access_key
   export AWS_SECRET_ACCESS_KEY=your_secret_key
   export AWS_REGION=your_aws_region
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Navigate to the &lt;code&gt;backend&lt;/code&gt; directory&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;go mod tidy&lt;/code&gt; to install dependencies&lt;/li&gt;
&lt;li&gt;Start the server with &lt;code&gt;go run main.go&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Chrome Extension Setup
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Open Chrome and navigate to &lt;code&gt;chrome://extensions/&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Enable "Developer mode" (toggle in the top-right corner)&lt;/li&gt;
&lt;li&gt;Click "Load unpacked" and select the &lt;code&gt;extension&lt;/code&gt; directory&lt;/li&gt;
&lt;li&gt;Configure the API endpoint in the extension settings&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Usage
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Highlight text on any webpage&lt;/li&gt;
&lt;li&gt;Right-click and select "Explain with AI"&lt;/li&gt;
&lt;li&gt;View the explanation in the popup window&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Features
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Highlight text on any webpage and get AI-powered explanations&lt;/li&gt;
&lt;li&gt;Direct input in the extension popup for quick explanations&lt;/li&gt;
&lt;li&gt;Configurable API endpoint for connecting to your backend&lt;/li&gt;
&lt;li&gt;Draggable explanation popup on webpages&lt;/li&gt;
&lt;li&gt;API status indicator to check backend connectivity&lt;/li&gt;
&lt;li&gt;Responsive and user-friendly interface&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Backend Deployment
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Local Development
&lt;/h3&gt;

&lt;p&gt;Run the backend locally for testing:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd backend
go run main.go
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Docker Deployment
&lt;/h3&gt;

&lt;p&gt;Build and run using Docker:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd backend
docker build -t browser-helper-backend .
docker run -p 8080:8080 -e AWS_ACCESS_KEY_ID=your_key -e AWS_SECRET_ACCESS_KEY=your_secret -e AWS_REGION=your_region browser-helper-backend
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Cloud Deployment
&lt;/h3&gt;

&lt;p&gt;The backend can be deployed to AWS EC2, ECS, or any other cloud provider that supports Docker containers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Security Considerations
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The extension communicates with your backend server, which should be secured with HTTPS in production&lt;/li&gt;
&lt;li&gt;AWS credentials should be stored securely and never exposed in client-side code&lt;/li&gt;
&lt;li&gt;Consider implementing authentication for the API in production environments&lt;/li&gt;
&lt;li&gt;Review AWS IAM permissions to ensure least privilege access to Bedrock services&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Troubleshooting
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;If the extension shows "API is offline", check that your backend server is running&lt;/li&gt;
&lt;li&gt;Verify AWS credentials are correctly set in your environment&lt;/li&gt;
&lt;li&gt;Check browser console for any JavaScript errors&lt;/li&gt;
&lt;li&gt;Ensure the API endpoint in extension settings matches your backend server address&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  License
&lt;/h2&gt;

&lt;p&gt;This project is licensed under the MIT License - see the LICENSE file for details.# explainmate&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>awschallenge</category>
      <category>ai</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Another Space Invader game in Golang, WebAssembly</title>
      <dc:creator>Attila Olbrich</dc:creator>
      <pubDate>Sun, 27 Apr 2025 14:50:34 +0000</pubDate>
      <link>https://dev.to/attila_olbrich_ce45a12c58/another-space-invader-game-in-golang-webassembly-562</link>
      <guid>https://dev.to/attila_olbrich_ce45a12c58/another-space-invader-game-in-golang-webassembly-562</guid>
      <description>&lt;h2&gt;
  
  
  Alibaba cloud game challenge
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;This is a submission for the &lt;a href="https://int.alibabacloud.com/m/1000402443/" rel="noopener noreferrer"&gt;Alibaba Cloud&lt;/a&gt; Challenge: &lt;a href="https://dev.to/challenges/alibaba"&gt;Build a Web Game&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  First, The credits:
&lt;/h2&gt;

&lt;p&gt;For images and sound, the credit goes to &lt;a href="https://opengameart.org/" rel="noopener noreferrer"&gt;https://opengameart.org/&lt;/a&gt;, the open source game art community, I could not do it in time without them!&lt;/p&gt;




&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;You are stationed in a hidden facility on your home planet, controlling a robot remotely.&lt;br&gt;
Your mission is to defend the planet against alien invaders descending from the skies and launching bombs.&lt;br&gt;
Dodge the falling bombs and shoot down the enemies before they reach the surface.&lt;/p&gt;

&lt;p&gt;The invasion intensifies over time — if you lose all your lives or the invaders manage to land, the game ends.&lt;/p&gt;




&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;Please note that the game is designed to work on a computer; mobile devices are not supported, and some old machines may not work due to a lack of Opengl support.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://gamechallange.attilaolbrich.co.uk/invader/index.html" rel="noopener noreferrer"&gt;https://gamechallange.attilaolbrich.co.uk/invader/index.html&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Screenshots
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe63mnpoopt6u3qyraxx3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe63mnpoopt6u3qyraxx3.png" alt="Opening page" width="639" height="471"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbxtt666pd5gd308aem9u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbxtt666pd5gd308aem9u.png" alt="Opening page" width="639" height="471"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdl96jy56fxovan1fsnk1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdl96jy56fxovan1fsnk1.png" alt="Opening page" width="639" height="471"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Alibaba Cloud Services Implementation
&lt;/h2&gt;

&lt;p&gt;My game is written entirely in Golang and compiled to WebAssembly (WASM) to run directly in the browser. Since I work with Golang professionally on backend systems, I thought—why not build a game with it too? To support the gameplay, I wrote a lightweight Golang-based API that handles storing and retrieving scores, including listing the top 10 leaderboard entries.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Planned Architecture Using Alibaba Cloud Services&lt;/strong&gt;&lt;br&gt;
Initially, the infrastructure I planned for the game made use of the following Alibaba Cloud services:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Object Storage Service (OSS)&lt;/strong&gt;&lt;br&gt;
Used to host static assets such as the HTML, WASM, JavaScript, and image files.&lt;br&gt;
Why OSS? OSS offers a scalable, high-performance storage option and can easily integrate with a CDN for faster delivery worldwide.&lt;br&gt;
Integration Experience: The setup wasn’t as seamless as expected. OSS forces static files like HTML to be downloaded instead of rendered in the browser unless a custom domain is configured with HTTPS, which wasn’t obvious during setup. I had to dig through documentation to understand this behavior.&lt;br&gt;
Challenge: I didn’t want to register a custom domain just for HTTPS, so this created friction during deployment.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;CDN + OSS&lt;/strong&gt;&lt;br&gt;
I had planned to serve images via the Alibaba Cloud CDN connected to OSS.&lt;br&gt;
Benefit: Faster asset delivery with minimal latency.&lt;br&gt;
Challenge: Due to the OSS hosting limitation mentioned above, I didn’t proceed with the CDN as originally planned.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Function Compute (FC)&lt;/strong&gt;&lt;br&gt;
The Golang API was designed to run as a Serverless Function Compute.&lt;br&gt;
Why Function Compute? It was a good fit for the small, stateless HTTP endpoints of the score API. Serverless meant simplified scaling and reduced maintenance overhead.&lt;br&gt;
Challenge: I encountered limitations with the free tier or trial—either I didn’t receive the trial credit or it was extremely restricted. Cost estimates showed that using FC + managed services would exceed hundreds of dollars/month, which is not feasible for a personal, non-commercial game. This issue was echoed by several developers in Alibaba Cloud’s discussion forums.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;ApsaraDB for PostgreSQL&lt;/strong&gt;&lt;br&gt;
Intended for storing game scores in a managed relational database.&lt;br&gt;
Why ApsaraDB? It offered managed backups, security, and scalability, aligning with my professional stack.&lt;br&gt;
Challenge: Same as above—cost and trial limitations made it impractical to use for a personal project.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Elastic Compute Service (ECS)&lt;/strong&gt;&lt;br&gt;
As a backup plan, I experimented with ECS to run everything in a containerized setup.&lt;br&gt;
Challenge: Strangely, the ECS instance I tested performed significantly slower compared to equivalent instances on another cloud provider—around 20x slower. I couldn’t identify the cause, but it made testing very sluggish and affected the user experience.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Final Setup Due to Cost Constraints&lt;/strong&gt;
Due to the challenges around cost and configuration, I settled on a minimal paid setup using:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Alibaba Cloud ECS&lt;/strong&gt;* (Elastic Compute Service) – $11/month for the smallest instance&lt;/p&gt;

&lt;p&gt;Hosting the entire stack:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;WebAssembly game (HTML, JS, WASM, images)&lt;/li&gt;
&lt;li&gt;Golang HTTP API&lt;/li&gt;
&lt;li&gt;PostgreSQL database (all in a single Docker container)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This allowed me to maintain full control over hosting while staying within budget. It also made HTTPS straightforward to configure with a reverse proxy.&lt;/p&gt;




&lt;h2&gt;
  
  
  Game Development Highlights
&lt;/h2&gt;

&lt;p&gt;Interesting Aspects of Development&lt;/p&gt;

&lt;p&gt;I decided to move forward with this game at the last minute after the deadline was extended, so the time pressure is definitely reflected in the code — which is publicly available here: &lt;a href="https://github.com/olbrichattila/goinvader" rel="noopener noreferrer"&gt;https://github.com/olbrichattila/goinvader&lt;/a&gt;.&lt;br&gt;
I had previously experimented with Golang and WebAssembly, so I already had the basics in place — sprite management, sound handling, and keyboard navigation were ready to go. For this project, I mainly needed to focus on implementing the gameplay itself.&lt;/p&gt;

&lt;p&gt;Putting everything together into a complete, playable game in a short amount of time was definitely a challenge. Although the code was assembled rather quickly under time pressure — and could definitely benefit from some cleanup and polish — I'm proud that I managed to complete and submit it by the last day of the competition. Despite the rush, seeing it all come together into a working game is something I’m genuinely proud of.&lt;/p&gt;

</description>
      <category>alibabachallenge</category>
      <category>devchallenge</category>
      <category>gamedev</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Test your memory, a simple game!</title>
      <dc:creator>Attila Olbrich</dc:creator>
      <pubDate>Sat, 26 Apr 2025 16:15:58 +0000</pubDate>
      <link>https://dev.to/attila_olbrich_ce45a12c58/test-your-memory-a-simple-game-1kkf</link>
      <guid>https://dev.to/attila_olbrich_ce45a12c58/test-your-memory-a-simple-game-1kkf</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://int.alibabacloud.com/m/1000402443/" rel="noopener noreferrer"&gt;Alibaba Cloud&lt;/a&gt; Challenge: &lt;a href="https://dev.to/challenges/alibaba"&gt;Build a Web Game&lt;/a&gt;.&lt;/em&gt;*&lt;/p&gt;




&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;Here's another game I've made, and it's a simpler one.&lt;/p&gt;

&lt;p&gt;This is a classic memory game where a robot shuffles your cards. Each card features the name of an Alibaba Cloud service, such as &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ECS,&lt;/li&gt;
&lt;li&gt;Function Compute&lt;/li&gt;
&lt;li&gt;OSS&lt;/li&gt;
&lt;li&gt;EBS&lt;/li&gt;
&lt;li&gt;CDN&lt;/li&gt;
&lt;li&gt;ApsaraDB&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your goal is to find matching pairs by clicking to flip the cards.&lt;br&gt;
Cards will automatically flip back after one second. If you flip more than two cards within that second — even if you found a matching pair&lt;br&gt;
— the move is considered invalid. When you successfully match two cards, they will remain face-up and become unclickable. Once you match all the pairs, your completion time will be recorded, and you can enter your name to appear on the top score board. The faster your time, the higher your ranking. &lt;/p&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;




&lt;h3&gt;
  
  
  Screenshots
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd4gs0pd0hrw2n1vrer0j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd4gs0pd0hrw2n1vrer0j.png" alt="Screenshot intro" width="800" height="570"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8j4m4g8eap9gtrf0ff7o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8j4m4g8eap9gtrf0ff7o.png" alt="Screenshot game" width="800" height="570"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://gamechallange.attilaolbrich.co.uk/" rel="noopener noreferrer"&gt;https://gamechallange.attilaolbrich.co.uk/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Source code:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/olbrichattila/alimemo" rel="noopener noreferrer"&gt;https://github.com/olbrichattila/alimemo&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Alibaba Cloud Services Implementation
&lt;/h2&gt;

&lt;p&gt;After registering to Alibaba Cloud using the provided link, I unfortunately did not receive the free trial credit, even though this was my first time trying Alibaba Cloud. Despite this, I decided to purchase the necessary services myself, and, due to budget considerations, I opted for a simple and low-cost setup.&lt;/p&gt;

&lt;p&gt;I chose Object Storage Service (OSS) to host the static assets of the game. I linked it to a subdomain of my personal website using a CNAME record. For SSL, I manually created a TXT record to verify and issue a certificate via Let's Encrypt.&lt;/p&gt;

&lt;p&gt;The game itself is built with ReactJS, while a small Golang HTTP API provides the backend for storing and listing high scores. This backend is deployed on an Elastic Compute Service (ECS) virtual machine, along with a PostgreSQL database, all running inside Docker containers.&lt;/p&gt;

&lt;p&gt;In fact, this is the same API I used for another game I submitted here a few days ago (the AliRobo Tunnel Golang WASM game), but with different tables for each game.&lt;/p&gt;




&lt;h2&gt;
  
  
  Game Development Highlights
&lt;/h2&gt;

&lt;p&gt;This game started as a quick idea — I thought, why not create another one?&lt;br&gt;
Since it’s a simple concept, there were no major hurdles. I built the game in ReactJS, and the whole process, including deployment, was completed in just a few hours.&lt;/p&gt;

&lt;h2&gt;
  
  
  Credit for images: generated with Bing Copilot AI.
&lt;/h2&gt;

</description>
      <category>alibabachallenge</category>
      <category>devchallenge</category>
      <category>gamedev</category>
      <category>webdev</category>
    </item>
    <item>
      <title>AliRobo: The Go-Powered Game with Wasm</title>
      <dc:creator>Attila Olbrich</dc:creator>
      <pubDate>Mon, 21 Apr 2025 20:47:53 +0000</pubDate>
      <link>https://dev.to/attila_olbrich_ce45a12c58/alirobo-the-go-powered-game-with-wasm-3bac</link>
      <guid>https://dev.to/attila_olbrich_ce45a12c58/alirobo-the-go-powered-game-with-wasm-3bac</guid>
      <description>&lt;p&gt;&lt;strong&gt;This is a submission for the &lt;a href="https://int.alibabacloud.com/m/1000402443/" rel="noopener noreferrer"&gt;Alibaba Cloud&lt;/a&gt; Challenge: &lt;a href="https://dev.to/challenges/alibaba"&gt;Build a Web Game&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  First, The credits:
&lt;/h2&gt;

&lt;p&gt;For images credit goes to &lt;a href="https://opengameart.org/" rel="noopener noreferrer"&gt;https://opengameart.org/&lt;/a&gt;, the open source game art community, I could not do it in time without them!&lt;/p&gt;




&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;In this game, you play as a shape-shifting ethical hacker robot on a mission assigned by your boss. Your objective is to use social engineering tactics to infiltrate eight different server rooms located in a secret underground facility.&lt;/p&gt;

&lt;p&gt;Navigate the maze of tunnels and ladders using the arrow keys. Your first goal is to locate all the office rooms.&lt;br&gt;
If an office has an employee moving around, you must first shape-shift into a human form by pressing the S key. Be aware that if you move afterward, you will revert to your original robot form. Wait for the employee to come close, then press the Shift key to interact. This represents a social engineering attempt where you claim to be an engineer who forgot their access badge. If successful, you’ll receive a new badge, and a corresponding server room icon will appear, indicating the type of server room the badge grants access to.&lt;/p&gt;

&lt;p&gt;Some offices won’t have employees but will contain a computer on a desk. Approach the computer and press the Space bar to collect a password. This simulates the ethical hacker discovering an unattended, unlocked machine and retrieving credentials from it.&lt;br&gt;
Once you’ve collected all the badges, they will begin to flash, signaling that you are now ready to locate and access the server rooms on levels -5 and -6.&lt;/p&gt;

&lt;p&gt;Each server room requires the correct badge to enter. The type of server room is indicated by an icon displayed near the door, representing different Alibaba services. You must recognize the correct icon and use the corresponding badge. You have three attempts per room—after that, you’ll lose a life.&lt;br&gt;
Successfully entering a server room allows you to continue to the next one.&lt;/p&gt;

&lt;p&gt;After infiltrating all server rooms, return to the starting room, where your boss is waiting. If all server rooms have been accessed, your mission is complete. This final step symbolizes reporting your findings to your boss so they can initiate appropriate security training.&lt;/p&gt;

&lt;p&gt;If for the specific room available and you're inside a room and unsure what to do, press the H key to receive a hint—provided the room has special rules or tasks.&lt;/p&gt;




&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;Please note that the game is designed to work on a computer; mobile devices are not supported, and some old machines may not work due to a lack of Opengl support.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://fast.alirobo.fun" rel="noopener noreferrer"&gt;https://fast.alirobo.fun&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Screenshots
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzi0k9q04myp3slzdy581.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzi0k9q04myp3slzdy581.png" alt="Opening page" width="800" height="452"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftq9nr3s4hlsvcnjg5ess.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftq9nr3s4hlsvcnjg5ess.png" alt="Opening page" width="800" height="452"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkk3p4cb5lrm9kijhh8yc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkk3p4cb5lrm9kijhh8yc.png" alt="Opening page" width="800" height="452"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flr9hjy5puhpck22izhn5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flr9hjy5puhpck22izhn5.png" alt="Opening page" width="800" height="452"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn7lfp2eejv8sn1ibcf30.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn7lfp2eejv8sn1ibcf30.png" alt="Opening page" width="800" height="452"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqvz6hn2thjs22mpu2nll.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqvz6hn2thjs22mpu2nll.png" alt="Opening page" width="800" height="452"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Alibaba Cloud Services Implementation
&lt;/h2&gt;

&lt;p&gt;My game is written entirely in Golang and compiled to WebAssembly (WASM) to run directly in the browser. Since I work with Golang professionally on backend systems, I thought—why not build a game with it too? To support the gameplay, I wrote a lightweight Golang-based API that handles storing and retrieving scores, including listing the top 10 leaderboard entries.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Planned Architecture Using Alibaba Cloud Services&lt;/strong&gt;&lt;br&gt;
Initially, the infrastructure I planned for the game made use of the following Alibaba Cloud services:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Object Storage Service (OSS)&lt;/strong&gt;&lt;br&gt;
Used to host static assets such as the HTML, WASM, JavaScript, and image files.&lt;br&gt;
Why OSS? OSS offers a scalable, high-performance storage option and can easily integrate with a CDN for faster delivery worldwide.&lt;br&gt;
Integration Experience: The setup wasn’t as seamless as expected. OSS forces static files like HTML to be downloaded instead of rendered in the browser unless a custom domain is configured with HTTPS, which wasn’t obvious during setup. I had to dig through documentation to understand this behavior.&lt;br&gt;
Challenge: I didn’t want to register a custom domain just for HTTPS, so this created friction during deployment.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;CDN + OSS&lt;/strong&gt;&lt;br&gt;
I had planned to serve images via the Alibaba Cloud CDN connected to OSS.&lt;br&gt;
Benefit: Faster asset delivery with minimal latency.&lt;br&gt;
Challenge: Due to the OSS hosting limitation mentioned above, I didn’t proceed with the CDN as originally planned.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Function Compute (FC)&lt;/strong&gt;&lt;br&gt;
The Golang API was designed to run as a Serverless Function Compute.&lt;br&gt;
Why Function Compute? It was a good fit for the small, stateless HTTP endpoints of the score API. Serverless meant simplified scaling and reduced maintenance overhead.&lt;br&gt;
Challenge: I encountered limitations with the free tier or trial—either I didn’t receive the trial credit or it was extremely restricted. Cost estimates showed that using FC + managed services would exceed hundreds of dollars/month, which is not feasible for a personal, non-commercial game. This issue was echoed by several developers in Alibaba Cloud’s discussion forums.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;ApsaraDB for PostgreSQL&lt;/strong&gt;&lt;br&gt;
Intended for storing game scores in a managed relational database.&lt;br&gt;
Why ApsaraDB? It offered managed backups, security, and scalability, aligning with my professional stack.&lt;br&gt;
Challenge: Same as above—cost and trial limitations made it impractical to use for a personal project.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Elastic Compute Service (ECS)&lt;/strong&gt;&lt;br&gt;
As a backup plan, I experimented with ECS to run everything in a containerized setup.&lt;br&gt;
Challenge: Strangely, the ECS instance I tested performed significantly slower compared to equivalent instances on another cloud provider—around 20x slower. I couldn’t identify the cause, but it made testing very sluggish and affected the user experience.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Final Setup Due to Cost Constraints&lt;/strong&gt;
Due to the challenges around cost and configuration, I settled on a minimal paid setup using:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Object Storage Service&lt;/strong&gt;*&lt;br&gt;
I linked it to a subdomain of my personal website using a CNAME record. For SSL, I manually created a TXT record to verify and issue a certificate via Let's Encrypt.&lt;br&gt;
&lt;strong&gt;&lt;em&gt;WebAssembly game (HTML, JS, WASM, images)&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Alibaba Cloud ECS&lt;/strong&gt;* (Elastic Compute Service) – $11/month for the smallest instance&lt;/p&gt;

&lt;p&gt;Hosting the API&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Golang HTTP API&lt;/li&gt;
&lt;li&gt;PostgreSQL database (all in a single Docker container)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This allowed me to maintain full control over hosting while staying within budget. It also made HTTPS straightforward to configure with a reverse proxy.&lt;/p&gt;




&lt;h2&gt;
  
  
  Game Development Highlights
&lt;/h2&gt;

&lt;p&gt;Interesting Aspects of Development&lt;br&gt;
I decided to move forward with this game at the last minute after the deadline was extended, so the time pressure is definitely reflected in the code — which is publicly available here: &lt;a href="https://github.com/olbrichattila/alirobo" rel="noopener noreferrer"&gt;https://github.com/olbrichattila/alirobo&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This was my first game written in Go, and it was a great opportunity to experiment with the Ebiten framework. Throughout development, I learned a lot about rendering, sprite handling, game loop logic, and behavioral interactions within a game context.&lt;/p&gt;

&lt;p&gt;One unexpected challenge I ran into was compatibility issues with older Windows machines, particularly due to OpenGL limitations that Ebiten relies on. It was an eye-opener in terms of how graphics APIs can affect cross-platform support.&lt;/p&gt;

&lt;p&gt;Despite the time crunch and hurdles, I'm proud of how much I was able to build in such a short time and how I pushed Go beyond backend development into the realm of browser-based gaming.&lt;/p&gt;

</description>
      <category>alibabachallenge</category>
      <category>devchallenge</category>
      <category>gamedev</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
