Achieve Your Goals: an app for Taking Action towards your Dreams

This is a submission for the GitHub Copilot Challenge : New Beginnings What I Built The Achieve Your Goals app was developed to create a minimalistic, functional tool for inspiring and empowering users to embrace new habits. Designed as a minimum viable product (MVP), the app focuses on three core features: daily motivational quotes, personal goal setting, and action logging. Built in just 24 hours, this project reflects my understanding of habit formation and incremental goal achievement, with a strong emphasis on simplicity and usability. Basic Features: Home Screen: The home screen displays a new inspirational quote every time the app is opened, designed to encourage the user to take steps towards their goals. Goal Setting: Users can set a personal goal, which serves as the focal point of their journey. Daily Action Logging: Users can log daily actions (steps) taken towards achieving their goal. These actions are saved locally and persist across app sessions. Additional Features: New Quote on Reopen: Every time the app is reopened, a fresh quote is generated. This feature relies on a backend Python server using OpenAI's GPT-4 model. The server is included in the repository, and must be run to enable this feature. Action Logging: Users can log multiple actions, delete previous ones, and keep a detailed record of their journey towards their goal. Local Storage: Both the user's goal and actions are stored locally on the device, ensuring persistence across sessions. Daily Reminder: If no action has been logged for the day, a reminder is displayed in red text on the home screen to encourage the user to take at least one step towards their goal. Last Action Display: The last action taken by the user is displayed on the home screen, giving them a quick overview of their recent progress. Goal Reset: Users can reset their goal to a new one at any time, allowing for flexibility and adaptation in their goal-setting process. This app is designed to help users maintain focus on their goals, build positive habits, and stay motivated one step at a time. Development Journey Taking on this challenge was as much about learning as it was about building. A week ago, I introduced myself to Flutter by following the basic tutorial, and this project marked my first foray into using it for a real-world application. To expand its functionality, I relied heavily on GitHub Copilot to accelerate development, using it as an AI-assisted coding tool that significantly boosted productivity. Some highlights of the technologies/concepts I explored and implemented include: GitHub Models for quote generation: I integrated GitHub Models to create a feature that generates daily quotes, leveraging large language models (LLMs) to deliver inspiration tailored to habit-building. Backend with Flask: To connect the Flutter frontend with the Python backend, I used Flask for the API. While I had briefly touched on Flask in the past, this was my first time integrating it into a functional project. Shared Preferences for data storage: I used Shared Preferences in Flutter to store user data, namely their saved goal and daily logged actions. Habit-building insights: The app embodies principles of building habits through consistent action and provides a simple interface to reflect this philosophy. Perhaps more than anything, this was a great learning experience with GitHub Copilot itself. I discovered and practiced many of its latest features, which I first learned about in the challenge's provided videos. These tools became invaluable during the development process and were instrumental in completing the app within the 24-hour timeframe. Demo It's been fun making this video in a marketing kind of way ;) Repo https://github.com/parvanitis15/Achieve-your-goals Copilot Experience Participating in this DEV challenge has completely transformed how I view and utilize GitHub Copilot. Before this project, my approach to Copilot was limited—I’d write comments, wait for Copilot to generate suggestions, and occasionally select an option without fully exploring alternatives. However, the learning materials provided during the challenge opened my eyes to its advanced features and how to integrate them effectively into my development workflow, with VSCode. Prototyping with Copilot Chat I began the project by using Copilot Chat to brainstorm and prototype the application. I posed an open-ended question to get started: I want to create an application for new beginnings, and develop it in one day. These are the things that I've thought about including in the application: 1. When opened, bring up a quote about new beginnings, using LLMs to generate a new quote daily. 2. Prompt the user to enter one goal they’d like to achieve and save it. 3. Encourage the user to perform one action each day toward their goal and log it. What do you think? Co

Jan 19, 2025 - 17:10
Achieve Your Goals: an app for Taking Action towards your Dreams

This is a submission for the GitHub Copilot Challenge : New Beginnings

What I Built

The Achieve Your Goals app was developed to create a minimalistic, functional tool for inspiring and empowering users to embrace new habits. Designed as a minimum viable product (MVP), the app focuses on three core features: daily motivational quotes, personal goal setting, and action logging.

Built in just 24 hours, this project reflects my understanding of habit formation and incremental goal achievement, with a strong emphasis on simplicity and usability.

Basic Features:

  • Home Screen: The home screen displays a new inspirational quote every time the app is opened, designed to encourage the user to take steps towards their goals.
  • Goal Setting: Users can set a personal goal, which serves as the focal point of their journey.
  • Daily Action Logging: Users can log daily actions (steps) taken towards achieving their goal. These actions are saved locally and persist across app sessions.

