A simple website to watch animes that you add to it!
  • JavaScript 86.7%
  • CSS 13.3%
Find a file
2025-12-18 16:24:32 +01:00
utils Typo fix 2025-11-18 22:09:04 +01:00
.env.example Initial commit 2025-11-10 18:09:30 +01:00
.gitignore Download button, better token validation system & CORS removal! 2025-11-10 23:28:58 +01:00
app.js More fixes 2025-11-19 12:40:17 +01:00
LICENSE Added a license 2025-12-18 16:24:32 +01:00
package.json More fixes 2025-11-19 12:40:17 +01:00
README.md Added a license 2025-12-18 16:24:32 +01:00
styles.css Fix dropdown on mobile 2025-11-15 14:15:22 +01:00
tokens.json Initial commit 2025-11-10 18:09:30 +01:00

watch-anime

A simple website to watch animes that you add to it!

How to run

  1. Clone the repository with git clone https://github.com/M336G/watch-anime.git, take a look at .env.example and create a .env file if you need to configure your server.
  2. Install Bun and run bun install to install dependencies.
  3. Start the project with bun run start! Don't forget to add tokens to tokens.json to be able to access the website!

Endpoints

Endpoint Description
GET /anime/<anime_name> Get information about an anime
GET /anime/<anime_name>/episode-<episode_number> Watch the episode of an anime
GET /download/<anime_name>/thumbnail Download an anime's thumbnail
GET /download/<anime_name>/episode-<episode_number>/<anime/subtitles> Download an anime episode or its subtitles

Every endpoint requires authentication. Make sure you have a token value set in your cookies. If you do not have one set/valid, you'll be prompted to enter one.

Adding an anime

To add an anime, first create a directory in your ANIMES_PATH directory with an easy to remember ID for your anime.

Then, add an anime.json file inside the directory you've just created, and add the following content to it (add more if needed):

{
    "id": "the-id-you-chose-for-the-anime",
    "name": "The anime's name",
    "description": "A short description for the anime",
    "thumbnail": "thumbnail.png",
    "episodes": {
        "1": {
            "anime": "episode-1.mp4",
            "subtitles": "episode-1.vtt",
            "mime": "video/mp4"
        }
    }
}

Add the specified files to the directory, and done!

Contributing

Pull requests are more than welcome to the project! Feel free to open one if you feel like something needs modification or if there is any problem with the codebase.

Credits

This project is licensed under the Mozilla Public License Version 2.0.