Skip to content

esrakllci/rickandmorty-api-integration

Repository files navigation

🚀 Rick and Morty Character Database

Modern ve kullanıcı dostu bir Rick and Morty karakter veritabanı uygulaması. Next.js 15, TypeScript, React Query ve Zustand kullanılarak geliştirilmiştir.

A modern and user-friendly Rick and Morty character database application. Built with Next.js 15, TypeScript, React Query, and Zustand.

Next.js TypeScript React Query Tailwind CSS


🇹🇷 Türkçe

✨ Özellikler

  • 🔍 Gelişmiş Filtreleme: Status ve gender filtreleri ile karakterleri arayın
  • 🔗 URL Query Yönetimi: Filtreler URL parametrelerinde saklanır, paylaşılabilir linkler
  • 📄 Sayfalama: Kolay navigasyon ile tüm karakterleri keşfedin
  • ❤️ Favori Sistemi: Beğendiğiniz karakterleri favorilere ekleyin
  • 🎨 Modern UI: shadcn/ui bileşenleri ile şık ve responsive tasarım
  • SSR Desteği: Server-Side Rendering ile hızlı yükleme
  • 🔄 React Query: Optimize edilmiş API çağrıları ve cache yönetimi
  • 📱 Responsive: Tüm cihazlarda mükemmel görünüm

🛠️ Teknolojiler

  • Framework: Next.js 15 (App Router)
  • Dil: TypeScript
  • Stil: Tailwind CSS v4
  • UI Bileşenleri: shadcn/ui
  • State Management: Zustand
  • Data Fetching: React Query (TanStack Query)
  • URL Management: nuqs
  • Linting: ESLint + Prettier
  • Git Hooks: Husky + lint-staged

📦 Kurulum

  1. Repository'yi klonlayın:
git clone https://github.com/KULLANICI_ADI/rickandmorty.git
cd rickandmorty
  1. Bağımlılıkları yükleyin:
npm install
  1. Development server'ı başlatın:
npm run dev
  1. Tarayıcınızda http://localhost:3000 adresini açın

🚀 Production Build

npm run build
npm start

📝 Scripts

  • npm run dev - Development server başlatır
  • npm run build - Production build oluşturur
  • npm run start - Production server başlatır
  • npm run lint - ESLint ile kod kontrolü yapar
  • npm run lint:fix - ESLint hatalarını otomatik düzeltir
  • npm run format - Prettier ile kod formatlar
  • npm run format:check - Format kontrolü yapar

🏗️ Proje Yapısı

rickandmorty/
├── src/
│   ├── app/              # Next.js App Router sayfaları
│   ├── api/              # API çağrıları
│   ├── components/       # React bileşenleri
│   │   ├── characters/   # Karakter bileşenleri
│   │   ├── layout/       # Layout bileşenleri
│   │   └── ui/          # shadcn/ui bileşenleri
│   ├── hooks/           # Custom React hooks
│   ├── providers/       # Context providers
│   ├── store/           # Zustand stores
│   ├── types/           # TypeScript type tanımları
│   └── lib/             # Utility fonksiyonlar
├── .husky/              # Git hooks
├── .lintstagedrc.json   # Lint-staged yapılandırması
└── .prettierrc          # Prettier yapılandırması

🎯 Özellik Detayları

Filtreleme

  • Status filtresi: Alive, Dead, Unknown
  • Gender filtresi: Male, Female, Genderless, Unknown
  • Filtreler URL query parametreleri ile yönetilir
  • Filtreler birleştirilebilir (örn: Alive + Male)

Favori Sistemi

  • Karakter kartlarındaki kalp ikonuna tıklayarak favori ekleyin
  • Header'daki "Favoriler" butonuna tıklayarak favori listesini görüntüleyin
  • Favorilerden tek tek veya toplu olarak silme

SSR (Server-Side Rendering)

  • Sayfa değişikliklerinde sunucu tarafında veri çekme
  • nuqs ile shallow: false ayarı ile SSR tetikleme
  • URL parametreleri değiştiğinde otomatik yenileme

