Categorygithub.com/Adesubomi/magic-ayo-api
module
0.0.0-20230317092150-1e32fcd52e9c
Repository: https://github.com/adesubomi/magic-ayo-api.git
Documentation: pkg.go.dev

# 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,

  1. Channel 1 - for making payments
  2. 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

  1. Clone the repo
    git clone [email protected]:Adesubomi/magic-ayo-api.git

  2. cd into project directory
    cd magic-ayo-api

  3. Fetch go dependencies
    go mod tidy

  4. Copy and update configuration file
    cp config.example.toml config.toml

  5. Start the server
    go run ./cmd/main.go --config=config.toml

🎉 Let the games start!

# Packages

No description provided by the author
No description provided by the author
No description provided by the author