- Katalog
Katalog is a starter template for building mobile catalog applications with React Native. It provides a foundation for managing and browsing products in a local database, which you can customize for your specific needs.
- Purpose: To provide a starting point for building catalog management apps
- Core Functionalities: Image view, product display, and item management
- Target Users: Developers building catalog-based applications
- Customization Options: UI themes, component properties, and image handling
- Product Display: Grid view of products with images.
- Image Viewer: Full-screen image viewing capability.
- Item Management: Add and manage products in the catalog.
- Node.js
- React Native CLI
- Android Studio/Xcode
- Clone the repository
- Install dependencies:
npm install
- Start the Metro bundler:
npm start
- Run the app on Android:
npm run android
- Run the app on iOS:
cd ios && pod install && cd .. npm run ios
- android/app/build.gradle: Android build configuration
- ios/katalog.xcodeproj: iOS project configuration
- constants/index.tsx: Core app constants
- Default Settings: Modify in
constants/index.tsx
- ProductCard: Product display component (
components/ProductCard.tsx
) - ImageViewerScreen: Image viewing component (
components/ImageViewerScreen.tsx
) - HomeScreen: Main catalog screen (
screens/HomeScreen.tsx
) - AddProductScreen: Product addition screen (
screens/AddProductScreen.tsx
)
- Properties: Modify component props in their respective files
- Best Practices: Ensure consistency when updating components
📦katalog
┣ 📂components
┃ ┣ 📜ImageViewerScreen.tsx
┃ ┗ 📜ProductCard.tsx
┣ 📂constants
┃ ┗ 📜index.tsx
┣ 📂screens
┃ ┣ 📜AddProductScreen.tsx
┃ ┗ 📜HomeScreen.tsx
- Components are modular and reusable
- Screens handle main views
- Constants maintain app-wide settings
- Setup: Jest for unit testing
- Tests Location:
__tests__
directory
npm test
- Generate a keystore file:
keytool -genkey -v -keystore your_keystore_file.keystore -alias your_key_alias -keyalg RSA -keysize 2048 -validity 10000
- Place keystore file in
android/app
directory - Add keystore details in
android/gradle.properties
:MYAPP_RELEASE_STORE_FILE=your_keystore_file.keystore MYAPP_RELEASE_KEY_ALIAS=your_key_alias MYAPP_RELEASE_STORE_PASSWORD=your_store_password MYAPP_RELEASE_KEY_PASSWORD=your_key_password
-
Change app name:
- Edit
android/app/src/main/res/values/strings.xml
- Update
android:label
inAndroidManifest.xml
- Edit
-
Change package name:
- Modify
applicationId
inandroid/app/build.gradle
- Update package in
AndroidManifest.xml
- Update folder structure in
android/app/src/main/java
- Modify
- Generate release APK:
cd android ./gradlew assembleRelease
- Find APK in
android/app/build/outputs/apk/release
- Build failures: Check dependencies and Android/iOS configurations
- Runtime errors: Use React Native Debugger
- Metro bundler issues: Clear cache with
npx react-native start --reset-cache
- Pod install failures: Run
cd ios && pod deintegrate && pod install
- Red screen errors: Check component rendering and prop types
- App crashing on launch: Verify native configurations and permissions
- Hot reload not working: Restart Metro bundler and development server
- Missing assets: Ensure correct file paths and asset linking
- TypeScript missing: Sometimes npm install skips TypeScript, install manually:
npm install typescript --save-dev
- App Size Growth: The app size may increase significantly over time due to cached images and data
- Workaround: Implement periodic cache clearing
- Future Fix: Planned optimization in upcoming releases
- Memory Usage: Heavy image processing can cause slowdowns on older devices
- Database Performance: Large catalogs may experience loading delays
- Image Loading: Occasional delays in thumbnail generation
- Background Refresh: May not update properly in background state
I welcome contributions to help solve our known issues! Here's where you can help:
- Implement efficient cache management to address app size growth
- Optimize image processing for better performance on older devices
- Enhance database queries for faster catalog loading
- Improve thumbnail generation system
- Fix background refresh functionality
If you'd like to contribute:
- Fork the repository
- Create a feature branch
- Submit a pull request with your improvements
- React Native Documentation - Main framework docs
- React Native Navigation - App navigation setup
- React Native Image Picker - Image selection
- SQLite Storage - Local database
- React Native Vector Icons - UI icons
- Android Gradle Plugin - Android builds
- CocoaPods Guide - iOS dependencies
- App Store Guidelines - iOS deployment
- Android App Bundle Guide - Android deployment