A React Native mobile application that displays cat breed information including images, descriptions, origins, and temperaments. The app fetches real data from TheCatAPI.
- View a list of cat breeds with images
- Display breed information: name, origin, and temperament
- Pull-to-refresh functionality for updating breed data
- Smooth image loading with optimized caching
- Cross-platform support (iOS, Android, Web)
- React Native - Mobile framework for building native apps
- Expo - Toolchain and platform for React Native
- React Navigation - Navigation library for routing
- TheCatAPI - External API for cat breed data
- Axios - HTTP client for API requests
- React Native Fast Image - Optimized image caching
CatBreedApp/
├── App.js # Main entry point
├── app.json # Expo configuration
├── babel.config.js # Babel configuration
├── package.json # Dependencies and scripts
└── src/
├── Views.jsx # Main screen displaying cat breeds list
├── Data.jsx # Data fetching utilities (template)
├── Models.jsx # Data models (template)
├── CatImage.jsx # Image component (template)
└── login.jsx # Login screen component (template)
The main screen component that fetches and displays cat breeds. It uses the native fetch API to communicate with TheCatAPI and renders a scrollable list of breed cards showing:
- Breed image
- Name
- Country of origin
- Temperament
Authentication screen with username/password fields and navigation to the main views screen.
The app connects to TheCatAPI to retrieve breed information:
- Endpoint:
https://api.thecatapi.com/v1/breeds - Authentication: Requires API key (
x-api-keyheader) - Image URL Pattern:
https://cdn2.thecatapi.com/images/{reference_image_id}.jpg
- Clone the repository:
git clone https://github.com/NicolasZapata/CatBreedApp.git
cd CatBreedApp- Install dependencies:
npm install- Start the development server:
npx expo start- Run on specific platform:
# iOS
npm run ios
# Android
npm run android
# Web
npm run webThe app uses a demo API key for TheCatAPI. For production use, replace the API key in src/Views.jsx:
headers: {
"Content-Type": "application/json",
"x-api-key": "your-api-key-here"
}Key dependencies include:
react&react-native- Core framework@react-navigation/native&@react-navigation/native-stack- Navigationaxios- HTTP clientexpo- Expo SDKreact-native-fast-image- Optimized image loading
| Command | Description |
|---|---|
npm start |
Start Expo development server |
npm run android |
Run on Android emulator/device |
npm run ios |
Run on iOS simulator/device |
npm run web |
Run in web browser |
MIT License