A modern iOS Pokémon app built with RIBs (Router-Interactor-Builder) architecture pattern, featuring a clean and scalable codebase with reactive programming using RxSwift and using SwiftUI as UI.
- Pokédex List: Browse through all Pokémon with pagination support
- Pokémon Search: Real-time search functionality to find specific Pokémon
- Pokémon Details: Comprehensive detail view with stats, abilities, and descriptions
- Navigation: Seamless navigation between Pokémon with previous/next functionality
- Offline Support: Local database caching using Realm for offline access
- Modern Design: Clean, intuitive interface following Pokémon design guidelines
- Custom Components: Reusable UI components using SwiftUI
- Dynamic Theming: Color-coded Pokémon types with dynamic background themes
- Image Caching: Efficient image loading and caching with Nuke
- Loading States: Smooth loading indicators throughout the app
- RIBs Architecture: Modular, testable, and scalable architecture
- Reactive Programming: RxSwift for reactive data flow
- Network Layer: Robust API integration with Moya and Alamofire
- Local Storage: Realm database for offline data persistence
- Debug Tools: Network debugging with netfox integration
This project follows the RIBs (Router-Interactor-Builder) architecture pattern, which provides:
- Modular Design: Each feature is encapsulated in its own RIB
- Separation of Concerns: Clear separation between business logic, presentation, and routing
- Testability: Easy to unit test individual components
- Scalability: Simple to add new features without affecting existing code
Root RIB
├── Pokedex RIB (Pokémon list view)
│ └── Pokemon RIB (Pokémon detail view)
This project uses Swift Package Manager (SPM) for dependency management:
| Library | Version | Purpose |
|---|---|---|
| RIBs | 0.16.3 | Application framework and architecture |
| RxSwift | 6.9.0 | Reactive programming |
| Moya | 15.0.3 | Network abstraction layer |
| Alamofire | 5.10.2 | HTTP networking |
| RealmSwift | Latest | Local database |
| Nuke | 12.8.0 | Image loading and caching |
| MBProgressHUD | 1.2.0 | Loading indicators |
| netfox | 1.21.0 | Network debugging |
- Xcode 14.0 or later
- iOS 13.0 or later
- Swift 5.0 or later
-
Clone the repository
git clone https://github.com/alifu/PokeAPI-RIBs-iOS-SwiftUI.git cd PokeAPI-RIBs-iOS-SwiftUI -
Open the project
open PokeAPI-RIBs-iOS-SwiftUI.xcodeproj
-
Build and run
- Select your target device or simulator
- Press
Cmd + Rto build and run the project
All dependencies are managed through Swift Package Manager and will be automatically resolved when you build the project.
The UI design is based on the Pokédex Community Figma design, featuring:
- Modern card-based layout
- Pokémon type color theming
- Intuitive navigation patterns
- Responsive design for different screen sizes
PokeAPI-RIB/
├── Module/ # RIB modules
│ ├── Root/ # Root RIB
│ ├── Pokedex/ # Main Pokédex RIB
│ └── Pokemon/ # Pokémon detail RIB
├── Model/ # Data models
├── Helper/ # Utility classes
├── Component/ # Custom UI components
├── Extension/ # Swift extensions
├── Utils/ # Utility functions
└── Realm/ # Database models and services
The app integrates with the PokéAPI to fetch:
- Pokémon list with pagination
- Individual Pokémon details
- Pokémon species information
- Official artwork and sprites
- RIBs architecture implementation
- Dependency management with SPM
- Local database with Realm
- Real-time search functionality
- Detailed Pokémon view
- Previous/next navigation
- Image caching and loading
- Custom UI components
- Network debugging tools
- Pokémon sorting functionality
- Pokémon list with pagination
- Poppins font integration
- iOS Widget support
- Unit Test
This project is part of my iOS development portfolio, showcasing:
- Advanced Architecture Patterns: Implementation of RIBs (Router-Interactor-Builder) architecture
- Reactive Programming: Extensive use of RxSwift for reactive data flow and UI binding
- Modern iOS Development: Swift 5.0+, iOS 13.0+ support with latest best practices
- API Integration: Robust networking layer with Moya and Alamofire
- Local Data Persistence: Realm database implementation for offline functionality
- Custom UI Components: Reusable, well-designed UI components with SnapKit
- Image Caching: Efficient image loading and caching strategies
- Clean Code: Well-structured, modular, and maintainable codebase
- ✅ Modular RIBs architecture with clear separation of concerns
- ✅ Reactive programming implementation with RxSwift
- ✅ Comprehensive API integration with error handling
- ✅ Local database implementation with Realm
- ✅ Custom UI components and theming system
- ✅ Image caching and optimization
- ✅ Search and pagination functionality
- ✅ Navigation flow management
- PokéAPI for providing the comprehensive Pokémon data
- RIBs for the excellent architecture framework
- Figma Community for the beautiful design inspiration