Git Product home page Git Product logo

lavacake's Introduction




Lavacake
A freshly baked Hypixel webserver!

🍰 Introduction

Lavacake is a drop in & use Hypixel API webserver, so you can rest easy knowing you have time to work on your Hypixel projects without spending time coding a pesky API.

  • It's fast! Lavacake runs on Bun, making it lightning fast for users & developers alike.
  • It's clean! Lavacake cleans up the Hypixel API, adding more wrapping & removing the junk.
  • Very tasty! Every instance of Lavacake is guaranteed to taste good. Make sure to enjoy!

Looking for something with a broken scrollwheel? Check these links out to quickly jump:

πŸ—ΊοΈ Roadmap

? Feature
βœ… Network XP Wrapping
βœ… Housing Wrapping
βŒ› Bed Wars Wrapping
βŒ› SkyWars Wrapping
βŒ› Pit Wrapping

πŸ’– Contributing

Contributing is simple, make a fork & merge it when you're done. We do request you to please run bun run pretty to format your code to be in line with our style guidelines.

πŸ“¦ Installation

This installation guide is intended for Linux servers as they are most common and also the best place performance-wise for Lavacake. There may be incompatibility issues for macOS and Windows.

Prerequisites

Lavacake is best run through a reverse proxy (such as NGINX) software, this is due to the extra headers provided by said software allowing ratelimits to work. Of course, a reverse proxy is not required. See the second link for disabling user ratelimits.

You also need Bun, Lavacake cannot be used with Node.js & uses native Bun features! Installing Bun only takes 10 seconds, so make sure to get it installed!

Installing Lavacake

You can either grab the latest release of Lavacake from the releases tab, or get a copy of the codebase with the <> Code button.

Navigate into Lavacake's directory using your command line. If you are using the same command line process as you did when installing Bun, you might have to restart the process or start a new process.

Once in the main directory containing the package.json file, run the following command to get all the packages:

bun install

You can start Lavacake using the following command, but first look at configuring Lavacake.

bun start

Configuring Lavacake

Lvacake has two configuration files, one containing your tokens & the other containing your config.

First, create a new file called token.json and paste in the following:

{
    "devToken":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "appToken":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "active":"devToken"
}

These tokens should be replaced with your as seen on the Hypixel Developer Portal. You should request an Application Token, and then copy that token into the appToken field. If you do not have an approved application yet, use a developer token and paste in in the devToken field. You can change the active field to devToken or appToken for which token to use.

Now, please open config.json and we'll explain what all the funky values mean.

  • apiLimit
    • reqAmount: The amount of requests you can handle in a certain time period. Please check the developer portal for these ratelimits.
    • timeSec: The time period of the reqAmount in seconds.
  • userRatelimit (NGINX only)
    • reqAmount: The amount of requests a user may send before being ratelimited. This is to prevent malicious API scraping & spam requests.
    • expires: The time in seconds before a request is removed from the ratelimit.
    • enabled: Whether or not user ratelimiting is enabled. If you do not use NGINX, this should be set to false.
  • port
    • The port to run Lavacake on, e.g. 9753. Please check this Wikipedia article for a list of port standards to prevent conflicts.

❓ FAQ

  • What "junk" is being removed by Lavacake?
    • At the minute, we're looking at only implementing core statistics for games & wrapping what's most used (e.g. levels & coins). It might seem generic to say junk, but not enough people will be checking the Mega SkyWars Quit Count for it to be wrapped. If there's anything missing that you would like included in Lavacake you can open an issue at our issues page.
  • How do I access the raw, unwrapped API data?
    • Just put "raw" before an endpoint name, e.g. player -> rawPlayer (camelCase)

lavacake's People

Contributors

ixnoahlive avatar robere2 avatar

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.