Giter Club home page Giter Club logo

middlware's Introduction

Lightning Goats Middleware

Description

Scripts used for the Lightning Goats project.

Installation

To set up the project, first install the required Python libraries: ``` pip install -r requirements.txt ```

Additionally, this project requires LNBits and Nostril installations on the server it runs on and uses a wireguard VPN to access an Openhab install which takes care of triggering the goat feeder.

Usage

Run the individual Python scripts as needed for the Lightning Goats project.

Contributing

Contributions are welcome. Please open an issue or submit a pull request.

middlware's People

Contributors

santyr avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

22388o

middlware's Issues

Duplicate Webhooks Check

The webhook appears to be being called twice for each incoming transaction causing Nostr notifications to happen twice. The fast_api app needs to store a few previous checking_ids or an other identifier and check incoming transactions against them to insure this doesn't happen. This way it doesn't matter if the same transaction comes in more than once.

Create Weather Data Middleware

Use websockets / flask to create an ap to run on the Openhab server which offers a route to get weather data for display on the overlay and lightning-goats.com

Refactor fastapi_app

Refactor and split the fast_api app into multiple files for better readability and maintainability; organize the code into several modules based on their functionality.

Suggested structure:

Main Application File (main.py): Contains the FastAPI app creation and route definitions.

Configuration and Environment Variables (config.py): Handles loading environment variables and configuration settings.

Models and Schemas (models.py): Contains Pydantic models for request and response schemas.

Utility Functions (utils.py): Includes various utility functions like convert_to_sats, create_invoice, etc.

Database Operations (database.py): Manages database operations, like storing and retrieving data.

External API Integrations (external_apis.py): Functions that interact with external APIs like YouTube API, payment API, etc.

Async Tasks (tasks.py): Asynchronous tasks such as triggering the feeder, handling payments, etc.

Logging (logging.py): Setup and configurations for logging.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.