Coder Social home page Coder Social logo

spongepowered / ore Goto Github PK

View Code? Open in Web Editor NEW
75.0 22.0 25.0 10.72 MB

Repository software for Sponge plugins and Forge mods

Home Page: https://ore.spongepowered.org/

License: MIT License

Scala 55.02% HTML 20.38% CSS 0.08% JavaScript 14.04% Java 0.03% Python 0.47% PLpgSQL 6.03% Batchfile 0.01% Shell 0.01% Vue 1.97% SCSS 1.98%
sponge sponge-plugin sbt scala minecraft jvm hacktoberfest

ore's Introduction

Ore

Build Status Ore Build Status Scalafmt

Repository software for Sponge plugins and Forge mods https://ore.spongepowered.org/

Ore is written in Scala using the Play framework.

Clone

The following steps will ensure your project is cloned properly.

  1. git clone https://github.com/SpongePowered/Ore.git
  2. cp scripts/pre-commit .git/hooks

Setup

After cloning Ore, the first thing you will want to do is create a new PostgreSQL 11 database for the application to use. This is required in order for Ore to run. Learn more about PostgreSQL here.

You will also need to enable a few extensions for Ore. These are:

In addition, you need to install Node.js and Yarn. Installation instructions are available for Node.js and Yarn.

After setting up a database, create a copy of application.conf.template named application.conf and configure the application, for the application you want to run. This file is in the .gitignore so it will not appear in your commits. Your local copy needs to get updated every time you pull changes, which add a new setting to the config. Currently valid applications are ore and jobs, and their configuration files can be found in ore/conf/application.conf.template and jobs/src/main/resources/application.conf.template.

In a typical development environment, most of the defaults are fine. Here are a few you might want to take a look at though.

For ore:

  • You can disable authentication by setting application.fakeUser to true.

Running

Running Ore is relatively simple.

With SBT

  • Download and install the latest SBT version.
  • Execute sbt ore/run in the project root to run the web app.
  • Execute sbt jobs/run in the project root to run the jobs processing.
  • Note: You are advised to keep the sbt shell open when doing development instead of starting it for each task.

With IntelliJ Community Edition

  • Install the Scala plugin.
  • Import the build.sbt file.

For ore:

  • Create a new SBT Task run configuration. Enter ore/run in the Tasks field.
  • Untick the box that says Use sbt shell
  • Run it.

For jobs:

  • Either repeat the process for ore, but use jobs/run instead of ore/run.
  • Or, click the green triangle next to OreJobProcessorMain when opening up the file.

Note: You might encounter a stack overflow exception when compiling ore. This is not unexpected. Just assign more stack size to sbt in the way you're starting sbt. -Xss4m should be enough. If you're using IntelliJ, you can set this in the VM arguments field. If you're invoking sbt directly, the most common ways to set this is either through the SBT_OPTS environment variable, or with a file named .jvmopts with each flag on a new line.

ore's People

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

Watchers

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

ore's Issues

Footer

Site needs a footer. Please discuss what you think it should contain here.

TODO: Frontend

  • Category drop down
    • Admin Tools
    • Developer Tools
    • Chat
    • Economy
    • Protection
    • Games
    • Role Playing
    • World Management
    • Gameplay
    • Miscellaneous
    • More/Less?
  • Latest/New/Hot/Top Sorting
  • Search
  • Developer pages
  • Team pages
  • Color code versions
  • Channel filtering
  • Embedded Discourse discussion
  • Sign up page
  • Login page
  • Docs editor
  • Project manager
  • Channel editor
  • Flag reason popup
  • More...?

File upload offloading

Once uploaded, files should be kept locally for a short time before being offloaded to repo.spongepowered.org.

