<?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: Sunil Kommuri</title>
    <description>The latest articles on DEV Community by Sunil Kommuri (@sunil_kommuri_c8ded1b4c5a).</description>
    <link>https://dev.to/sunil_kommuri_c8ded1b4c5a</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%2F3193095%2F9b7a72e1-64dc-49bd-a73e-44eedd9b5866.jpg</url>
      <title>DEV Community: Sunil Kommuri</title>
      <link>https://dev.to/sunil_kommuri_c8ded1b4c5a</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sunil_kommuri_c8ded1b4c5a"/>
    <language>en</language>
    <item>
      <title>From Zero to AI-Powered Portfolio in 7 Days: My Storyblok Challenge Submission</title>
      <dc:creator>Sunil Kommuri</dc:creator>
      <pubDate>Sun, 22 Jun 2025 00:50:50 +0000</pubDate>
      <link>https://dev.to/sunil_kommuri_c8ded1b4c5a/from-zero-to-ai-powered-portfolio-in-7-days-my-storyblok-challenge-submission-9j6</link>
      <guid>https://dev.to/sunil_kommuri_c8ded1b4c5a/from-zero-to-ai-powered-portfolio-in-7-days-my-storyblok-challenge-submission-9j6</guid>
      <description>&lt;p&gt;When I first saw the Storyblok Headless CMS Challenge on DEV, I saw it as more than a contest; it was a personal challenge. With a goal of learning headless CMS architecture from scratch, I set out to build a professional portfolio that was not only visually appealing but also packed with modern features that a senior developer would be proud of.&lt;/p&gt;

&lt;p&gt;This post documents my week-long journey of intense learning, debugging, building, and ultimately, creating something I'm incredibly proud to share.&lt;/p&gt;

&lt;p&gt;The Final Project: A Feature-Rich Portfolio &amp;amp; Blog&lt;br&gt;
My final project is a complete, multi-page portfolio and blog, built with a fully decoupled architecture using Next.js for the frontend and Storyblok for the headless CMS. Every piece of content, from the hero text to the footer, is fully editable through Storyblok's amazing Visual Editor.&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%2Fggjxbeopblsbqx2v2fjd.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%2Fggjxbeopblsbqx2v2fjd.png" alt="Image description" width="800" height="383"&gt;&lt;/a&gt;&lt;br&gt;
Dynamic, Component-Based Homepage: Built with a suite of custom Storyblok components including a Hero, About Me, a grid of my technical Skills, a list of my Projects, and a Footer.&lt;br&gt;
Full-Featured Blog: Includes a main listing page (/blog) and dynamically-routed individual post pages (/blog/[slug]) powered by Next.js's Incremental Static Regeneration (getStaticProps and getStaticPaths).&lt;br&gt;
Professional UX &amp;amp; Polish: Features a clean, responsive design, a sticky navigation bar, and subtle animations on page elements using Framer Motion for a smooth user experience.&lt;br&gt;
The Standout Feature: An "Amazing AI" Assistant: To compete for the AI prize, I built a genuinely useful tool to solve a problem I face myself: writing concise summaries for my articles.&lt;br&gt;
The AI Assistant: How it Works&lt;br&gt;
This was the most challenging and rewarding part of the project. I built a dedicated /assistant page that leverages the OpenAI API to automatically generate summaries for blog posts.&lt;br&gt;
The process involves:&lt;/p&gt;

&lt;p&gt;A simple frontend on the /assistant page where I can paste my full blog post text.&lt;br&gt;
A secure backend API route in Next.js (/api/generate-summary) that receives the text.&lt;br&gt;
This API route calls the OpenAI GPT-3.5 Turbo model with a specific prompt instructing it to act as an expert content editor.&lt;br&gt;
The generated summary is sent back to the frontend, ready to be copied and pasted directly into the summary field in Storyblok, dramatically speeding up my content creation workflow.&lt;br&gt;
My Tech Stack&lt;br&gt;
Frontend: Next.js / React&lt;br&gt;
Headless CMS: Storyblok&lt;br&gt;
Deployment: Vercel&lt;br&gt;
Styling: Global CSS&lt;br&gt;
Animation: Framer Motion&lt;br&gt;
Syntax Highlighting: PrismJS&lt;br&gt;
AI: OpenAI API&lt;br&gt;
My Biggest Challenges &amp;amp; "Aha!" Moments&lt;br&gt;
This journey was filled with real-world development challenges.&lt;/p&gt;

&lt;p&gt;The HTTPS Proxy: The biggest initial hurdle was connecting my local http server to the secure https Storyblok editor. Solving this required setting up a local SSL proxy, which was a fantastic lesson in web security and networking.&lt;br&gt;
The Stubborn CSS Bug: I spent hours debugging a styling issue where my CSS file was loaded, but the styles weren't applying. After methodically testing every part of the chain—from the file structure, to the import path, to the browser cache, to finally inspecting the browser's loaded sources—we found the culprit: a single, invisible typo in an import path. This taught me the immense value of being systematic in debugging.&lt;br&gt;
Why I Enjoyed Using Storyblok&lt;br&gt;
The Visual Editor is a game-changer. Being able to build reusable components in my code and then use them like Lego bricks to visually construct pages is incredibly powerful. Seeing content changes reflect instantly on my local development server without a page refresh made the entire development process faster and more intuitive.&lt;/p&gt;

