Inspiration
I've been interested in bitcoin for a couple of years now, and only recently dove deep into coding. Currently I'm a student in the full-stack developer program at Lambda School. I came across the hackathon on twitter about a week ago, and figured it was as good a time as any to learn how lightning works. So, I decided I'd try to hack together something using my newfound frontend skills. I came up with a random idea that made me chuckle and gave myself the challenge of producing something that actually works in only a week's worth of spare time, having no experience using a lightning node going in. And I did it!
What it does
The app is designed for lawyers to track their billable hours and generate lightning invoices to be paid for those hours in bitcoin.
How I built it
I relied very heavily on William O'Beirne's Medium article 'Making A Lightning Web App' to get the lightning node integration working. Given limited time, I pretty much just copied what he'd done with some modifications to the api call ( I thanked him directly on twitter!) Putting together the front end was the easier part for me, it was just a matter of creating a react app using bootstrap/reactstrap. It would be prettier if I had more time. The sessions are actually logged via an API call to the Clockify API, which I thought was a nice touch.
Challenges I ran into
My biggest challenge was lack of time. This thing is very much slapped together and neither the app nor the code are pretty. I was surprisingly confused about how to make a timer at first, but figured that out. Integrating my lightning app to generate invoices was made mercifully simple by the Medium tutorial mentioned above. I'd actually never used a lightning node before, so it took quite a while to even get that thing functioning. I got an assist from Pierre Rochard who I contacted on twitter, and he was nice enough to help me directly, which was awesome.
Accomplishments that I'm proud of
Actually getting the thing working in a week on my spare time. I only started seriously coding about 5 months ago with Lamdba School and while I know a fair bit about bitcoin and some about lightning I'd never used lightning before starting this project.
What I learned
How to run a lightning node. How to build a functioning timer. How to create a gif in photoshop. How to beg people on the internet for help with stuff I don't understand. How to throw together a functional, if imperfect, app in a few days.
What's next for Satoshi's Law
I think I can feasibly make this a pretty good little app. I am going to be heading for the job market as a developer pretty soon as I reach the end of Lambda School so this could be a cool little portfolio piece if I can clean it up.
Built With
- node.js-react-bootstrap
Log in or sign up for Devpost to join the conversation.