This means you need:

  • small background task which waits for new files and periodically attempts to upload them over FTP (make background tasks separate to the webserver, please, I don't want multiple instances of webserver == dozens of copies of background task, that makes me ๐Ÿ˜ญ)
  • ability to redirect to signed URL (signing algorithm TBD, it'll just be Yet Another Secret + timestamp)
  • need to be able to differentiate between currently-locally-stored files and uploaded-to-repo files (if you want to serve immediately - alternate approach is that you just bite the bullet and don't display it to people until it's been uploaded, which works equally well)

Support emojis

Include support for emojis, as seen on the Sponge Forums.

[WIP] API Specification

This Issue is to work on defining the API specification for Ore API v1 either in the main Ore implementation or in Pore. Pinging @lukegb


GET /api/projects/

[
    {
        "id": "<project_id>",
        "name": "<project_name>",
        "description": "<project_description>",
        "owner": "<project_owner>",
        "developers": [ "Spongie", "Dev1", "Dev2", "Dev3" ],
        "teams": [ "SpongePowered", "Team1" ],
        "channels": [ "Alpha", "Beta", "Release" ],
        "recommended": "<download_link>"
    }
    ...
]

GET /api/users/:user/

{
    "name": "<user_name>",
    "type": "<dev|team>",
    "starred": "<starred>",
    "teams": [ "SpongePowered", "Team1", "Team2", "Team3" ],
    "projects": [ "Plugin1", "Plugin2", "Plugin3" ]
}

GET /api/projects/:owner/:name/

{
    "id": "<project_id>",
    "name": "<project_name>",
    "description": "<project_description>",
    "owner": "<project_owner>",
    "developers": [ "Spongie", "User1" ],
    "teams": [ "SpongePowered", "Team1" ],
    "channels": [ "Alpha", "Beta", "Release" ],
    "recommended": "<download_ref>"
}

GET /api/projects/:owner/:name/channels/:channel/

[
    {
        "version": "1.0.0",
        "description": "<version_description>",
        "url": "<download_ref>"
    }
    ...
]

More...

"More" button shows up always (even if un-needed)

The more button should be smart about showing up. Right now it shows even if a category has no projects.

As for showing up with projects, set a decent amount of projects before seeing it...whichever wouldn't tax the backend too much (20?)

API Key for developers / teams

We should consider some sort of API secret so SpongeGradle can have a release task that uploads the latest version. But possible security issues?

Discuss Page Discussion and Requirements

So thinking forward to the Discuss page, following are my requirements:

  • Embed Discourse discussions into the project page
  • Create thread on forums for Ore project but un-list it. May not be desirable with the below.
  • @windy1 discovered that Discourse doesn't provide a "reply" box for embedded discussions. We'll need to create one for Ore's purposes
  • You'll get notifications on the forums for replies to the Ore thread. You can comment on the forums to that thread and those replies end up on the Ore discuss page. A good example is what Neowin does at www.neowin.net where the main site pages comments are just forum posts on a forum thread in the background. This doesn't mean you can't comment on the Ore discuss page. Just two avenues of approach.
  • The generated forum post should ONLY have a link to the Ore thread. This one should be discussed further, my Neowin example puts the main post content into the forum thread OP but trims it some.

Any more thoughts or opinions? Post them here...the discuss page is a big part of Ore and a requirement before beta status.

ZIP Validation

How exactly does ZIP files get handled during the project creation process? If I have a zip file with three jars, is it declined or is the first it finds used?

TODO: v1.0.0-BETA

Official Ore Backend TODO List

  • Data structures
    • Project
      • has Channels
        • has Versions
      • has Authors
    • Author
      • Dev
      • Team
        • has Devs
  • Database integration (MySQL PostgreSQL)
    • Slick setup
    • Evolutions integration
    • Slick integration with models
  • Authentication / Authorization
    • Single-sign-on (SSO)
    • Update views based on authorization / permissions
  • Uploads
    • Basic plugin uploading
    • Better file validation
      • Check meta file against plugin annotation Annotation is ignored by Sponge if meta file is present
    • Allow ZIP Archive bundles with plugin JAR in top level
    • Add version to existing project
  • Project management
    • Recommended download (main download link)
    • Change description Version level descriptions only
    • Create
    • Rename
    • Delete
    • Add Team Moved to later release
    • Add Developer
    • Roles Moved to later release
    • Permissions Moved to later release
    • New version
    • Set category
  • Statistics
    • Views
    • Downloads
    • Starred
  • Channel management
    • Color coded
    • Max channels per project: 5?
    • No duplicate colored channels
  • Team management Moved to later release
    • Add/remove members
    • Permissons Moved to later release
    • Roles Moved to later release
    • Project list
    • Activity feed Moved to later release
    • Team info
    • Starred
  • Developer management
    • Create/disband team Moved to later release
    • Project list
    • Activity feed Moved to later release
    • Developer info
    • Starred
  • Docs editing
    • Markdown editor (3rd party library?)
    • Validation
    • Max pages per project: 10?
  • Project flagging
    • Reason
    • Moderation queue
  • Sorting algorithms
    • Latest: Recently discussed and/or updated
    • New: Recently created
    • Hot: Recently popular later
    • Top: Most popular
  • Discourse integration
    • Embedded discussion from forums
  • Pagination
    • Projects
    • Versions
  • More...?

Coordinate navbar sizing and widget positioning with Forums page

Now that we've got the widths where we want them we should get @Owexz here to coordinate making his navbar the same size as Ore's and position the Sponge logo and Avatar widgets to be at the same positioning.

This will really help sell to people that Ore is a part of our web services and not a separate component.

Duplicate Uploads

We shouldn't allow people to add new versions with files that have the same md5 as past versions.

Establish color template across Ore

Maybe it is just me but even if yellow is our brand coloring, I have issues with reading the words that are yellow...they bleed together and I tend to have to re-read some names to make sure I'm reading this right.

This would be fixed if Ore had a black theme (YES YES YES YES YES YES) and the yellow on the black would be so so sexy but if we want to keep the light theme then we should consider different shades of yellow.

@tzk , maybe you could help too?

Project name regex

We need to come up with a regular expression for allowed project / channel / version names. Currently anything is permitted.

Terms of Service

We need to write up a "terms of service" for Ore as sort of a disclaimer so we aren't held responsible if someone downloads a plugin that blows up their server.

IANAL.

Disallow spaces in project names (or have separate slugs)

Spaces don't translate well to URLs (%20 everywhere), so if you're going to allow them in project names we need slugs which are different (and are separately deduplicated)

Alternatively, just don't allow spaces in project names, and push people to using - and _ instead (potentially automatically replacing spaces with - like GitHub itself does)

Incorrect avatar used

I use a custom avatar image on the forums and Ore seems to generically use gravatar. May want to try and use whatever is in use on the forum.

My avatar is missing...?

On the Sponge forums, my avatar shows my Minecraft skin (same as my GitHub avatar, but round). On Ore, it uses the default Gravatar icon. Could someone fix this?

It seems to happen with other Ore accounts as well, but not all. I'm not sure what the cause is.

Specify namespace on project creation (for repository resolution)

The intention is for Ore plugin uploads to hit repo.spongepowered.org and, eventually, be able to be pulled from maven just like a project on Maven Central/etc. For this to work out, we need that namespace and for it to be concrete. Relying on a fully qualified id from the plugin id isn't acceptable (and frankly may be removed soon).

Encourage any and all discussion on the matter.

Localization

Play can be localized through the Messages API. Currently there's a mix of string constants defined in the conf/messages.en-US file and in plain HTML mostly cause lazy but Ore can be localized by creating new files with language code extensions (conf/messages.fr).

Most strings in the views should be moved to language files.

Logging into Ore fails

Whenever I press the login button on Ore site, there is an exception in the code. The exception id is 6pkocd6b9. I am logged in on the forums when I try to login to Ore, so that is not the cause.

Project Submission Changes

So I played around with adding a new project and want the following adjusted:

  • After you choose a file, either upload it automatically or give me some status of what I've chosen (jar name and file size). Right now I actually waited a sec for some feedback before realizing I need to hit "upload".
  • There is no need for the two step process to be constrained to a small rectangle box. Make it a bit bigger so it stands out more
  • This coincides with my other issue about selecting categories and how that shows to the end user but plugins should be able to classify themselves as multiple categories. Set a limit on it if you wish (up to 5?)

Sizing of navbar

I feel the navbar is a bit too thick and cuts into the site content a bit much than necessary.

Specify source and issues

There are Docs, Versions, and Discuss tabs on projects right now, and it would be nice to be able to configure (in project settings, not just at creation time) optional links to a Source repository and to an Issues manager.

Have Ore adhere to responsive UI

Noticing this across the product but how Ore displays its products and pages could benefit greatly by making use of the space available to the browser. Any way to do this without breaking mobile support?

Revise display of selected categories/channels

After looking at the categories/channels selections, I feel that the better solution would have them be colored when selected (colored label) and uncolored when not. Much better than clicking a little eye :).

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.