Additional Features:

  • New Quote on Reopen: Every time the app is reopened, a fresh quote is generated. This feature relies on a backend Python server using OpenAI's GPT-4 model. The server is included in the repository, and must be run to enable this feature.
  • Action Logging: Users can log multiple actions, delete previous ones, and keep a detailed record of their journey towards their goal.
  • Local Storage: Both the user's goal and actions are stored locally on the device, ensuring persistence across sessions.
  • Daily Reminder: If no action has been logged for the day, a reminder is displayed in red text on the home screen to encourage the user to take at least one step towards their goal.
  • Last Action Display: The last action taken by the user is displayed on the home screen, giving them a quick overview of their recent progress.
  • Goal Reset: Users can reset their goal to a new one at any time, allowing for flexibility and adaptation in their goal-setting process.

This app is designed to help users maintain focus on their goals, build positive habits, and stay motivated one step at a time.

Development Journey

Taking on this challenge was as much about learning as it was about building. A week ago, I introduced myself to Flutter by following the basic tutorial, and this project marked my first foray into using it for a real-world application. To expand its functionality, I relied heavily on GitHub Copilot to accelerate development, using it as an AI-assisted coding tool that significantly boosted productivity.

Some highlights of the technologies/concepts I explored and implemented include:

  • GitHub Models for quote generation: I integrated GitHub Models to create a feature that generates daily quotes, leveraging large language models (LLMs) to deliver inspiration tailored to habit-building.
  • Backend with Flask: To connect the Flutter frontend with the Python backend, I used Flask for the API. While I had briefly touched on Flask in the past, this was my first time integrating it into a functional project.
  • Shared Preferences for data storage: I used Shared Preferences in Flutter to store user data, namely their saved goal and daily logged actions.
  • Habit-building insights: The app embodies principles of building habits through consistent action and provides a simple interface to reflect this philosophy.

Perhaps more than anything, this was a great learning experience with GitHub Copilot itself. I discovered and practiced many of its latest features, which I first learned about in the challenge's provided videos. These tools became invaluable during the development process and were instrumental in completing the app within the 24-hour timeframe.

Demo

It's been fun making this video in a marketing kind of way ;)

Repo

https://github.com/parvanitis15/Achieve-your-goals

Copilot Experience

Participating in this DEV challenge has completely transformed how I view and utilize GitHub Copilot. Before this project, my approach to Copilot was limited—I’d write comments, wait for Copilot to generate suggestions, and occasionally select an option without fully exploring alternatives. However, the learning materials provided during the challenge opened my eyes to its advanced features and how to integrate them effectively into my development workflow, with VSCode.

Prototyping with Copilot Chat

I began the project by using Copilot Chat to brainstorm and prototype the application. I posed an open-ended question to get started:

I want to create an application for new beginnings, and develop it in one day. These are the things that I've thought about including in the application:
1. When opened, bring up a quote about new beginnings, using LLMs to generate a new quote daily.
2. Prompt the user to enter one goal they’d like to achieve and save it.
3. Encourage the user to perform one action each day toward their goal and log it.
What do you think?

Copilot responded with a proposed directory structure for a Flutter app, including a README and a basic pubspec.yaml file. I followed its guidance and used the "Insert into new file" option to generate and save each component it suggested.

Building Components Step by Step

Using Copilot, I iteratively built each part of the app. For instance:

  • Directory Structure: Based on the suggested structure, I asked Copilot—one prompt at a time—to create the necessary files and code for each component.

  • Tweaking with Copilot Edits: I provided multiple files for context and used Copilot Edits to refine functionality. For example, I modified the goal_screen file to incorporate the Goal class created in another file, ensuring seamless integration.

Advanced Features in Action

Throughout development, I relied on several advanced Copilot features:

  • Inline Chat for Adding Features and Fixing Issues:

    • When the backend quote generation server wasn’t running, I highlighted the response-handling code and prompted: “Handle exception (server is not online)”. Copilot provided an elegant solution to handle the exception gracefully.
    • I also used "Fix with Copilot" frequently to resolve IDE-detected issues.
  • Using Copilot Edits for New Features: For example, I updated the goal screen UI to store the user’s goal locally with Shared Preferences. Copilot Edits helped me integrate this functionality by modifying all relevant files at once.

  • Context Awareness and Commands in Chat:

    • I became adept at leveraging macros like @workspace and commands such as /fix, /tests, and /fixTestFailure.
    • An example of /fixTestFailure: While testing a Flutter Widget that returned an Expanded object with a ListView as its child, Copilot identified that the Expanded widget needed to be wrapped in a Flex widget. It proposed a fix: remove the Expanded wrapper in the widget and apply it only when integrating the widget within a Flex-based parent.

