Skip to content

theLeialoha/mod-update-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mod Update Server

Note

This project is a rewrite of henkelmax/mod-update-server. This is not a replacement but some inspiration from @henkelmax's project. Please, go give him some support!

A server for Minecraft modders that manages all your mod updates. It provides a web interface and REST API to manage everything. This can be used directly for the Forge Update Checker/NeoForge Update Checker.

Useful Links


Requests

Method Path Description
GET /mods A list of all mods.
GET /mods/MOD_ID A specific mod by its mod ID.
GET /updates?amount=16&page=0 All updates for all mods. Query parameters: amount for the update count per page, page for the page.
GET /updates/MOD_ID?amount=16&page=0 All updates for a mod. Query parameters: amount for the update count per page, page for the page.
GET /updates/MOD_ID/UPDATE_ID A specific update.
POST /updates/MOD_ID Adds a new update. Requires an apikey in the header. See Update.
POST /updates/MOD_ID/UPDATE_ID Updates an update.
DELETE /updates/MOD_ID/UPDATE_ID Deletes an update. Requires an apikey in the header.
DELETE /mods/MOD_ID Deletes a mod. Requires an apikey in the header.
POST /mods/add Adds a new mod. Requires an apikey in the header. See Mod.
POST /mods/edit/MOD_ID Edits an existing mod. Requires an apikey in the header. See Mod.
GET /forge/MOD_ID The Forge update check format.
GET /neoforge/MOD_ID The NeoForged update check format.
GET /check/LOADER/MOD_ID A general purpose update check format.
GET /apikeys A list of all API keys.
POST /apikeys/add Adds a new API keys. See ApiKey.
DELETE /apikeys/APIKEY Removes an API keys.
GET /backup Creates a backup of the mods
POST /backup/restore Restores the backup of the mods

Example Update

{
  "publishDate": "2023-12-08T14:48:00",
  // The publishing date (used to order the updates).
  "gameVersion": "1.20.4",
  // The game version.
  "modLoader": "forge",
  // The mod loader [forge, neoforge, fabric, quilt]. Default value: "forge".
  "version": "1.0.0",
  // The mod version.
  "updateMessages": [
    "Updated to 1.20.4",
    "Added readme.md"
  ],
  // The update messages (Changelog etc.).
  "releaseType": "release",
  // The release type [alpha, beta, release]. Default value: "release".
  "tags": [
    "recommended"
  ]
  // Additional tags e.g. recommended.
}

Example Mod

{
  "modID": "examplemod",
  // The mod ID (used to identify the mod)
  "name": "Example Mod",
  // The name of the mod
  "description": "Just an example mod",
  // The mod description
  "websiteURL": "https://example.com/examplemod",
  // The URL to the mods website
  "downloadURL": "https://example.com/examplemod/files",
  // The URL to the mods download page
  "issueURL": "https://example.com/examplemod/issues"
  // The issue tracker url of this mod
}

Example ApiKey

{
  "mods": [
    "examplemod"
  ]
  // The mods that this key has access to ("*" for every mod)
}

Usage

See this.

Development Setup

Prerequisites

Installation

./yarn build
./yarn start

Running the project in development

./yarn dev
Details and the web interface is usually available at port 3000 (If not already in use).

The web interface is in development

The REST API should be available at port 8088

Environment Variables

Variable Description Default Value
DB_PROTOCOL The Protocol of the MongoDB database mongodb
DB_HOSTNAME The IP / Hostname of the MongoDB database
DB_PORT The port of the MongoDB database
DB_NAME The database name
DB_USERNAME The database username
DB_PASSWORD The database password
HOST The webserver hostname 0.0.0.0
PORT The webserver port 8080
MASTER_KEY The master apiKey (e.g. 62387f34-7678-4737-bfc4-2cb600337541)
LOGIN_USERNAME The username for the web UI login admin
LOGIN_PASSWORD The password for the web UI login admin

About

A server for Minecraft modders that manages mod updates. (inspiration)

Topics

Resources

Stars

Watchers

Forks