&lt;p&gt;Conclusion&lt;br&gt;
This week has been an incredible learning experience. I went from having a concept to a fully deployed, feature-rich, AI-powered web application. This project is now the centerpiece of my own portfolio, and the skills I learned are invaluable. Thank you to DEV and Storyblok for this amazing opportunity!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/sunilkommiri/storyblok-portfolio" rel="noopener noreferrer"&gt;https://github.com/sunilkommiri/storyblok-portfolio&lt;/a&gt;&lt;/p&gt;

</description>
      <category>storyblokchallenge</category>
      <category>devchallenge</category>
      <category>webdev</category>
      <category>ai</category>
    </item>
    <item>
      <title>Building a Packed Memory Match Game with PyGame &amp; Exploring AI-Powered Development with Amazon Q CLI</title>
      <dc:creator>Sunil Kommuri</dc:creator>
      <pubDate>Wed, 21 May 2025 23:21:42 +0000</pubDate>
      <link>https://dev.to/sunil_kommuri_c8ded1b4c5a/building-a-packed-memory-match-game-with-pygame-exploring-ai-powered-development-with-amazon-q-4ff0</link>
      <guid>https://dev.to/sunil_kommuri_c8ded1b4c5a/building-a-packed-memory-match-game-with-pygame-exploring-ai-powered-development-with-amazon-q-4ff0</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;br&gt;
Remember those classic memory match games? Flip two cards, find a pair, and clear the board! In this post, we'll dive into a modern take on this beloved game, built from scratch using Python and the versatile PyGame library. We'll explore its cool features, walk through some key code components, and then take a detour into the exciting world of AI-assisted development by looking at what Amazon Q CLI is and how you might set it up, imagining how it could supercharge such a project&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Supercharging Development: What is Amazon Q CLI?&lt;/strong&gt;&lt;br&gt;
Now, imagine you're building this game, or any software project. Sometimes you hit a snag, need to understand a new library, or want to generate some boilerplate code. This is where AI-powered assistants like Amazon Q come in Amazon Q is a generative AI-powered assistant from AWS designed to help with a wide range of business and development tasks. It can understand your questions, provide information, generate content, and even take actions based on your existing enterprise data and systems.&lt;br&gt;
The Amazon Q CLI (Command Line Interface) would be a way to interact with Amazon Q's capabilities directly from your terminal. While a universally named "Amazon Q CLI" for all Q features might evolve, developers often interact with Q capabilities through existing AWS CLIs or specific service CLIs (like those related to Amazon CodeWhisperer, which is now part of Amazon Q).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Configuring an AWS CLI for Q Capabilities&lt;/strong&gt; &lt;br&gt;
If you're a Windows user who loves the Linux environment, Windows Subsystem for Linux (WSL) with a distribution like Ubuntu is a popular setup. Here’s a general guide on how you might configure an AWS command-line tool (which could provide Amazon Q features) within WSL.&lt;br&gt;
 Install WSL (if not already installed)&lt;br&gt;
Step-1:Open PowerShell (as Administrator) and run: wsl --install&lt;br&gt;
Step-2:sudo apt update &amp;amp;&amp;amp; sudo apt upgrade -y&lt;br&gt;
Step-3 Install Amazon Q CLI in WSL Ubuntu&lt;br&gt;
curl -O &lt;a href="https://q-cli.amazon.com/download/latest/q-linux-x64.zip" rel="noopener noreferrer"&gt;https://q-cli.amazon.com/download/latest/q-linux-x64.zip&lt;/a&gt;&lt;br&gt;
sudo apt install unzip&lt;br&gt;
unzip q-linux-x64.zip&lt;br&gt;
sudo mv q /usr/local/bin&lt;/p&gt;

&lt;p&gt;Step-4 Authenticate Q CLI (first time only)&lt;br&gt;
q login&lt;br&gt;
This will open a browser (on your Windows side) to authenticate your AWS account. Just sign in and authorize.&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%2F9b0mnsz2nk3equt97vas.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%2F9b0mnsz2nk3equt97vas.png" alt="Image description" width="800" height="338"&gt;&lt;/a&gt;&lt;br&gt;
Prompt &lt;br&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%2F9g98eewujtjwzcde7x3d.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%2F9g98eewujtjwzcde7x3d.png" alt="Image description" width="800" height="95"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Memory Match Game: More Than Just Flipping Cards!&lt;br&gt;
This isn't just a basic memory game. We've packed in several features to make it engaging and visually appealing:&lt;/p&gt;

