Coder Social home page Coder Social logo

poggit / poggit Goto Github PK

View Code? Open in Web Editor NEW
101.0 13.0 31.0 15.32 MB

GitHub application for managing PocketMine-family plugins, and website for sharing plugins.

Home Page: https://poggit.pmmp.io

License: Apache License 2.0

PHP 66.09% JavaScript 19.72% CSS 12.12% Shell 0.19% TypeScript 0.63% Hack 1.26%
website php poggit pocketmine poggit-virions web-framework

poggit's Introduction

Poggit

Discord

What is this?

Poggit is a website for two things: a plugin builder (Poggit-CI) and a plugin list (Poggit-Release).

Why not Laravel?

I wanted to use this project as a way to experiment how bad it is if no frameworks are used. I am not planning to change this, as this is a living evidence telling us why PHP (especially without server frameworks) is bad.

Features

Poggit-CI: plugin builder

Poggit will build phars for your project when you push a commit or make a pull request.

Login on the Poggit website and authorize the Poggit application for your user account or your organizations. You can find buttons to enable Poggit-CI for particular repos at the CI admin panel. Poggit will help you create the file .poggit.yml in your repo, and then Poggit will start building your projects in your repo every commit.

Poggit-Release: plugin list

A project can be released after it has a development build. You can find the release button in the CI project page.

You can find a list of released plugins at https://poggit.pmmp.io/plugins. You can also find plugins pending review at https://poggit.pmmp.io/review.

Virions

Poggit provides a library framework called "Virions".

Planned features

Can I host it myself?

Yes, technically you can, although discouraged.

Poggit manages a website that allows users to find plugins. Therefore, if everyone creates their own Poggit website, it will be confusing for users as plugin lists are scattered everywhere. For the sake of the community, unless you have improved your version of Poggit so much that the original version is no longer worth existing, please don't host a public Poggit yourself.

However, for various reasons, mainly that I am a stubborn Free Software supporter, you can still host a Poggit instance yourself. This project is licensed under the Apache license, Version 2.0. You can obtain a full copy of this license at the LICENSE file.

Nevertheless, Poggit is open-sourced for developers, not businesses. It is here for developers to improve it, or to learn from it, "to build software better, together". You are welcome if you want to host Poggit yourself for security reasons, or for testing. But if you are hosting Poggit for profit reasons, I politely ask you not to do that.

Installation

Please read Can I host it myself? before installing Poggit.

Then, refer to INSTALL.md for instructions to install Poggit.

poggit's People

Contributors

awzaw avatar diamond-gold avatar dktapps avatar falkirks avatar gitter-badger avatar goldcodes avatar hbidamian avatar infernus101 avatar intyre avatar jarne avatar jasonw4331 avatar jaxkdev avatar jviguy avatar magicode1 avatar pemapmodder avatar sof3 avatar thenewherobrinex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

poggit's Issues

Clicking problem with navbar

Navbar refers to navtabs i.e. Home CI Release Help.

While the cursor is hand for the whole navtab, only the words are clickable (as an <a>). This is especially notable in mobile, where the whole area with hand cursor gets highlighted, and people don't understand why the links won't work.

Echo on Async tasks

Hello,

Please note that I can't know if this is considered as a bug. It can be an enhancement