The Impact on My Development Process

Integrating these GitHub Copilot features into my development workflow made the entire process feel seamless. From brainstorming ideas to resolving complex issues and generating unit tests, Copilot proved to be an indispensable assistant.

This project not only allowed me to build a functional app within 24 hours but also equipped me with a powerful new skillset to accelerate future development. GitHub Copilot truly turned development into a breeze!

GitHub Models

One of the core ideas I had for this project was to generate a daily inspirational quote for users, focusing on themes like new beginnings, personal growth, and habit-building. This feature presented an excellent opportunity to leverage GitHub Models, which I had never used before. Up until this project, I had only worked with LLMs in the browser, so integrating them into my own code felt like an exciting challenge.

Setting Up the System

After reviewing the GitHub Models documentation, I decided to use the OpenAI GPT-4o model, through Python, accessed through a Flask backend. The backend would handle the LLM queries and send responses to the main Flutter application. Setting this up was surprisingly straightforward, thanks to GitHub Copilot and, finally, managing to create and use a GitHub Personal Access Token (PAT).

Crafting the Query

Initially, I crafted the following prompt for generating quotes:

"Generate an inspiring quote about new beginnings, personal growth, or fresh starts. The quote should be concise, no longer than 20 words."

Running the model with this query produced the following results:

  1. "Every sunrise whispers a chance to begin again; embrace the new day as a canvas for your growth."
  2. "Every sunrise whispers a chance to begin again—embrace it and let your growth illuminate the path ahead."

While these quotes were fitting and well-written, they felt overly similar, with only minor variations in phrasing. This prompted me to explore the model parameters, especially temperature, to understand how randomness could influence the output. To my surprise, I discovered that the temperature was already set to 1—the maximum setting for randomness. Despite this, the responses still lacked diversity, which led me to reflect on other ways to encourage variety, such as refining the prompt or introducing follow-up instructions.

Refining the Approach

Realizing the need for more variety, I explored ways to engineer a better prompt. ChatGPT offered helpful insights, such as requesting multiple responses at once or specifying a follow-up query like “Now generate a different answer.” However, given the 24-hour time constraint for this project, I decided to simplify the query and focus on something more directly aligned with the app's purpose.

The updated query became:

"Generate an inspiring quote about building new habits. The quote should be concise, no longer than 20 words."

This approach yielded better results, including:

  1. "Small daily steps shape great habits; consistency is the bridge between who you are and who you aspire to be."
  2. "Big changes start small—commit to the first step, and let consistency transform your habits into progress."

While the responses still shared a degree of similarity, they were more focused and relevant to the app's theme of goal-setting and habit-building.

Lessons Learned

This experience provided valuable insights into the potential and limitations of GitHub Models:

  • Randomness and Diversity: Even with a high temperature setting, repeated prompts can result in similar outputs. Careful prompt engineering and strategies like batch generation or tailored follow-up queries could address this issue in future projects.
  • Appropriate Use Cases: GitHub Models excel at generating concise and meaningful text, making them a great fit for features like inspirational quotes. However, achieving true variety might require additional iteration and refinement.

This project marked the beginning of my journey with GitHub Models, and it left me with a lot to consider about their integration into applications. I look forward to exploring their capabilities further and discovering new ways to use them effectively in my code.

Conclusion

Reflecting on this experience, I realize how much I've learned in such a short time. GitHub Copilot has proven to be an indispensable tool for accelerating development, allowing me to quickly generate code and refine it as needed. Meanwhile, GitHub Models opened my eyes to the possibilities of AI-driven content generation, providing dynamic and engaging elements like daily quotes for the app. As I continue working with these tools, I am eager to explore more sophisticated applications and refine my techniques for integrating AI into real-world projects.

This challenge pushed me to see how much I could achieve in 24 hours using tools and technologies that were largely new to me. By focusing on the essentials, I managed to build a minimalistic but functional app, laying the groundwork for future improvements. It also reaffirmed the importance of embracing challenges to grow as a developer—one step at a time—much like the process of achieving personal goals. While there’s always room for refinement, this project was both inspiring and educational, demonstrating how much can be accomplished with the right tools, mindset, and a willingness to learn and adapt quickly.