&lt;p&gt;Multiple Difficulty Levels: Catering to different skill levels, you can choose from "Easy" (2x3 grid), "Medium" (3x4 grid), or "Hard" (4x5 grid).&lt;br&gt;
Diverse Card Themes: Why stick to one look? This game allows you to play with:&lt;br&gt;
Numbers: Classic and clean.&lt;br&gt;
Fruits: Colorful and fun, with dynamically drawn fruit icons!&lt;br&gt;
Flags: Test your vexillology knowledge with simplified country flags!&lt;br&gt;
Modern User Interface: Say goodbye to basic rectangles! The game boasts:&lt;br&gt;
Rounded corners for cards, buttons, and panels.&lt;br&gt;
Shadow effects for a sense of depth.&lt;br&gt;
Interactive buttons with hover effects.&lt;br&gt;
Clear visual distinction for card backs, fronts, and matched pairs.&lt;br&gt;
Smooth Gameplay:&lt;br&gt;
A brief delay before mismatched cards flip back, giving you time to memorize.&lt;br&gt;
Clear tracking of moves and matches.&lt;br&gt;
An intuitive menu system for selecting difficulty and theme.&lt;br&gt;
A satisfying "You Win!" screen upon completion.&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%2Fn2zl0cdwgz49jecd4icr.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%2Fn2zl0cdwgz49jecd4icr.png" alt="Image description" width="616" height="761"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;The Card Class&lt;/strong&gt;&lt;br&gt;
The heart of our game. Each card is an object with properties like its position (rect), value (for matching), flipped state, matched state, and an optional image for themes.&lt;/p&gt;

&lt;p&gt;class Card:&lt;br&gt;
    rect: pygame.Rect&lt;br&gt;
    value: int&lt;br&gt;
    flipped: bool = False&lt;br&gt;
    matched: bool = False&lt;br&gt;
    image: pygame.Surface = None&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def draw(self, surface, font, theme):
    if self.flipped or self.matched:
        # Draw card front (white rounded rectangle with shadow)
        shadow_rect = pygame.Rect(self.rect.x + 3, self.rect.y + 3, self.rect.width, self.rect.height)
        draw_rounded_rect(surface, (0, 0, 0, 50), shadow_rect, 10) # Shadow
        draw_rounded_rect(surface, CARD_FRONT, self.rect, 10)    # Front

        if theme == "Numbers":
            text = font.render(str(self.value), True, TEXT_COLOR)
            text_rect = text.get_rect(center=self.rect.center)
            surface.blit(text, text_rect)
        elif self.image:
            img_rect = self.image.get_rect(center=self.rect.center)
            surface.blit(self.image, img_rect)

        if self.matched: # Green overlay for matched cards
            s = pygame.Surface((self.rect.width, self.rect.height), pygame.SRCALPHA)
            s.fill(MATCHED_COLOR)
            surface.blit(s, self.rect)
    else:
        # Draw card back (blue rounded rectangle with shadow)
        shadow_rect = pygame.Rect(self.rect.x + 3, self.rect.y + 3, self.rect.width, self.rect.height)
        draw_rounded_rect(surface, (0, 0, 0, 50), shadow_rect, 10) # Shadow
        draw_rounded_rect(surface, CARD_BACK, self.rect, 10)    # Back
        # ... (pattern on the back) ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The Button Class&lt;br&gt;
For our interactive menu and in-game "Back" button, we have a Button class. It supports text, icons, hover effects, and rounded corners for that modern feel.&lt;/p&gt;

&lt;p&gt;**&lt;br&gt;
class Button**:&lt;br&gt;
    def &lt;strong&gt;init&lt;/strong&gt;(self, x, y, width, height, text, font, icon=None):&lt;br&gt;
        # ... (initialization) ...&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def draw(self, surface):
    # ... (draws shadow, button body with hover color, icon, and text) ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;draw_rounded_rect Utility&lt;/strong&gt;&lt;br&gt;
A neat helper function to draw rectangles with rounded corners, used extensively for the UI.&lt;/p&gt;

&lt;p&gt;def draw_rounded_rect(surface, color, rect, radius=0):&lt;br&gt;
    # ... (implementation using pygame.draw.rect with border_radius) ...&lt;br&gt;
&lt;strong&gt;Dynamic Theme Generation&lt;/strong&gt;&lt;br&gt;
Instead of static image files for all themes (though that's also an option!), the "Fruits" and "Flags" themes dynamically generate their visuals as PyGame Surface objects. This is a cool way to keep the asset dependencies low.&lt;/p&gt;

&lt;p&gt;create_fruit_images(): Draws simple representations of fruits with their names.&lt;br&gt;
create_flag_images(): Draws simplified versions of country flags. This demonstrates a bit more complex drawing logic for varied patterns.&lt;br&gt;
Game Logic in main()&lt;br&gt;
The main() function is the conductor of our orchestra. It handles:&lt;/p&gt;

&lt;p&gt;Game States: Switching between "menu", "playing", and "game_over".&lt;br&gt;
Event Loop: Processing player input (mouse clicks for cards and buttons, quitting the game).&lt;br&gt;
Card Mechanics:&lt;br&gt;
Flipping cards when clicked.&lt;br&gt;
Tracking the current_flips (up to two cards).&lt;br&gt;
Comparing card values for a match.&lt;br&gt;
Updating matched status.&lt;br&gt;
Implementing the FLIP_DELAY_MS for mismatched pairs to flip back.&lt;br&gt;
UI Drawing: Rendering all visual elements based on the current game state, including stats like moves and matches.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
