Skip to content

Repository files navigation

AnimeThemes is a simple and consistent repository of anime opening and ending themes. We provide direct links to high quality WebMs of your favorite OPs and EDs for your listening and discussion needs.

This is the repository for the server application that is responsible for AnimeThemes.moe resource management, API, and other services related to serving the AnimeThemes database.

Installation

Prerequisites

Docker will setup Rust, MySQL, Typesense and Redis for you. If you are on Windows, use the WSL terminal.

Setup

# Clone the repository
git clone git@github.com:AnimeThemes/animethemes-server-rust.git
cd animethemes-server-rust

# Copy the .env.example to .env and change it for your needs.
cp .env.example .env

Open the /etc/hosts file and paste the contents there:

127.0.0.1 animethemes-rust.test
# Generate a new APP_KEY
openssl rand -hex 32

# Open the .env file and set the APP_KEY
nano .env

# Build the containers
docker compose up -d --build

# Import dumps if you have one
docker exec -i animethemes-server-rust-mysql mysql -u root animethemes < content.sql

# Run the migrations
docker compose exec -w /app/migration rust cargo run -- up

# Seed the database
docker compose exec rust cargo loco db seed

Running

Extra Configuration

Users

TODO: Waiting feature implementation

Search

Import models into our indices using:

docker compose exec server animethemes-server-rust task search:index-anime
docker compose exec server animethemes-server-rust task search:index-animetheme
docker compose exec server animethemes-server-rust task search:index-animethemeentry
docker compose exec server animethemes-server-rust task search:index-artist
docker compose exec server animethemes-server-rust task search:index-playlist
docker compose exec server animethemes-server-rust task search:index-series
docker compose exec server animethemes-server-rust task search:index-song
docker compose exec server animethemes-server-rust task search:index-studio
docker compose exec server animethemes-server-rust task search:index-video

MySQL Terminal

To open the MySQL Terminal:

docker exec -it animethemes-server-rust-mysql mysql -u root animethemes

Resources

Please make use of the #api channel in the Discord Server for questions pertaining to the AnimeThemes database or API.

About

Rewrite of the backend & API in Rust

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages