All Projects → crafatar → Crafatar

crafatar / Crafatar

Licence: mit
A blazing fast API for Minecraft faces

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Crafatar

Unifiedmetrics
Fully-featured metrics collection agent for Minecraft servers. Supports Prometheus and InfluxDB. Dashboard included out-of-box.
Stars: ✭ 29 (-86.32%)
Mutual labels:  api, minecraft
Fastboard
Simple Bukkit scoreboard API with 1.7.10 to 1.16 support.
Stars: ✭ 62 (-70.75%)
Mutual labels:  api, minecraft
Antilaby
AntiLaby plug-in for Bukkit
Stars: ✭ 6 (-97.17%)
Mutual labels:  api, minecraft
Memento
Memento is a development-only tool that caches HTTP calls once they have been executed.
Stars: ✭ 380 (+79.25%)
Mutual labels:  api, caching
Thispersondoesnotexist Js
Api for https://thispersondoesnotexist.com Generates an image of a person that does not exist in real life
Stars: ✭ 101 (-52.36%)
Mutual labels:  api, avatar
Connectedtexturesmod
Extensions to the vanilla model system, mainly for connected textures
Stars: ✭ 64 (-69.81%)
Mutual labels:  api, minecraft
Spongeapi
A Minecraft plugin API
Stars: ✭ 1,043 (+391.98%)
Mutual labels:  api, minecraft
Xseries
Library for cross-version Minecraft Bukkit support and various efficient API methods.
Stars: ✭ 109 (-48.58%)
Mutual labels:  api, minecraft
Libgui
Buttons & Co
Stars: ✭ 78 (-63.21%)
Mutual labels:  api, minecraft
Tortilla
Wrapping web APIs made easy.
Stars: ✭ 1,215 (+473.11%)
Mutual labels:  api, caching
Minecraft Avatar
PHP script (using GD) to generate avatar or skin from a Minecraft username
Stars: ✭ 104 (-50.94%)
Mutual labels:  minecraft, avatar
Item Nbt Api
Add custom NBT tags to Items/Tiles/Entities without NMS!
Stars: ✭ 163 (-23.11%)
Mutual labels:  api, minecraft
Mercure
Server-sent live updates: protocol and reference implementation
Stars: ✭ 2,608 (+1130.19%)
Mutual labels:  api
Pokeapi
The Pokémon API
Stars: ✭ 2,695 (+1171.23%)
Mutual labels:  api
Bilibili Api Collect
哔哩哔哩-API收集整理【不断更新中....】
Stars: ✭ 4,497 (+2021.23%)
Mutual labels:  api
Instagram Api Python
Unofficial instagram API, give you access to ALL instagram features (like, follow, upload photo and video and etc)! Write on python.
Stars: ✭ 2,357 (+1011.79%)
Mutual labels:  api
Haste
Haste: a fast, simple, and open RNN library
Stars: ✭ 214 (+0.94%)
Mutual labels:  api
Alfred Workflow
Full-featured library for writing Alfred 3 & 4 workflows
Stars: ✭ 2,622 (+1136.79%)
Mutual labels:  caching
Cornichon
Scala DSL for testing HTTP JSON API
Stars: ✭ 211 (-0.47%)
Mutual labels:  api
Openapi Diff
Utility for comparing two OpenAPI specifications.
Stars: ✭ 208 (-1.89%)
Mutual labels:  api

Crafatar

logo

travis Coverage Status Code Climate dependency status devDependency status docs status

Crafatar serves Minecraft avatars based on the skin for use in external applications. Inspired by Gravatar (hence the name) and Minotar.

Image manipulation is done by lwip. 3D renders are created with node-canvas / cairo.

Contributions welcome!

There are usually a few open issues.
We welcome any opinions or advice in discussions as well as pull requests.
Issues tagged with help wanted show where we could especially need your help!

Examples

jomo's avatar Jake_0's avatar Notch's avatar sk89q's avatar
jomo's 3d head Jake_0's 3d head Notch's 3d head sk89q's 3d head
jomo's 3d body Jake_0's 3d body Notch's 3d body sk89q's 3d body
jomo's skin Jake_0's skin Notch's skin sk89q's skin

Usage / Documentation

Please visit the website for details.

Contact

Installation

Docker

docker network create crafatar
docker run --net crafatar -d --name redis redis
docker run --net crafatar -v crafatar-images:/crafatar/images -e REDIS_URL=redis://redis -p 3000:3000 crafatar/crafatar

Manual

  • Install nodejs 12 (LTS)
  • Install redis-server
  • Run npm install
    If that fails, it's likely because because of node-canvas dependencies. Follow this guide to install them.
  • Run npm start

Crafatar is now available at http://0.0.0.0:3000.

Configration / Environment variables

See the config.js file.

Operational notes

inodes

Crafatar stores a lot of images on disk. For avatars, these are 8×8 px PNG images with an average file size of ~90 bytes. This can lead to issues on file systems such as ext4, which (by default) has a bytes-per-inode ratio of 16Kb. With thousands of files with an average file size below this ratio, you will run out of available inodes before running out of disk space. (Note that this will still be reported as ENOSPC: no space left on device).

Consider using a different file system, changing the inode ratio, or deleting files before the inode limit is reached.

disk space and memory usage

Eventually you will run out of disk space and/or redis will be out of memory. Make sure to delete image files and/or flush redis before this happens.

Tests

npm test

If you want to debug failing tests:

# show logs during tests
env VERBOSE_TEST=true npm test

It can be helpful to monitor redis commands to debug caching errors:

redis-cli monitor
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].