Skip to content

dayzzaja/Lunia-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

112 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌙 Lunea API

REST API Scraper untuk Komiku.org — Manga, Manhwa, Manhua Indonesia
Built with ElysiaJS + Bun (local) & Vercel Serverless (production)


✨ Features

Feature Detail
🔗 13+ Endpoints Latest, Popular, Ranking, Pustaka, Detail, Chapter, Search, Genre, Daftar
In-Memory Cache TTL per endpoint (1 min – 1 hr), otomatis di-prune
🛡 Rate Limiting 60 request/menit per IP, header X-RateLimit-*
🌐 CORS Enabled untuk semua origin
🚀 Dual Runtime Bun (dev) + Vercel Node (prod)
📋 Response Format { status, author, message, cached, data }
📖 Interactive Docs UI try-it di /docs

🚀 Quick Start

Local (Bun)

git clone https://github.com/yourusername/lunea-api
cd lunea-api
bun install
bun run dev
# → http://localhost:3000
# → Docs: http://localhost:3000/docs

Deploy ke Vercel

npx vercel
# atau push ke GitHub & import di vercel.com

📌 Endpoints

Base URL:

  • Production: https://api.lunia.npc
  • Local Dev: http://localhost:3000
Method Endpoint Deskripsi
GET /health (Bun) / /api/health (Vercel) Status & uptime API
GET /api Info API & daftar endpoint
GET /api/latest Update terbaru komik
GET /api/ranking Top komik dari homepage
GET /api/popular Komik populer (filter tipe/sorttime)
GET /api/pustaka Pustaka komik dengan filter lengkap
GET /api/allkomik Alias untuk /api/pustaka
GET /api/manga/:slug Detail komik + daftar chapter
GET /api/chapter/:slug Baca chapter (gambar + navigasi)
GET /api/search?q= Cari komik berdasarkan judul
GET /api/genres Daftar semua genre
GET /api/genre/:slug Komik berdasarkan genre
GET /api/daftar Daftar semua komik A–Z

📄 Response Format

Success

{
  "status": "success",
  "author": "@_dzzwkwk",
  "message": "10 komik terbaru",
  "cached": true,
  "data": { ... }
}

Error

{
  "status": "error",
  "author": "@_dzzwkwk",
  "message": "Rate limit exceeded. Try again in 45s",
  "code": 429,
  "data": null
}

Rate Limit Headers

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 57
X-RateLimit-Reset: 1710000060
X-Cache: HIT | MISS
X-Cache-TTL: 60

⚙️ Query Parameters

/api/latest

Param Type Default Desc
page number 1 Halaman
tipe string - manga / manhwa / manhua

/api/popular

Param Type Default Options
tipe string semua manga · manhwa · manhua
sorttime string all daily · weekly · all
page number 1 -

/api/pustaka / /api/allkomik

Param Type Default Options
tipe string semua manga · manhwa · manhua
orderby string modified modified · title · meta_value_num · date
genre string - slug genre, e.g. action
status string - ongoing · end
page number 1 -

/api/genre/:slug

Param Type Default
page number 1

/api/daftar

Param Type Default Options
huruf string - A · B · ... · Z · 0
tipe string - manga · manhwa · manhua
halaman number 1 -

⚡ Cache TTL

Endpoint TTL
/api/latest 1 menit
/api/popular 5 menit
/api/ranking 5–10 menit
/api/pustaka 2–5 menit
/api/manga/:slug 10–15 menit
/api/chapter/:slug 30 menit
/api/search 2–3 menit
/api/genre/:slug 2–5 menit
/api/genres 1 jam
/api/daftar 5–30 menit

🛠 Tech Stack


About

REST API Scraper dari Komiku.org — Manga, Manhwa, Manhua Indonesia

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors