Before contributing to SkyCrypt, make sure you install the development environment first. If you have trouble building SkyCrypt or have any development questions, please don't hesitate to contact us on Discord!
- Node.js (at least v16, as some of the features we use require it)
- MongoDB, alternatively you can use the free online version (more instructions below)
- Redis, use this link for Windows, and this link for other OS's (more instructions below)
- A Hypixel API key
- Nginx (Optional but an ideal choice for full deployment)
- Redis
- On Windows, you can get Redis through this link. Download the zip, extract it, and run it by double clicking
redis-server.exe
- On Windows, you can get Redis through this link. Download the zip, extract it, and run it by double clicking
- MongoDB
- Instead of installing Mongo on your device, you can use the free MongoDB Atlas program here. It does require an account, but it is free.
-
Clone the repository. You can do this on the command line by running
git clone https://github.com/SkyCryptWebsite/SkyCrypt.git
Alternatively, you can use a git GUI like GitHub Desktop to clone it.
-
Run
pnpm i
in the project directory to install the necessary dependencies.- Some operating systems may require extra dependencies, such as node-canvas
-
Go to
developer.hypixel.net/dashboard
. ClickCreate API Key
and copy the result. -
Open
credentials.json
and input your Hypixel API key into thehypixel_api_key
field. -
In the
dbUrl
field, input your MongoDB URL. In thedbName
field, input the name of the database you would like to use. -
(optional) If you are not using the default Redis port or you are using Redis remotely, you can configure the Redis URL with the
redisUrl
field incredentials.json
. Alsodiscord_webhook
if you want to send errors remotely, useful in production to detect bugs. -
Make sure your Mongo and Redis instances are running, run
pnpm start
for production orpnpm dev
for development in the project directory. You should now be able to access the site at http://localhost:32464/
If you're not sure what code editor to use VS-Code is a great option. Here are some recommendations for using VS-Code to work on SkyCrypt.
Setting | Recommended Value |
---|---|
Editor: Default Formatter | Prettier - Code formatter |
Editor: Format On Save | checked |
JavaScript › Validate: Enable | unchecked |
Files: Eol | \n |
You can also apply all these settings by creating a file called settings.json
inside .vscode
and copying the following into it:
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"javascript.validate.enable": false,
"editor.formatOnSave": true,
"files.eol": "\n"
}