# README
Project 1 - Magic internet money 🧙
Overview:
The project is a simple game platform called “AYO” where users can pay to play a game with either on-chain bitcoin payment or off-chain lightning. The platform will be built using Golang for the back-end and Vue.js with TypeScript for the front-end.
The Design document of this project can be found here
Postman collection for the backend services can be found here
Methodology
Payment Channels
This platform works with 2 channels,
- Channel 1 - for making payments
- Channel 2 - for receiving payments
Consequently, only the channel for making payments (channel 1) is meant to be locally funded. Channel 2 (which is used for receiving payments) doesn't have to be funded.
Gamers can pay generate and pay invoices to have access to a game.
Game Play
A gamer can only have one active game at each given time. Any other payments made while the gamer has an active game is deposited into the internal wallet of the gamer.
Internal wallet
The internal wallet is a simple mechanism for improved user experience. Because the gamer has to pay for every game, it would be easier if the gamer gets to pay from his internal wallet, and (perhaps) fund the wallet once for extended use (over lightning).
Get Started
To get started
- Clone the repo
git clone [email protected]:Adesubomi/magic-ayo-api.git
- cd into project directory
cd magic-ayo-api
- Fetch go dependencies
go mod tidy
- Copy and update configuration file
cp config.example.toml config.toml
- Start the server
go run ./cmd/main.go --config=config.toml
🎉 Let the games start!