Akatsuki is MyAnimeList anime database dump and REST API.
Powered by my nagato library and MyAnimeList API as reference.
- Save anime details
- Anime data
- Anime genres
- Anime pictures
- Anime relation (with other anime)
- Anime studios
- Save anime stats history
- Save user anime list
- Get all anime related in user anime list
- Handle empty anime id
- Auto update anime & user data (cron)
- Interchangeable database
- Interchangeable cache
- no cache
- inmemory
- Redis
- Interchangeable pubsub
- Swagger
- Docker
- Newrelic monitoring
- HTTP
- Cron
- Database
- Cache
- Pubsub
- External API
More will be coming soon...
- Go
- MyAnimeList client id
- Database (MySQL/PostgreSQL)
- PubSub (RabbitMQ/Redis/Google PubSub)
- (optional) Cache (Redis)
- (optional) Docker & Docker Compose
- (optional) Newrelic license key
Without Docker & Docker Compose
- Clone the repository.
git clone github.com/rl404/akatsuki
- Rename
.env.sample
to.env
and modify the values according to your setup. - Create the database according to your
.env
. - Migrate the tables.
make migrate
- Run. You need at least 2 consoles/terminals.
# Run the API.
make
# Run the consumer.
make consumer
- localhost:45001 is ready (port may varies depend on your
.env
).
# Update old anime data.
make cron-update
# Fill missing anime data.
make cron-fill
With Docker & Docker Compose
- Clone the repository.
git clone github.com/rl404/akatsuki
- Rename
.env.sample
to.env
and modify the values according to your setup. - Create the database according to your
.env
. - Get docker image.
# Pull existing image.
docker pull rl404/akatsuki
# Or build your own.
make docker-build
- Migrate the tables.
make docker-migrate
- Run the container. You need at least 2 consoles/terminals.
# Run the API.
make docker-api
# Run the consumer.
make docker-consumer
- localhost:45001 is ready (port may varies depend on your
.env
).
# Update old anime data.
make docker-cron-update
# Fill missing anime data.
make docker-cron-fill
# Stop running containers.
make docker-stop
Env | Default | Description |
---|---|---|
AKATSUKI_APP_ENV |
dev |
Environment type (dev /prod ). |
AKATSUKI_HTTP_PORT |
45001 |
HTTP server port. |
AKATSUKI_HTTP_READ_TIMEOUT |
5s |
HTTP read timeout. |
AKATSUKI_HTTP_WRITE_TIMEOUT |
5s |
HTTP write timeout. |
AKATSUKI_HTTP_GRACEFUL_TIMEOUT |
10s |
HTTP gracefull timeout. |
AKATSUKI_GRPC_PORT |
46001 |
GRPC server port. |
AKATSUKI_GRPC_TIMEOUT |
10s |
GRPC timeout. |
AKATSUKI_CACHE_DIALECT |
inmemory |
Cache type (nocache /redis /inmemory ) |
AKATSUKI_CACHE_ADDRESS |
Cache address. | |
AKATSUKI_CACHE_PASSWORD |
Cache password. | |
AKATSUKI_CACHE_TIME |
24h |
Cache time. |
AKATSUKI_DB_DIALECT |
mysql |
Database type (mysql /postgresql ) |
AKATSUKI_DB_ADDRESS |
localhost:3306 |
Database address with port. |
AKATSUKI_DB_NAME |
akatsuki |
Database name. |
AKATSUKI_DB_USER |
Database username. | |
AKATSUKI_DB_PASSWORD |
Database password. | |
AKATSUKI_DB_MAX_CONN_OPEN |
10 |
Max open database connection. |
AKATSUKI_DB_MAX_CONN_IDLE |
10 |
Max idle database connection. |
AKATSUKI_DB_MAX_CONN_LIFETIME |
1m |
Max database connection lifetime. |
AKATSUKI_PUBSUB_DIALECT |
rabbitmq |
Pubsub type (rabbitmq /redis /google ) |
AKATSUKI_PUBSUB_ADDRESS |
Pubsub address (if you are using google , this will be your google project id). |
|
AKATSUKI_PUBSUB_PASSWORD |
Pubsub password (if you are using google , this will be the content of your google service account json). |
|
AKATSUKI_MAL_CLIENT_ID |
MyAnimeList client id. | |
AKATSUKI_CRON_UPDATE_LIMIT |
10 |
Anime count limit when updating old data. |
AKATSUKI_CRON_FILL_LIMIT |
30 |
Anime count limit when filling missing anime data. |
AKATSUKI_CRON_RELEASING_AGE |
1 |
Age of old releasing/airing anime data (in days). |
AKATSUKI_CRON_FINISHED_AGE |
30 |
Age of old finished anime data (in days). |
AKATSUKI_CRON_NOT_YET_AGE |
7 |
Age of old not yet released/aired anime (in days). |
AKATSUKI_CRON_USER_ANIME_AGE |
7 |
Age of old user anime list (in days). |
AKATSUKI_NEWRELIC_NAME |
akatsuki |
Newrelic application name. |
AKATSUKI_NEWRELIC_LICENSE_KEY |
Newrelic license key. |
Akatsuki's name is taken from japanese destroyer with her sisters (Inazuma, Hibiki, Ikazuchi). Also, exists in Kantai Collection games and anime.
Akatsuki is meant for educational purpose and personal usage only. Please use it responsibly according to MyAnimeList API License and Developer Agreement.
All data belong to their respective copyrights owners, akatsuki does not have any affiliation with content providers.
MIT License
Copyright (c) 2022 Axel