Skip to content
This repository has been archived by the owner on Oct 22, 2022. It is now read-only.
/ hermes Public archive

An unofficial Modrinth webhook & RSS service

License

Notifications You must be signed in to change notification settings

venashial/hermes

Repository files navigation

Hermes

GitHub Workflow Status GitHub last commit

Hermes is a service that connects webhooks to Modrinth project releases. In addition, it has a RSS, Atom, and JSON feeds for Modrinth projects. The Hermes backend uses NodeJS and is connected to a PostgreSQL database. The frontend uses vanilla JS with server-side EJS for templating.

⚠️ Not actively maintained. Webhooks may eventually become part of Modrinth natively.


Usage

Webhooks currently aren't working. If you want to receive discord updates, you can use a discord RSS bot with the feed, https://hermes-webhooks.herokuapp.com/api/v1/feed/rss/lithium, replacing lithium with your mod slug or id

Feeds (RSS, Atom, JSON)

  1. Get your Modrinth project ID or slug.
  2. Make a feed URL using the structure <hermes-instance>/api/v1/feed/:format/:project_id_or_slug.
    Supported formats: rss, atom, json.

Here's a feed URL example for Lithium

https://hermes-webhooks.herokuapp.com/api/v1/feed/rss/lithium

Public instances

Status Uptime URL Version
Uptime Robot ratio (30 days) https://hermes-webhooks.herokuapp.com/ master (unstable)

Alternative self-hosting

Docker compose (Recommended)

Make a copy of this file called docker-compose.yml and replace example.com with the domain you will be using. In the same directory as that file run:

docker-compose up -d

Now go use Hermes at http://localhost:8050/! (Or http://<server-ip>:8050/ and https://<domain>/ depending on your configuration.)

Heroku (Recommended)

Deploy
Make your Heroku app stay online. To run your app without a bedtime, add your credit card to your Heroku account. (Heroku won't charge you for anything.)

Docker

First, run a PostgreSQL container:

docker run --name hermes-postgres -e POSTGRES_PASSWORD=secretpassword -e POSTGRES_USER=username -e POSTGRES_DB=hermes -p 5432:5432/tcp -d --restart unless-stopped postgres

Next, run the Hermes container: (Replace example.com with the domain where hermes will be)

docker run --name hermes -e DATABASE_URL='postgres://username:secretpassword@localhost:5432/hermes' -e DOMAIN='example.com' -p 8050:8060/tcp --restart unless-stopped ghcr.io/venashial/hermes:latest

You'll either want to change the port from 6000 to 80, and port forward that OR use something like Nginx to reverse proxy the

Node

Clone the repo, install dependencies, and run npm start. In addition, run an instance of Postgres.

Required environment variables:
DOMAIN ('example.com')
DATABASE_URL ('postgres://user:[email protected]/databasename')
Optional:
USE_DATABASE_SSL (true)


Develop

Requires node to be installed

# install dependencies
$ npm install

# set up database
$ npm run migrate:latest

# serve with hot reload at localhost:3000
$ npm run dev

TODOs

  • API tests
  • Frontend rewrite in Svelte
    • Add Jest tests
    • Add curseforge links
    • Client side form errors
    • Modrinth project name preview
    • Discord/json message preview

Contributing

Pull requests are welcome.

License

MIT


Hermes is not affiliated with Modrinth.