Go to file
MiniDigger | Martin 6d070e38b7 chore: lint
2024-07-20 16:53:17 +02:00
.github Update add-to-project action 2024-07-11 21:55:19 +02:00
.idea feat: introduce auto imports and add e2e tests (#1318) 2024-03-23 15:24:38 +01:00
.run feat: implement basic oauth2 features 2023-12-16 19:41:04 +01:00
backend feat: seo improvements (closes #1385) 2024-07-20 15:09:44 +02:00
chart fix: properly crash on oom 2024-03-23 15:47:06 +01:00
docker feat: add minio dev docker config 2023-08-20 09:46:46 +02:00
e2e chore: update deps 2024-07-20 09:10:04 +02:00
frontend chore: lint 2024-07-20 16:53:17 +02:00
.editorconfig chore: code cleanup 2022-12-27 12:16:57 -08:00
.gitattributes fix image problem 2021-02-06 11:33:34 -08:00
.gitignore chore: commit language injections for jdbi 2022-12-27 21:50:32 +01:00
.gitmodules Update readme 2022-07-02 21:19:41 +02:00
CONTRIBUTING.md bunch of stuff 2022-06-16 02:25:09 +02:00
crowdin.yml fix: minor changes to translation 2024-05-25 11:13:58 +02:00
LICENSE Update README and LICENSE 2023-01-26 12:02:35 +01:00
README.md fix: minor changes to translation 2024-05-25 11:13:58 +02:00

Hangar - Paper's Plugin Repository

Crowdin Discord GitHub License Swagger Validator BrowserStack Status

This is the repository for Hangar, a plugin repository used for Paper, Velocity, and Waterfall plugins and similar software.

Hangar is loosely based off of Ore, created by the Sponge project, but rebuilt from the ground up using the Spring Boot Framework in Java for the backend and Nuxt (with UnoCSS) for the frontend. We would like to thank all Ore contributors. Without them, this project would never have been possible.

On top of our production instance at https://hangar.papermc.io/, we have a staging instance for testing purposes: https://hangar.papermc.dev/.

Contributing

The project consists of 3 main parts

  • Frontend (Vue.js under Nuxt with UnoCSS)
  • Backend (Spring Boot)
  • Database (PostgreSQL)

Development Setup

Fork the project and pull it in your IDE.

Prerequisites

  • Docker is required in order to run the PostgreSQL database and the dummy email server
  • Java 17 or higher
  • pnpm
  • mvn
  • git

Setting up

To get the project running locally, you need to follow a few steps:

  1. Get the dummy database, storage and email server up and running. Move to the docker folder cd docker then run docker-compose -f dev.yml up -d (-d as an optional parameter to run the containers in the background). Alternatively, if you are using IntelliJ you can press the green arrow in the docker/dev.yml file.
  2. Move to the backend directory: cd ../backend. In that directory, run mvn spring-boot:run, or if you're using IntelliJ, it is included in the run configurations.
  3. Move to the frontend directory: cd ../frontend. In that directory, run pnpm install. This will install all the needed Node modules.
  4. After the installation, run pnpm run dev in the frontend directory to initiate the build and launch. Changes you do to the frontend will be reloaded automatically.
  5. After that, open http://localhost:3333, and if all went well, Hangar should be up and running.

Notes

  • The Spring Boot configuration file that is used by this environment is located at backend/src/main/resources/application.yml.
  • You can view the emails hangar sends on http://localhost:4436/
  • On staging/prod Hangar uses object storage, if you want to test that you can install minio and change the storage type to object in the application.yml

Deployment

Deployment happens via a helm chart in the /chart folder. The Spring Boot configuration file used for deployment can be found at chart/templates/secret-hangar-backend.yaml (however it will be overridden with the actual values via helm).

Translations Crowdin

Hangar uses Crowdin for translations. If you want to contribute to translations, create a Crowdin account at https://hangar.crowdin.com/hangar and simply add new translations or comment/vote on existing translations. You can learn more about navigating the Crowdin UI here: https://support.crowdin.com/online-editor/.

Getting translations locally (mostly for developers, requires Crowdin CLI, ran in root folder):

crowdin pull -b master -T <PAT>

You might want to set the env var TRANSLATION_MODE to true in order to get warnings about untranslated strings.

Contributing

Most of our current and future plans can be found in the Hangar Roadmap Project. Your best bet is joining the #development channel on the Hangar Discord to start discussing potential contributions and ideas. With Hangar being such a massive project, any contributions are welcome!

Updating the frontend dependencies can be done best by running npx npm-check -u and going through the changelogs. Note that package.json might contain hints to which dependencies are broken.

Tracing

If you want to have traces available locally, you can run zipkin via the docker-compose file zipkin.yml in the docker folder like this:

cd docker
docker-compose -f zipkin.yml up -d

Then just enable it in the application.yml under management.tracing. You also need to comment in the dependency in the pom.xml

License

Hangar is licensed under the permissive MIT License.

A large part of the backend is based on Ore, also licensed under MIT:

Copyright (c) SpongePowered <https://www.spongepowered.org>
Copyright (c) contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.