/find-my-anime

An API Server that provides anime searching functionality with mappings to anime providers such as MyAnimeList and AniList

Primary LanguageTypeScriptGNU Affero General Public License v3.0AGPL-3.0

Find My Anime

Status | API Docs | WebApp

codecov Better Uptime Badge Build Docker Bugs Vulnerabilities Maintainability Rating Security Rating

An API first service for searching anime across multiple sites such as Anilist and MyAnimeList. Completely written in Typescript. Provides a backend server in ./server driven by anime-offline-database and NestJS. A proof-of-concept web application is in ./web and powered by Vite + React and Chakra UI.

Running

You can either run the application via docker or directly from source. See Configuration for more information. The easiest way is to use Docker:

docker run -d -p 3000:3000 proohit/find-my-anime

Or to run the whole app without docker in production mode:

npm install
npm run build
npm start

Then you can access the app at http://localhost:3000 or whatever port you configured.

Configuration

You can provide a .env or .env.dev (for development) file or pass environment variables directly to configure the backend. Currently supported:

port=YOUR_PORT
app_host=YOUR_HOST
MYANIMELIST_API_KEY=YOUR_API_KEY
ANIDB_CLIENT_ID=YOUR_CLIENT_ID
ANIDB_CLIENT_VERSION=YOUR_CLIENT_VERSION

For Docker, you can just pass the environment variables to the container.

docker run -d \
-p 3000:3000 \
-e app_host=YOUR_HOST \
-e MYANIMELIST_API_KEY=YOUR_API_KEY \
-e ANIDB_CLIENT_ID=YOUR_CLIENT_ID \
-e ANIDB_CLIENT_VERSION=YOUR_CLIENT_VERSION \
proohit/find-my-anime

The app uses external services such as Anilist and MyAnimeList to further enrich anime data. All the external services are optional and won't be used if no credentials are provided.

MyAnimeList

To get a client id, register a new app at https://myanimelist.net/apiconfig. After registering, you will find your client id in the edit page of your registered app.

AniDB

You need to create a project and a client for that project at https://anidb.net/software/add. The ANIDB_CLIENT_ID refers to the name of the created client (not project!) and the ANIDB_CLIENT_VERSION refers to the version of that client.

Developing

Start backend server and frontend in development mode:

npm run start:dev:server
...

And in another terminal:

npm run start:dev:web
...

Contributing

All contributions are welcomed! Beware of the following guidelines:

  • All tests in the backend should pass.

    cd server
    npm run test
  • Changes in the backend should be tested. Decreasing coverage is only allowed with a proper reason.