Overview
EpiNeko follows the Next.js 15 App Router structure with a clean separation of concerns. The project uses TypeScript, React 19, and integrates with Supabase for authentication and data persistence.Technology Stack
Next.js 16
Modern React framework with App Router
React 19
Latest React with Server Components
TypeScript 5
Type-safe development
Tailwind CSS 4
Utility-first styling with DaisyUI
Directory Structure
Key Directories Explained
app/ - Application Routes
app/ - Application Routes
The
app directory contains all pages and layouts following Next.js 15 App Router conventions:- layout.tsx: Root layout with metadata and font configuration
- page.tsx: Homepage with trending anime
- anime/[id]/: Dynamic routes for individual anime details
- api/: Server-side API endpoints
"use client" directive for client-side interactivity.components/ - UI Components
components/ - UI Components
Organized by feature area:
- anime/: Components specific to anime display and interaction
- layout/: Structural components like Navbar and Footer
"use client") for interactivity.services/ - API Integration
services/ - API Integration
Service layer for external API calls:
- jikan.ts: Fetches anime data from Jikan API v4 (MyAnimeList)
- library.ts: Manages user library with Supabase
utils/ - Utility Functions
utils/ - Utility Functions
Helper functions and configurations:
- supabase/: Three specialized Supabase clients for different contexts
client.ts: Browser-side authenticationserver.ts: Server-side operationsmiddleware.ts: Session management in middleware
Next.js Configuration
The project uses custom Next.js configuration innext.config.ts:
next.config.ts
Remote image patterns are configured to allow MyAnimeList CDN images for anime posters and covers.
TypeScript Configuration
Key compiler options fromtsconfig.json:
@/* path alias allows clean imports from the src directory.
Middleware
The rootmiddleware.ts handles authentication for protected routes:
src/middleware.ts
Styling Approach
Best Practices
Server Components First
Use Server Components by default for better performance
Client Components for Interactivity
Add
"use client" only when needed for state/eventsPath Aliases
Always use
@/ imports for cleaner codeType Safety
Leverage TypeScript interfaces for all data structures
Next Steps
Components
Explore React components
Services
Learn about API services
Deployment
Deploy your instance