from Hacker News

I created this dumb app in the middle of the night in 40 minutes with ChatGPT

by ferat on 11/2/24, 5:56 PM with 6 comments

I have a newborn, and the early mornings have been crazy. I usually stay awake beside my wife while she breastfeeds, waiting to burp the baby and sleep.

To keep me awake and help her stay awake, I started reading a few pages of books during these moments, but I was using the flashlight on my phone, which was very bright and unpleasant.

I was already considering buying a reading light, but that morning, in a moment of insomnia, I had the idea of creating an app that used the phone screen as a flashlight. I got up quickly and typed a prompt in ChatGPT, which generated something very close to what I imagined.

I copied the code and put it online using GitHub Pages right after. The whole process took about 40 minutes (and at least made me very sleepy right after; I fell asleep).

I used the app that same night, and this morning, I decided to improve it, improve some things, add some simple features, and also turn it into a PWA app that can be installed (so I could use it in full screen).

I liked the result so much that I published the app for free. It's straightforward, but I hope it will be useful to more people:

https://readinglight.app/

  • by runjake on 11/2/24, 6:21 PM

    Commenters are likely going to crap on you because this is super simple and it’s been done many times before, but remember, this is your exploration, your learning process.

    Keep it up. I actually have my own HTML and JavaScript to do this but I’ve bookmarked yours because I like how your sliders work better.

    As a parent of 3 kids, I struggle to find even an hour each night to work on personal projects.

  • by coderff on 11/2/24, 6:40 PM

    I would for sure do the same as you haha I like to create my small dumb apps
  • by nvusuvu on 11/3/24, 1:35 AM

    Awesome! Will you share the code and what made it specifically a PWA?