Skip to content

AmitHaina/anime-streaming

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌌 AETHER — Premium Anime Streaming Platform

Aether is a high-performance, premium single-page web application (SPA) for streaming anime. Built with a Node.js/Express backend and a modern vanilla frontend, it aggregates high-quality streams from multiple sources, resolves pagination constraints, and utilizes server-side caching to deliver sub-30ms load times.


🚀 Key Features

  • ⚡ Sub-30ms Details Loading: Integrates a capped in-memory LRU cache (500 entries, 2-hour TTL), serving previously loaded details instantly without unbounded memory growth.
  • 🔄 Parallel Episode Merging: Programmatically resolves the standard 120-episode pagination limit on backing providers by fetching and merging all pages in parallel.
  • 🎭 Dual-Provider Seamless Switching: Switch on the fly between AnimeUnity and AnimeSaturn directly from the navigation bar.
  • 🛡️ Hardened API Layer: Ships with helmet security headers, per-IP rate limiting, request validation, centralized error handling, and a 15s provider timeout with automatic retry.
  • 📱 Premium Responsive UI: Features Outfit & Inter typography, dark-mode styling, hover micro-animations, loading skeleton screens, and clean Crunchyroll-style episode tab pagination.
  • 📺 Native Player Integration: Leverages Plyr and Hls.js to stream raw HTTP Live Streaming (HLS) .m3u8 manifests with full player control.

🛠️ Architecture Flowchart

flowchart TD
    Client[Client Browser - Aether UI] -->|Search / Info Request| Server[Node.js Express Server]
    Server -->|1. Check cache| Cache{In-Memory Cache}
    Cache -- Hit (under 30ms) --> Client
    Cache -- Miss --> Provider[Anilist API / Backing Provider]
    Provider -->|Merge Episode Pages in Parallel| Merge[Page Parallel Merger]
    Merge -->|Update Cache| Cache
    Merge -->|Return JSON| Client
    Client -->|Initialize Hls.js + Plyr| HLS[HLS Stream Player]
Loading

💻 Technology Stack

Layer Technology Purpose
Backend Node.js / Express API router and static file hosting server
Scraping Core @consumet/extensions Backing engine for fetching anime metadata and stream sources
Hardening helmet, express-rate-limit, morgan, dotenv Security headers, rate limiting, request logging, env config
Caching lru-cache Capped in-memory details cache with TTL
Frontend HTML5 / JavaScript (ES6) Responsive Single Page Application (SPA) client
Styling CSS3 (Custom Grid/Variables) Modern dark-mode layout and animations
Player Plyr & Hls.js HTML5 video player and HLS playlist handler

📦 Installation & Setup

Prerequisites

  • Node.js v16+
  • npm

1. Clone & Install Dependencies

git clone https://github.com/AmitHaina/anime-streaming.git
cd anime-streaming
npm install

2. Run the Server

npm start

The server will start on port 6969. Open your browser and navigate to: 👉 http://localhost:6969


📡 API Reference

1. Search Anime

GET /api/search?q=<query>&provider=<unity|saturn>&page=<page_number>

2. Anime Details

GET /api/info/:id?provider=<unity|saturn>

Serves details. Automatically triggers parallel pagination merging if provider is unity.

3. Stream Sources

GET /api/sources?episodeId=<episode_id>&provider=<unity|saturn>

🔧 Troubleshooting

  • Port Conflicts: By default, the server runs on port 6969. You can change this by setting the PORT environment variable (a .env file is also supported via dotenv):
    # PowerShell
    $env:PORT=8080; npm start
    # bash
    PORT=8080 npm start
  • Network Timeouts: Provider calls have a 15-second timeout and are retried once automatically. If the backing providers experience high latency, the cache miss response times may increase. Once cached, subsequent requests will load instantly.
  • HTTP 429 (Too Many Requests): The API is rate limited to 60 requests per minute per IP. Wait a moment before retrying, or adjust the limit in server.js.

About

Premium anime streaming SPA — Node/Express + vanilla JS, dual-provider (AnimeUnity/AnimeSaturn), HLS player, with a hardened API layer (helmet, rate limiting, LRU cache, timeouts).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors