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.
- ⚡ 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
helmetsecurity 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)
.m3u8manifests with full player control.
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]
| 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 |
- Node.js v16+
- npm
git clone https://github.com/AmitHaina/anime-streaming.git
cd anime-streaming
npm installnpm startThe server will start on port 6969. Open your browser and navigate to:
👉 http://localhost:6969
GET /api/search?q=<query>&provider=<unity|saturn>&page=<page_number>GET /api/info/:id?provider=<unity|saturn>Serves details. Automatically triggers parallel pagination merging if provider is unity.
GET /api/sources?episodeId=<episode_id>&provider=<unity|saturn>- Port Conflicts: By default, the server runs on port
6969. You can change this by setting thePORTenvironment variable (a.envfile is also supported viadotenv):# 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.