DEV Community

Cover image for What Went Wrong: Reflecting on Past Habits to Build a Better Future - 1-Day Build Challenge
SANJAY M SANTHOSH
SANJAY M SANTHOSH

Posted on

What Went Wrong: Reflecting on Past Habits to Build a Better Future - 1-Day Build Challenge

This is a submission for the GitHub Copilot Challenge : Fresh Starts

What I Built

Hi All. So, for the GitHub Copilot 1-Day Build Challenge, I built an app called What Went Wrong. The idea is simple: it helps you analyze why your habits or resolutions didn’t work out and gives you actionable steps to fix them. It’s a Next.js application that asks you thoughtful questions about your past attempts at building habits. Based on your answers, it formulates follow-up questions, digs into what might have gone wrong, and provides tailored solutions to help you do better next time.

What’s cool is that the app doesn’t just stop at asking questions—it actually analyzes your responses to figure out patterns and challenges. It supports both Groq and Github models. Whether it’s figuring out why you stopped exercising or why journaling didn’t stick, this app is designed to give you clarity and practical advice in a friendly, conversational way.

Demo

Image description

Image description

Image description

Image description

Image description

Repo

What Went Wrong

A Next.js application that helps users analyze and understand their failed habits or resolutions using AI-powered insights. The app provides a conversational interface that adapts to user responses and generates personalized analysis and solutions.

Features

  • 🤖 AI-powered question generation using Groq or Azure models
  • 🔄 Dynamic conversation flow that adapts to user responses
  • 📊 Detailed analysis of habit failures and patterns
  • 💡 Personalized action steps and solutions
  • 🎨 Beautiful, responsive UI with dark mode support
  • 🔒 Secure token-based API authentication
  • 💾 Persistent storage with easy reset option

Getting Started

Prerequisites

  • Node.js 18+
  • npm/yarn/pnpm
  • A Groq API key or Azure OpenAI key

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/what-went-wrong.git
cd what-went-wrong
Enter fullscreen mode Exit fullscreen mode
  1. Install dependencies:
npm install
Enter fullscreen mode Exit fullscreen mode
  1. Create a .env.local file in the root directory:
GROQ_API_KEY=your_groq_api_key
# Or for Azure:
AZURE_AI_KEY=your_azure_key
AZURE_ENDPOINT=your_azure_endpoint
AZURE_MODEL_NAME=your_model_name
Enter fullscreen mode Exit fullscreen mode
  1. Start the development server:
npm run dev
# or
Enter fullscreen mode Exit fullscreen mode

Copilot Experience

Using GitHub Copilot throughout the development process was an amazing experience—it. The standout feature for me was Copilot Edits, which cut my development time in half. If you have a clear idea, this tool helps you bring it to life effortlessly. The autocomplete feature was incredibly fast and responsive to changes, adapting seamlessly as I refined my code. Even the readme fine is generated by it.

The integration with VS Code made everything super smooth. The slash commands, especially /fix, were fantastic at identifying and resolving issues quickly. With well-crafted prompts, Copilot handled all the AI integration work effortlessly, including complex tasks like Zustand integration and maintaining clean code by generating new files where needed—this was hands down one of the best features. My only wish? That the Copilot editor could handle more than 10 working sets at once!

GitHub Models

Yes i did use the models for prototyping the question generation part and the analysis part. I also kept this feature available in my final code.

Conclusion

Overall, this was a great experience, and I got to see the potential of using this type of development framework. For about 6 hours of work—from learning to deploying—I think the end result turned out pretty decent. Of course, there’s still room for improvement and refinement, but I had a lot of fun building this project. Big thanks to GitHub for the 1-Day Build Challenge—it was an awesome opportunity to push myself and try something new!

Top comments (0)