🔧 Yapılandırma

ESLint

Proje, TypeScript ve React için özelleştirilmiş ESLint kuralları kullanır:

  • @typescript-eslint/no-explicit-any: error - any kullanımı yasak
  • React Hooks kuralları aktif
  • Prettier ile entegre

Prettier

  • Tailwind CSS class sıralaması için plugin
  • Otomatik formatlama
  • Pre-commit hook ile otomatik formatlama

🇬🇧 English

✨ Features

  • 🔍 Advanced Filtering: Search characters with status and gender filters
  • 🔗 URL Query Management: Filters are stored in URL parameters, shareable links
  • 📄 Pagination: Easy navigation to explore all characters
  • ❤️ Favorite System: Add your favorite characters to favorites
  • 🎨 Modern UI: Elegant and responsive design with shadcn/ui components
  • SSR Support: Fast loading with Server-Side Rendering
  • 🔄 React Query: Optimized API calls and cache management
  • 📱 Responsive: Perfect appearance on all devices

🛠️ Technologies

  • Framework: Next.js 15 (App Router)
  • Language: TypeScript
  • Styling: Tailwind CSS v4
  • UI Components: shadcn/ui
  • State Management: Zustand
  • Data Fetching: React Query (TanStack Query)
  • URL Management: nuqs
  • Linting: ESLint + Prettier
  • Git Hooks: Husky + lint-staged

📦 Installation

  1. Clone the repository:
git clone https://github.com/USERNAME/rickandmorty.git
cd rickandmorty
  1. Install dependencies:
npm install
  1. Start the development server:
npm run dev
  1. Open http://localhost:3000 in your browser

🚀 Production Build

npm run build
npm start

📝 Scripts

  • npm run dev - Start development server
  • npm run build - Create production build
  • npm run start - Start production server
  • npm run lint - Run ESLint code check
  • npm run lint:fix - Auto-fix ESLint errors
  • npm run format - Format code with Prettier
  • npm run format:check - Check code formatting

🏗️ Project Structure

rickandmorty/
├── src/
│   ├── app/              # Next.js App Router pages
│   ├── api/              # API calls
│   ├── components/       # React components
│   │   ├── characters/   # Character components
│   │   ├── layout/       # Layout components
│   │   └── ui/          # shadcn/ui components
│   ├── hooks/           # Custom React hooks
│   ├── providers/       # Context providers
│   ├── store/           # Zustand stores
│   ├── types/           # TypeScript type definitions
│   └── lib/             # Utility functions
├── .husky/              # Git hooks
├── .lintstagedrc.json   # Lint-staged configuration
└── .prettierrc          # Prettier configuration

🎯 Feature Details

Filtering

  • Status filter: Alive, Dead, Unknown
  • Gender filter: Male, Female, Genderless, Unknown
  • Filters are managed via URL query parameters
  • Filters can be combined (e.g., Alive + Male)

Favorite System

  • Click the heart icon on character cards to add favorites
  • Click the "Favorites" button in the header to view favorite list
  • Remove favorites individually or clear all at once

SSR (Server-Side Rendering)

  • Server-side data fetching on page changes
  • SSR triggering with nuqs using shallow: false setting
  • Automatic refresh when URL parameters change

🔧 Configuration

ESLint

The project uses customized ESLint rules for TypeScript and React:

  • @typescript-eslint/no-explicit-any: error - any usage is forbidden
  • React Hooks rules are active
  • Integrated with Prettier

Prettier

  • Plugin for Tailwind CSS class sorting
  • Automatic formatting
  • Automatic formatting with pre-commit hook

📄 License

This project is licensed under the MIT License.

🙏 Acknowledgments

👨‍💻 Developer

Developed by: [Your GitHub Username]


⭐ If you liked this project, don't forget to give it a star!

About

This project is a frontend application developed using the Rick and Morty API. It fetches and displays characters, episodes, and locations dynamically through API integration.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors