Lightning Network is de facto standard Layer 2 on the top of Bitcoin since 2019. It's possible to swap Layer 1 Bitcoin to Layer 2 for instant and cheap micropayments.
This opens an avenue of using Bitcoin as a convenient payment tool in everyday life. The question is - where to pay with Lightning Network1?
There are various group of people that might be interested in such question:
fans in the city visiting places&crypto fans accepting it,travelson the other side of the world and pay with Lightning,- internet payments for
convinience & simplicity.
Why Lightning map?
My idea was to aggregate such places & e-shops that accept Lightning as payment method.
My personal motivation is to:
- as a Lightning fan, I want to know where to use Lightning in Prague,
- help Prague businesses to advertise that they accept Lightning,
- add e-shops that sell goods which I am interested in,
- run biggest up-to-date website with Lightning-only places which is reliable.
For doing that I decided to create prototype of how would such thing look like and work and maybe to show this idea to others who might be interested. I prototyped most important bare minimum functionality with easy tools. Now I only deploy frontend container to my DigitalOcean Kubernetes for preview purposes.
Homepage
Login page (register&login / Google SSO)
Administration after Google SSO
Merchant edit
Tech stack of MVP
For this prototype I used very straightforward set of tools (& stack) that has to be redesigned for sure. If you are interested, you can visit it 2 and legacy GitHub repository 3.
Quick prototyping stack is:
- React.js (Bootstrap),
- 17$ template from ThemeForest 4,
- MapBox,
- Firebase.
Peak into the Firebase
We use Firebase for simplicity. We use Firestore Database (document database) and Authentication (auth functionality). Firebase is BAAS, however, the structure should be usable in other document database - namely MongoDB. Therefore, using Firebase Database is migratable and doesn't pose an obstacle.
These things are potentially dangerous:
- React.js should better be used with MUI/RadixUI,
- Custom design has to be done,
- MapBox is expensive with traffic,
- Firebase is expensive with traffic.
The roadmap to a real project (not necessarily in that order) is:
- Get good design with more general targeting of Lightning topic.
- Rewrite frontend to MUI (not necessarily full).
- Ditch MapBox for free, yet highly customizable solution (as part of frontend works).
- Finalize database schema - also write application client-side oriented so
Firestore Databaseis migratable toMongoDBwithout large obstacles. - Provision infrastructure in
DigitalOcean/AWSviaTerraform, which would contain managed Kubernetes, includingfrontend(and potentialbackendworkloads). - Write backend in Node.js or Go in the same manner. Use Firebase for bare minimum - as authentication middleware.
- Ditch Firebase for data storage (! already defined final structure to avoid migrations -
merchants,e-shops) and attach backend to it. - Deploy the whole project to
DOKS/EKSwithbackendand managedMongoDBin the cloud. - Explore options of using Terraform not only for
infrastructure provisioningbut also forKubernetes managment, most importantly redeploys, etc. - Use this Terraform replicability to run tests against this piece of software or create testing environment in different namespace for E2E.
Long live Lightning map!