Recently, I made some plugins with async tasks (I won't give it's name thought it won't be approved) and I noticed that when echoing, we get a lint error. For a normal sync file, I fully understand.

But what about asyncs tasks? We cannot call the PM logging function due to being async so we need to use echo with our own logging system. I think there that it should not emit a lint.

Namespace register repository

Developers can "claim" namespaces they use. In the future this can be used for a wide range of purposes, such as:

  • Preventing namespace collision
  • Encourage proper naming of namespaces
  • Allow third-party tools to query the information of a namespace

TODOs:

Associate releases

Some plugins, like @onebone's Economys plugin, have multiple phars but are released together as addons. Poggit should add an option "Associate release" such that a release is associated with the main project.

Required for releasing plugins like EconomyS

===

Update as of August 2017: Still need to add a button to download an archive containing all associated plugins.

Search bar directs to wrong plugin version

When using the search function, it does not seem to direct to the latest version of the plugin that was searched. I'm not sure if this is because I used a weird version (0.0.99), but I think that should not work like that.

How to reproduce?

  1. Go to Poggit and type BlockSniper in the search bar. Sorry if this is considered advertising, it isn't meant to be.
  2. Poggit will direct you to version 0.0.99. The latest version however is version 2.0.0.

UI / UX

Here's a few ideas, let me know your thoughts.

Guest Homepage:

The main content I think should be moved into an "About" or "FAQ" page, so that the homepage can devote as much space as possible to people getting what they want: plugins.

There should be as little dev speak ("builds", "releases"...) as possible. It should be uncluttered and simple so that even non english-speaking kids can easily find and download a plugin. Since guests only see releases I suggest only using the term "Plugin" at least on the main release download page, and grouping them by recent, featured, recommended, category etc.

Search
A real-time search box might be neat, again grouping results by name, author, category etc. If not, normal search is fine too.

Member Homepage

I need to see the timeline data before knowing how that page should be laid out, but here the main content could be focused on info about the workflow and how to use poggit, what it does, what it doesn't do etc, keeping the text short with links to information elsewhere if too long/detailed.

The other panes could display public releases and your own projects as it is now, plus the timeline underneath, for example.

Member CI page

I would change the toggle repo flow: instead of clicking, waiting for the arrow, clicking again on the arrow to display repos... one solution would be to use a modal dialog overlay like you do already for the repo enable dialog, to prevent any user interaction until the call back populates the page - only one click and a nice effect.

Keywords stack when releasing

When releasing, the searching keywords at the bottom of the page appear correctly, but when submitting an update the keywords get added again, next to the already existing keywords. This causes a long string of the same keywords, which can be seen at the bottom of the page here: https://poggit.pmmp.io/p/BlockSniper/45.

Steps to reproduce:

  1. Release a plugin of any kind.
  2. Submit a plugin update and don't change the keywords.

Virion framework

Reference: /assets/php/library_stub.php

How it works

How a Virion is developed

  • The library is identified by a species, which is a namespace unique to the library. The namespace must not be a super-namespace for other libraries or plugins in the future. The species should contain the author name (or organization name), a namespace separator (backslash \), then the library name. For the library name, the longer the better.
  • All classes, namespace constants and namespace functions declared by the library must be under the namespace of the species, or its sub-namespaces.
  • Use of global variables is strongly discouraged, except for temporary global variables (where the global variable can be safely deleted or overwritten when another plugin executes something).
  • How to support use of resource files in libraries is not finalized yet.

How a Virion is debugged

  • Place the directory of the Virion in libs/ of a PocketMine installation (in the PocketMine data path, i.e. next to the plugins/ directory), such that there is a pocketmineDataPath/libs/any_random_name_for_this_library/src/Virion_species_name/ directory containing all your source files
  • Install a Virion debugger plugin: Sterilizer (name yet to be confirmed).
  • Write a plugin that tests against the Virion features, and set the softdepend of the plugin to Sterilizer. softdepend: [Sterilizer]

How a Virion is built into a phar

Note: Poggit-CI should add support to compile source into Virion .phar

  • Basically, all source files in src/ will be copied to the same relative path in src/ in the phar.
  • A .virus.yml (yet to be renamed) will be created in the phar, specifying the library name (trivial name), species and version.
  • The library_stub.php in poggit will be set as the stub for all libraries.
  1. Library is compiled into a Virion .phar file (Poggit-CI should add support for this)
  • Basically, all source files in src/ will be copied to the same relative path in src/ in the phar.
  • A .virus.yml (yet to be renamed) will be created in the phar, specifying the library name (trivial name), species and version.
  • The library_stub.php in poggit will be set as the stub for all libraries.
  1. Users can now download this Virion .phar file.

How a plugin using Virion is debugged

See How a Virion is debugged, except that instead of placing a directory any_random_name_for_this_library/, you place the phar of the Virion instead: pocketmineDataPath/libs/any_random_name_for_this_library.phar

How a plugin using Virion is built

Notes:

  1. Poggit-CI should add support to build plugins with Virion injection
  2. Poggit-CI will not directly run the stub file from the Virion, but use a version adapted for web servers without starting a separate PHP process.
  3. If the library is:
  • built with Poggit-CI, in the same GitHub repo (another build project) as the plugin: There should be support to add the library directly by specifying the project name, see README of poggit repo for example

  • built with Poggit-CI, in a different GitHub repo from the plugin: There should be support to load (public repos only!) and add libraries directly by specifying the fully qualified project path (owner+repo+project), see README of poggit repo for example.

  • not built with Poggit-CI: Poggit-CI should load and add libraries located in the libs/ directory under the project directory.

  • Build the plugin into a standard .phar plugin. The phar may be having problems because the library is not yet injected.

  • Run the Virion .phar with PHP directly, with the new plugin .phar file as the first argument: php ../libs/any_random_name_for_this_library.phar myPlugin.phar

TODOs:

  • Build virions
  • Install virions when building

Plugin submission

  • Search plugins
  • Plugin/update submission
  • Staff review queue
  • Member review queue

Better build progress display

Better tracking of error/pending builds.
If a build is missed, it is difficult to find out which build is missed out or to create it from the middle.

Handle errors by exception

Currently all errors are redirected to poggit\error_handler(). This issue proposes to change the flow to throwing an exception at error_handler and catch the exception at a centralized place.

Spam project creation from lag

If I click the confirm button when adding a repo to poggit more than once before it closes the window, it spams adding the repository to poggit.

Glitch 1
Glitch 2

Bug: PMMP Button does not remain blue colour when selected

When hovering over a button in Poggit, the button becomes blue. When you click the button, it will remain that colour until a different button is clicked. When clicking the PMMP button however, this is not the case, and the button will become white again when clicking it.

This is no big issue, but I thought I'd just point it out anyways.

Releasing a new plugin version, and removing the old version will clear all reviews

When submitting a new release to Poggit, and removing an older release of that plugin, on which the review has been made in the first place, the reviews from that version will be cleared.

How to reproduce?

  1. Leave a review on your plugin.
  2. Submit a plugin release for that plugin.
  3. Remove the old version.
  4. Check the review page again.

I'm not entirely sure if this is intended or not. If it is, feel free to close this.

Add a webhook for builds

I think it would be great if poggit would send a POST to a webhook url. For those of us who use Discord, we could setup poggit to send a POST to Zapier, and then Zapier would handle sending it to Discord. It could also be like GitHub where you can have it send everything, send commits, send reviews on Release, etc.

Feature Request: Multisearch on the homepage

Just for simplicity's sake, can we get a search bar on the homepage or a link to the recent builds? I would rather have a direct link to all of them than to have to scroll down the homepage. Also, it would be nice for when users are logged in with github not to have to go through their own projects to get to the multisearch.

Mini forums

A basic implementation of per-plugin threads in this manner:

CREATE TABLE release_posts (
  projectId INT UNSIGNED REFERENCES projects(projectId), -- projectId of the plugin released
  content VARCHAR(20000), -- or content BIGINT UNSIGNED REFERENCES resources(resourceId)
  author INT UNSIGNED REFERENCES users(uid),
  creation TIMESTAMP
);

No auxiliary features like likes, votes, etc. are planned.

Downloads reset on meta update

Downloads count on release resets after updating metadata of release (downloads from older versions (draft) are not reset).

Steps to reproduce:

  1. Make you plugin downloaded a few times.
  2. Update plugin description.
  3. View at release downloads count.

Better release listing

The title says pretty much everything.
I was thinking it could be a good idea to order the Review list on highest score from voting, for example a plugin with 5 upvotes would be at the start of the review list, while a plugin with 5 downvotes would be all the way at the end of the Review list.

I'm not sure if this is a great idea or not, I just thought it'd be a good idea for locating better/worse plugins.

500 Internal Server Error

When trying to submit a plugin update today, I found myself with a 500 Internal Server Error page. When opening the CI page, it shows the 'release plugin' button, instead of the 'submit build for plugin update'. (or something like that) I think this might be because I've changed the repository to an organization.

Things I have tried:

  • Waited for some time, clicked again.
  • Re-enabled Poggit-CI for the repository, clicked again.

Neither of both have worked.
I hope you can help me. Thanks!

Requests

A plugin request section can be held on Poggit, offering features that cannot be satisfied using a normal forum.

It is actually quite simple. Mainly need to enhance on how plugins are claimed, or filled.

MultiSearch issues

  1. URLs pointing to the repos instead of projects
  2. As the project name is consistent across different builds, it should search projects instead of builds.

Security issues

  • Rate limit users from creating Poggit-CI (e.g. less than 60 builds per user per week)
  • Limit project sizes โ€ don't let people create builds that are too large! Limitations: < 10 MB repo zip, < 2 MB phar artifact
  • Fix XSS problems

API + More dynamic UI

Add more API for other people to create clients for poggit.

Use more AJAX to load data so that the UI is more responsive.

Suggestion: Display author on plugin release page

On the page with all the releases, you can see the author of every plugin under the name of it. When clicking the plugin, the name of the author seems impossible to find however, which is a bit inconvenient sometimes. Could you maybe display the name of the author on the release page of every plugin as well? It would be greatly appreciated.

Release authors

Releases should contain a list of real authors to be displayed in the release page. This may or may not be used with credit management.

Poggit Requires default branch use

When attempting to add a new repository to poggit, I did not add the master branch (because that has a website on it with no plugins) to the .poggit.yml and only added the plugins branch. Poggit automatically disabled that repository until I manually added the master branch to the config

Lint formatting issue

I'm pretty sure that the box is supposed to be around the text, but in this picture, the text goes out of the box
screenshot 38

Count downloads of each build

I think it would be cool if poggit showed how many times each build was downloaded. And then on the project page it would show the total downloads.

Request:

I noticed that the released plugins turns into reviewed plugins at about the 3rd page. I was wondering why the reviewed plugins were in the released section if they haven't been officially released yet. Is this unintentional or on purpose?

LoadBuildHistoryAjax security leak

LoadBuildHistoryAjax does not check whether the requesting user scope has permission to view the requested project.
This results in security leak for projects in private repos where Elvin can query Poggit over an increment to see hidden projects.

Stay signed in button

Below the 'Login with GitHub' button there should be a checkbox to stay logged in.

Repository not added after confirming

I previously attempted to add an empty repository to poggit and in the process, added a .poggit.yml file to the repository. After poggit recognised the repo as empty and removed it, I added my plugin files and attempted to re-add it back to poggit. I unchecked the create .poggit.yml box and clicked confirm. The repository still wasn't added even though there are the plugin's files in the repository and a .poggit.yml

Deployment

Create a deployment application for servers to manage (e.g. auto update) their plugins from Poggit plugin list.

How do you use the API?

Heyo.

Im making an app and a plugin which requires the poggit api, but i have no idea how to use it.
https://poggit.pmmp.io/api shows "Invalid JSON string".

Basically all i need to do is list the plugins, get individual plugin info and get the plugin download link via the api.

Suggestion: Make poggit logo redirect to Home page.

Thanks for putting hours of work in Poggit, it's starting to become something absolutely amazing! There is one thing I'd like to ask if you could add that, which I don't think is too hard to do. Do you think it would be a good idea to make the Poggit logo on the top left corner redirect you to the home page when clicking it? No problem if you don't like the idea. I just feel like it makes the website even better!

Anyways, keep up the great work!

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.