Code Monkey home page Code Monkey logo

api.v3.cogs.red's Introduction

Stay awhile and listen ๐Ÿ”ฅ

๐Ÿ‘‹ Heyo, I'm Anton (orels1) and I mostly write utilitarian stuff: from tiny mock servers to API clients and status pages.

๐ŸŽฎ Lately I've been drifting towards Unity Editor Tools and Shader development, though. If you do any VRChat Udon development - check out UdonToolkit, as well as my assorted Editor Scripts and Shaders

๐ŸŽจ Some of more artsy stuff I do is available on ArtStation

๐Ÿค– If you're into discord bots, you might also know another project of mine - cogs.red, which I made and used to maintain for the lovely community at Red. Altho these days I had to detach from that project due to a bunch of reasons, which I am incredibly sad about, but it is how it is.

๐Ÿ’ฌ If you like what I do - feel free to drop by my Discord server

โค Hope you have a great day โค

api.v3.cogs.red's People

Contributors

orels1 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

api.v3.cogs.red's Issues

Switch parser to GraphQL?

GraphQL now allows to get object's contents and list folders/files

List folders in a repo

query {
  repository(name: "ORELS-Cogs", owner: "orels1") {
    object(expression: "master:") {
      ... on Tree {
        entries{
          name
          type
        }
      }
    }
  }
}

Get text file contents (does not support binary!)

query {
  repository(name: "ORELS-Cogs", owner: "orels1") {
    object(expression: "master:info.json") {
      ... on Blob {
        text
      }
    }
  }
}

Community wishlist

Feel free to drop a comment with a thing you want to see on v3.cogs.red backend (only backend!)
Frontend list

A few examples:

  • Return last updated field in the API
  • Return current spotlight cog
  • Return top-10 most downloaded cogs

And so on. I will take things that are viable to implement and convert them to separate issues.
Vote with ๐Ÿ‘ for things you like as well!

Note: if you're not sure if the feature is backend or frontend - leave it in the frontend list

MVP

v3 MVP

The MVP consists of the modules and tasks listed below (requires ZenHub extension to see the connected tasks).

Apart from obvious changes such as version 3 of info.json support, the new backend will power the new application and repo parsing workflows.

Workflow changes

New application process

Loosely based on RJM's proposal

  • Users can now add the repos themselves
  • Users log in with GitHub and select the repo / repos they want to add (Users Module)
  • Cogs.Red backend creates a webhook that listens to the updates to the repo (Webhooks module)
  • Repo is parsed with user's personal token (received when authorizing through GitHub, allowing for up to ~1000 parser passes for this repo per hour)
  • A notification is sent to the repo approval team, so they can then look at the repo and assign an approval level to it
  • Repo is added to the list of repos. Unapproved repos are hidden from the API by default (unclaimed legacy repos ignore that rule, see below)

Legacy Repos

  • All currently added repos are assigned a status of legacy repos
  • Their respective owners can claim the repos by authorizing through GitHub, after that the repo will go through the application process described above

Repo updates webhook

  • Repos are automatically re-parsed on the main branch push. The repo owner will have an ability to choose branch when adding a repo.
  • Repo parser will have an ability to monitor repo changes and warn the approval team if, for example, the cog suddenly starts spawning subprocesses (potentially harmful).

Architecture

  • v3 API will live behind traefik
  • v3 API will use mongo DB as a DB for most of the things
  • v3 API will use feathers as a backend framework
  • v3 API will collect usage data with mixpanel (will need to figure out the way of disclosing that)
  • v3 API will have a caching mechanism for most of the things, with different update times

Support for new `min_bot_version` and `max_bot_version` keys in `info.json`

I'm not sure if you already know about these new keys for bot version, so I thought I'll post an issue so that you don't miss them. These keys replaced bot_version key (which by the way didn't work) in Red 3.1 and their values are now strings (accepting any valid Red version number, see this regex), not lists.

Docs for new keys: https://docs.discord.red/en/latest/guide_publish_cogs.html#keys-specific-to-the-cog-info-json-case-sensitive

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.