Commit Graph
6 Commits
Author SHA1 Message Date
Shinei Nouzen 7df5bbcc54 docs: Add box-style headers, section headers, feature markers, JSDoc, inline notes, footers
Added comprehensive documentation following project conventions:

Box-style headers (added/fixed where missing):
- All 17 files now have standard Project/Author/License headers

Section headers (// == == SECTION == ==):
- cache.helper.js: LRU CACHE CLASS, TTL CONFIGURATION, SINGLETON, EXPORTED HELPERS
- download.controller.js: DOWNLOAD LINKS HANDLER
- download.extractor.js: BASE64 DECODER, REDIRECT FOLLOWER, DOWNLOAD LINKS EXTRACTOR
- seasons.extractor.js: SEASONS EXTRACTOR
- watchOrder.extractor.js: WATCH ORDER EXTRACTOR
- extractPages.helper.js: PAGE EXTRACTOR
- pagination.helper.js: PAGINATION METADATA

Feature markers (// --- FEATURE: XYZ ---):
- cache.helper.js: LRU Cache, Per-Endpoint TTL, Cache Get/Set/Clear
- download.controller.js: Download Links
- download.extractor.js: Base64 Download Data Decoder, Redirect Chain Resolver, Download Links Extraction
- seasons.extractor.js: Season Information Extraction
- watchOrder.extractor.js: Watch Order / Related Anime Extraction
- streamResolver.extractor.js: Server Name Normalization, Stream URL Resolution, Batch Stream URL Resolution, M3U8 Quality Parser, Subtitle Track Extractor
- mirror.helper.js: Mirror Domain Configuration, Mirror Health Check, Working Mirror Discovery, Mirror Cache Reset, URL Builder, Resilient Fetch with Mirror Fallback, Mirror Status Reporter
- pagination.helper.js: Pagination Metadata Generator
- creatorInfo.js: Creator Attribution Object, Response Creator Injection Middleware

Function-level JSDoc (added/fixed):
- cache.helper.js: Full JSDoc on all 6 class methods (constructor, get, set, delete, clear, getStats, has) and 4 exported helpers

Inline notes for non-obvious logic:
- cache.helper.js: Lazy expiration, LRU re-insertion, singleton pattern
- download.extractor.js: HTML/JSON hybrid response handling, multiple selectors for different mirrors, redirect fallback
- random.extractor.js: maxRedirects, validateStatus, responseURL extraction
- schedule.extractor.js: Dual selector pattern for different mirror layouts
- animeInfo.extractor.js: Positional .bmeta selector fragility
- homeInfo.extractor.js: Dual selector for different layouts
- mirror.helper.js: 404 vs connection error handling
- animeInfo.controller.js: Accept both id and slug params

Footers (added where missing):
- cache.helper.js, download.controller.js, download.extractor.js, seasons.extractor.js, watchOrder.extractor.js, extractPages.helper.js, mirror.helper.js

All 68 source files now have complete documentation coverage (6/6 checks).
2026-07-28 21:55:14 +05:30
Shinei Nouzen a8f1917ce7 feat: v2.2.0 — Modularize codebase, unify mirror fallback, harden security
Major Changes:
- Add shared parseListItem.helper.js for unified list parsing (DRY)
- Migrate all 22 extractors to use fetchWithMirror() for consistent mirror fallback
- Remove unused cors dependency (custom CORS middleware handles it)
- Fix middleware ordering: timeout now registered before routes
- Fix CORS to allow POST for /api/mirrors/reset endpoint
- Remove redundant cache check in homeInfo extractor

New Features:
- Request ID tracking (X-Request-Id header) for debugging
- Graceful shutdown handling (SIGTERM/SIGINT) with 10s timeout
- CSP and HSTS security headers
- Rate limiter cleanup interval (every 5 min) to prevent memory leak
- Request body size limits (10kb) via express.json()

Security:
- Content-Security-Policy header for XSS protection
- Strict-Transport-Security for HTTPS enforcement
- X-Permitted-Cross-Domain-Policies: none
- Body size limits to prevent large payload attacks

Code Quality:
- All files follow strict documentation style (box headers, section separators,
  feature markers, JSDoc params/returns, inline notes, module footers)
- Eliminated ~200 lines of duplicated code across 8+ extractors
- Updated CHANGELOG.md with comprehensive change history
2026-07-28 19:28:21 +05:30
Shinei Nouzen fe51275db0 feat: upgrade to v2.0.0 with multi-mirror fallback, new endpoints, and LRU cache
- Add multi-mirror fallback system with 5 mirror domains
- Add LRU cache with configurable TTL per endpoint
- Add response compression (gzip)
- Add Seasons endpoint (/api/seasons/:id)
- Add Watch Order endpoint (/api/watch-order/:id)
- Add Latest Updated endpoint (/api/latest-updated)
- Add Download endpoint (/api/download)
- Add cache stats endpoint (/api/cache/stats)
- Add mirror status/reset endpoints (/api/mirrors, /api/mirrors/reset)
- Add configurable rate limiting with X-RateLimit headers
- Add request timeouts and entity too large handling
- Update documentation with all new endpoints
- Update CHANGELOG.md with v2.0.0 entry
- Update package.json version to 2.0.0
- Add 6 AI agent prompts for development
2026-07-04 15:07:07 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ b1eb899aa9 v1.7.0: Rebrand AniKatoAPI → AniKotoAPI
BREAKING: Complete project rebrand across 66 files
- AniKatoAPI → AniKotoAPI (project name)
- AniKato → AniKoto (brand references)
- anikato.vercel.app → anikoto.vercel.app (URLs)
- anikototv.to preserved (source website domain)
- Updated: README, package.json, server.js, all controllers,
  extractors, configs, routes, public pages, legal docs
2026-06-08 19:41:00 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ 0034617c3b v1.5.0: Complete documentation rewrite - 50+ files with AlisaReactionBot style
- Box-style header comments (Project, Author, License) on every file
- Section headers using double-line box decorators
- Feature markers (// ---- FEATURE: XYZ ----) before every major function
- JSDoc comments for EVERY function with @param, @returns, @example
- Inline notes (NOTE, WARNING, TIP) for non-obvious logic
- Footer END markers on every module
- Matched code style to AlisaReactionBot repository
- All files now searchable by feature name via grep

Author: Shinei Nouzen <157171073+Shineii86@users.noreply.github.com>
2026-06-08 16:14:01 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ 47789b2444 feat: add complete API endpoints for full website
- Add /api/watch endpoint for watch page data
- Add /api/az-list for alphabetical browsing
- Add /api/new-release and /api/newly-added
- Add /api/status for ongoing/completed lists
- Add /api/trending-sidebar for sidebar data
- Update README with all new endpoints
- Update CHANGELOG
2026-06-08 15:34:37 +05:30