The problem

Where I live, electricity is not something you can plan around. Light can come at 7pm and go at 9pm, come again at midnight, and disappear before morning. If your phone dies, you cannot charge it. If you need light for work or study, you guess. People ask neighbours when light came last, or they keep mental notes, but memory is not reliable and a guess is not a plan.

Intended users

Students and anyone at home who depends on grid power that comes and goes: students in hostels and shared rooms, people working from home, and small shops that need to plan charging and work around outages.

The solution

LightLog is a simple web app. When power comes on, you tap one button. When it goes off, you tap again. That is all the input it needs. From those taps it builds:

  • A live status screen: is light on right now, since when, how much light you have had today, and a timeline of today's changes. If you noticed a change late, you can add it with the real time.
  • A patterns screen: a 24-hour chart showing how likely light is at each hour of the day based on your own logs, your most reliable hours, and how many hours of light you got each day this week.
  • A charge planner: pick your phone, laptop or power bank, set the battery level, and LightLog tells you how long a full charge takes and the best upcoming window to start charging, using your own pattern. Everything is stored on the device with localStorage, so it works offline, needs no account, and keeps your data private.

Technologies

  • React and Vite for the app
  • Tailwind CSS for the design (warm night-lamp dark theme, deep charcoal-navy with amber and gold glow accents, rounded cards, big friendly numbers, Baloo 2 headings with Nunito body text)
  • localStorage for saving logs on the device
  • The core maths (on/off periods, hourly coverage, charge estimates, best charging window) is written from scratch with no extra libraries

Challenges

The tricky part was turning simple on/off taps into honest numbers. The state before your first log is unknown, not "off", so the app treats it that way instead of guessing. Days with no logs are skipped in the averages rather than counted as zero. Charge estimates assume a steady charging rate, which is a simplification, and the app says so plainly.

What I learned

I learned how much a tiny, well-kept dataset can do. A week of two-tap logs is enough to predict charging windows. I also learned to be careful with time maths across midnight and with partial days, and that clear, friendly copy matters as much as the code.

Setup

npm install, then npm run dev. Open the local address Vite prints. Click "Try it with a sample week" to see it with data right away.

Credits

  • React and Vite (open source)
  • Baloo 2 and Nunito fonts from Google Fonts (OFL licence), self-hosted in the repo
  • AI tools used: an AI coding assistant (Muse) helped me write and test the code. The idea, design and product decisions are mine.
  • All work on this project was done during the LaunchPad Hacks hacking period (from 16 Oct 2026).

Built With

  • localstorage
  • react
  • tailwindcss
  • vite
Share this project:

Updates

Submission history