DEV Community

Kornel
Kornel

Posted on

I gamified my GitHub streak into a garden

I gamified my GitHub streak into a garden

I’d lose my commit streak on busy days, and GitHub’s contribution graph never really cared. So I built Commit Garden: a tiny garden that depends on whether you pushed code today.

What it does
Connect GitHub once. Every day you push, your current plant grows one stage. After six days in a row it’s fully grown and moves into your garden, and a new one starts. Skip a whole day and the plant you’re growing withers (the ones already in your garden stay). There are 16 species to unlock, daily quests that pay gems, and a gem can save a streak you just missed.

How it works
A GitHub App sends a webhook on every push. I only store the commit sha, timestamp and repo id, never the code. Each commit is counted once per sha, so redeliveries and force pushes don’t double count.

One design choice I like
The plant isn’t stored anywhere. It’s derived from the list of days with tracked commits, plus boosts and rescues. That made features like “spend a gem to save yesterday” a small change instead of a state-machine headache.

Stack
Next.js, MongoDB Atlas, Auth.js, Stripe, Vercel.

Honest bits
It counts pushes on any branch from the day you sign up, so the number can differ from GitHub’s own graph. It’s also a paid product: a 7-day free trial with no card, then €5 a month or €29 once. There’s a demo on the landing page that needs no signup.

I’d love to hear where it feels wrong, and whether the “withering” mechanic motivates you or just stresses you out.

Commit Garden

Top comments (1)

Collapse
 
kornelhal profile image
Kornel •

Thanks for reading! One thing I’m genuinely unsure about: does a plant that withers when you skip a day motivate you, or just stress you out? I went with a gentle version (gems can save a missed day, and the plants already in your garden never die), but I’m curious where others would draw that line.

Happy to answer questions about the GitHub App webhooks or how the plant is derived from tracked days.