EpiNeko’s discovery system helps users find their next favorite anime through powerful search capabilities and curated trending lists. All anime data is fetched from the Jikan API (unofficial MyAnimeList API), providing access to a vast database of anime information.
Real-time Search
Instant search results as you type with debouncing
Retrieve the highest-rated anime from MyAnimeList:
import { getTopAnime } from '@/services/jikan';// Get first page of top animeconst topAnime = await getTopAnime();// Display on homepagetopAnime.data.forEach(anime => { console.log(`${anime.title} - ★${anime.score}`);});// Load more pagesconst nextPage = await getTopAnime(2);
import { getAnimeById } from '@/services/jikan';// Get by MyAnimeList IDconst anime = await getAnimeById(52991);console.log(anime.data.title); // "Sousou no Frieren"console.log(anime.data.episodes); // 28console.log(anime.data.score); // 9.39console.log(anime.data.synopsis); // Full description
Caching (src/services/jikan.ts:66-68):
Details are cached for 24 hours (86400 seconds)
Longer cache duration since anime details rarely change
Reusable card component for displaying anime in grids:
import AnimeCard from '@/components/anime/AnimeCard';<AnimeCard mal_id={52991} image="https://cdn.myanimelist.net/images/anime/..." title="Sousou no Frieren" score="9.39"/>
The homepage showcases trending anime with a hero section:
Hero Section
Trending Carousel
// Features the #1 trending anime// Large background image with gradient overlays// Title, synopsis, and CTA buttons// Auto-populated from getTopAnime()
Located at src/app/page.tsx:31-79
// Horizontal scrollable list// Displays top anime from Jikan// Snap scrolling on mobile// Click to view details
The Jikan API has rate limits to protect MyAnimeList servers:
Rate Limit: 60 requests per minute, 3 requests per secondEpiNeko automatically detects 429 errors and displays user-friendly messages. Implement client-side throttling for heavy usage patterns.
// Rate limit handling (src/services/jikan.ts:49-52)if (response.status === 429) { throw new Error('Jikan API rate limit exceeded. Please try again later.');}
Best Practices:
Use cached data when possible
Debounce search inputs (500ms minimum)
Implement loading states during API calls
Queue requests if making multiple calls
Consider implementing request retry logic with exponential backoff