This is a submission for the GitHub Copilot Challenge : New Beginnings
What I Built
How much do you have unfinished, despite your best efforts? Personally, I have a lot. Foreach of them, if we think about why, tracing effect from cause, we end up at the beginning. There was something missing at the beginning. A good beginning ensures a meaningful journey, and that is what this project hopes to provide in the form of an application.
What makes a good beginning? Methinks:
- A strong and practical/validated purpose
- Negative pressures from non-existence
- Clear direction, if not destination
Without most of these, meaning is scarce. It could be a passing whim.
With these, creation flows strong. How and when show up after why.
To this end, (of beginning), I'm building Whys, for great goals.
(Spoiler: This is one section of the full GREAT framework.) I'm doing this to help anyone struggling with bad beginnings and stillborn dreams, and to kickstart my own building journey. If I don't do this, I'll be very ashamed of myself and won't have started in a tangible way. I want to use this as the beginning of a full volition system (GREAT), and in fact it's scoped to only the Why of the Goal setting aspect. All that and a clear end in sight should make this a good beginning. Now if only there was an app to help me flesh this out more and remember my Why when I get sidetracked..
In the spirit of the times, this will be another "chatGPT wrapper". For the UX, we'll take inspiration from the Magic Mirror. I'll use Astro on Cloudflare, and Supabase for auth. I'll also use this as an excuse to learn and use Astro Actions, Cloudflare's D1 database, and Google's Gemini API (since it has a generous free tier).
Demo
You can peruse the app at https://whatisyoursystem.com/. FYI - You don't need to use a real email.
Repo link here
If you like to copy paste, it's https://github.com/sdawka/whys
Copilot Experience
I started with the Cloudflare Astro template, after which I had a series of tasks for myself - add auth, create some simple pages and components, add some routes, connect to the database, come up with the schema, implement the logic of adding a why in the form of simple interactions and backend logic. The amount of help I took from Copilot depended on the complexity of the task and whether decribing it correctly and explicitly was more work than just starting on it myself and using the inline chat as necessary. For complex tasks spanning multiple files, I used the chat sidebar, and for simple tasks and edits within the page, I used the inline chat.
Two places it was especially helpful, where it definitely feels like the future is here and life is a lot easier - Database and CSS work.
I used Copilot chat for writing all the database schema creation commands and other database queries, since I'm using cloudflare's D1 from the wrangler CLI tool. It also excels at creating mock data to insert while testing.
After building some skeleton for the information architecture (with Pico CSS so it still looks minimally cool), it was fun to have the page open, think about what I want changed and just ask Copilot's edit sidebar to do it. In most cases, I didn't even audit the code, just accept, save, and hot reload to see what the effect was. I didn't have to undo even once, though I did overwrite some changes. Of course, well defined and abstracted components are probably a pre-requisite.
Other than that it was also helpful in large scale refactors, even spanning the entire (small) codebase, such as extracting functions, etc.
GitHub Models
Nahh, I didn't use GitHub Models.. Strictly speaking, you should eval your prompts a la DSPy. I think most of the ones in this app were simple enough to eyeball. The simpler the task, the more reliable LLMs will be, and the less it matters which one you choose beyond a certain threshold of capability.
Conclusion
I think I went over a day if you count when I started and when I'm submitting this, but definitely a lot less than a day if you count dev time. Then again, this is a part of an idea in the back of my mind for a few years now, so that's more than a day of planning?
Copilot by itself is not enough, it definitely needs a very capable pilot. The time challenge made it obvious that most of the time is taken when you don't know what to do next, or you don't know how to do what you have to do next. Both seem like surmountable problems, so is it a matter of proper prompting after all? Of course, my use of the tool was limited by my lack of imagination. Having Copilot is like having a rocket launcher that can sometimes turn into an army of nanobots and attack the problem with finesse. A structured plan of action and precise instructions are all you need?
Top comments (0)