Overview
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
Top Anime
Browse the highest-rated anime on MyAnimeList
Rich Metadata
Access titles, scores, synopses, images, and more
Pagination
Navigate through extensive anime catalogs
Jikan API Integration
EpiNeko uses the Jikan v4 API to fetch anime data from MyAnimeList:- Built-in rate limit handling (429 errors)
- Next.js cache revalidation for performance
- Type-safe responses with TypeScript interfaces
- Automatic error handling
Data Structures
Anime Object
The complete anime data structure returned by Jikan:Image Object
Multiple image sizes for optimal performance:Paginated Response
All list endpoints return paginated data:Core API Functions
Search Anime
Search for anime by title with pagination support:Search queries are automatically URL-encoded. Results are cached for 1 hour (3600 seconds) to reduce API calls.
Get Top Anime
Retrieve the highest-rated anime from MyAnimeList:- Returns 25 anime per page
- Sorted by MAL score
- Cached for 1 hour
Get Anime Details
Fetch complete information for a specific anime:- Details are cached for 24 hours (86400 seconds)
- Longer cache duration since anime details rarely change
Get Anime Characters
Retrieve character information for an anime:Get Anime Episodes
Fetch episode lists with titles and metadata:UI Components
SearchBar Component
Real-time search with autocomplete dropdown:1
User Types Query
Input is debounced by 500ms to avoid excessive API calls
2
Minimum Length
Search triggers when query length exceeds 2 characters
3
API Call
Fetches top 5 matching results from Jikan
4
Display Results
Shows anime cards with thumbnail, title, type, and score
5
Click Result
Navigates to anime detail page or closes dropdown
- Click-outside detection to close dropdown
- Loading spinner during search
- “No results” message when appropriate
- “View all results” link for full search page
AnimeCard Component
Reusable card component for displaying anime in grids:- Hover scale animation (1.02x)
- Image zoom effect on hover
- Primary color glow border
- Rating badge overlay
- Gradient overlay on hover
- Fallback placeholder if image fails
Homepage Discovery
The homepage showcases trending anime with a hero section:- Hero Section
- Trending Carousel
Caching Strategy
EpiNeko implements intelligent caching to balance freshness with performance:Search Results
1 hour cacheBalances freshness with reduced API load for popular searches
Top Anime
1 hour cacheRankings change slowly, hourly updates are sufficient
Anime Details
24 hour cacheIndividual anime data is static, rarely needs updating
Rate Limiting
The Jikan API has rate limits to protect MyAnimeList servers:- 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
Error Handling
Robust error handling for network and API issues:Search Optimization
Tips for implementing efficient search:1
Debounce Input
Wait 300-500ms after user stops typing before triggering search
2
Limit Results
Only show top 5-10 results in autocomplete dropdowns
3
Cancel Previous
Abort in-flight requests when new search starts
4
Show Loading
Display loading indicators during API calls for better UX
Related Features
- Library Management - Save discovered anime
- Anime Details Pages - View complete information
- Search Implementation - Build custom search