feat: add creator info middleware from MiruroAPI

- Add src/middleware/creatorInfo.js (ESM adapted)
- Injects creator attribution (name, GitHub, Telegram, timestamp) into every JSON response
- Updates server.js to use addCreatorInfo middleware
- Updates CHANGELOG.md, README.md, and docs/architecture.md
This commit is contained in:
Shinei Nouzen
2026-07-04 15:31:59 +05:30
parent 5cf908fb1e
commit 5ca688ab45
5 changed files with 95 additions and 1 deletions
+13 -1
View File
@@ -84,6 +84,9 @@ AniKotoAPI/
│ ├── mirror.helper.js # Multi-mirror fallback (5 domains)
│ └── extractPages.helper.js # Page fetching with mirror fallback
│
│ └── middleware/
│ └── creatorInfo.js # Creator attribution injection
│
├── test.js # Test suite (27 tests)
├── agents/ # AI agent prompts (6 agents)
└── CHANGELOG.md # Version history
@@ -100,6 +103,7 @@ AniKotoAPI/
| Caching | LRU cache with configurable TTL |
| Compression | gzip (level 6, 1024 byte threshold) |
| Mirror Fallback | 5 mirror domains with health checks |
| Middleware | Creator info attribution injection |
| Static Files | Express static middleware |
## Request Flow
@@ -109,6 +113,14 @@ Client Request
↓
Vercel Routes (/api/* → server.js)
↓
Express Middleware
↓
├── CORS
├── Security Headers
├── Compression (gzip)
├── Rate Limiting
├── Creator Info Injection
↓
Express Router (apiRoutes.js)
↓
Controller (e.g., search.controller.js)
@@ -119,7 +131,7 @@ HTTP Request to anikototv.to (with headers)
↓
Cheerio parses HTML response
↓
Returns structured JSON
Returns structured JSON with Creator Attribution
↓
Client Response
```