Skip to main content
This guide assumes Nexus Core is already installed and running. If not, follow the Installation guide first. By the end of this page, you will have a working DataAddon registered and a signed packet flowing from a Spigot server through Redis to MongoDB and back.

Prerequisites

  • Nexus Core v1.5.1 running with the web panel accessible at http://localhost:8080
  • NEXUS_SIGNING_KEY set to the same value on Nexus Core and your Spigot server
  • Redis and MongoDB connected (verified in the web panel)

Steps

1

Create a DataAddon class

Create a class that extends DataAddon, implement the required methods, and annotate your document fields with @DbDataModels. The addon below stores player statistics in a player_stats MongoDB collection.
2

Register the addon on startup

Register the addon with the protocol handler during your application startup:
Nexus Core now routes all requests for protocol ID 100 to the player_stats collection automatically.
3

Send a signed request from your Spigot server

On the Spigot side, construct a signed JSON packet and publish it to the Nexus Redis channel. As of v1.5.1, Nexus Core also signs its outgoing responses, so your client must be ready to verify the sig, timestamp, and nonce fields on the response.GET_DATA request:
Build the sig field by computing HmacSHA256(NEXUS_SIGNING_KEY, allFieldsExceptSig) and encoding the result as Base64.
4

Receive and verify the signed response

Nexus Core publishes the response to your server’s Redis channel. Since v1.5.1, responses also include timestamp, nonce, and sig fields. Verify the signature before trusting the data:

Next Steps

Building Addons

Learn how to define schemas, gate requests, and build production-ready addons.

Security

Understand symmetric HMAC signing on both inbound and outbound messages.