Skip to content

harshitsaini17/slimimage

Repository files navigation

πŸ“Έ SlimImage

A powerful, user-friendly mobile application for image manipulation and optimization

React Native Expo TypeScript License


🌟 Overview

SlimImage is a comprehensive React Native mobile application designed to make image manipulation simple and efficient. Whether you need to compress large images, resize them for different platforms, convert between formats, or crop and rotate, SlimImage has you covered with an intuitive and beautiful interface.

Built with modern technologies including React Native, Expo, TypeScript, and MobX State Tree, SlimImage delivers a seamless experience for all your image editing needs directly on your mobile device.


✨ Features

πŸ—œοΈ Image Compression

  • Auto Compression: Smart compression with three preset levels (Small, Medium, Large)
  • File Size Targeting: Compress images to a specific file size
  • Percentage-based: Reduce image size by a specified percentage
  • Quality Control: Fine-tune image quality manually

πŸ“ Image Resizing

  • Percentage Scaling: Resize images by percentage (e.g., 80% of original)
  • Pixel Dimensions: Set exact width and height in pixels
  • Aspect Ratio Preservation: Maintain original image proportions

πŸ”„ Image Format Conversion

  • Convert between popular formats: JPEG, PNG, WEBP
  • Batch conversion support
  • Preserve or strip EXIF data (configurable)

βœ‚οΈ Crop & Rotate

  • Free-style cropping with gesture support
  • Image rotation capabilities
  • Intuitive cropping interface
  • Real-time preview

πŸ’Ύ Batch Processing

  • Process multiple images simultaneously
  • Organized output in dedicated folders
  • Smart file naming with timestamps

βš™οΈ Customizable Settings

  • Keep or remove EXIF metadata
  • Preserve original image format
  • Configurable output preferences

πŸš€ Getting Started

Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js (v18 or higher)
  • Yarn (recommended) or npm
  • Expo CLI: npm install -g expo-cli
  • For iOS development: Xcode (macOS only)
  • For Android development: Android Studio

Installation

  1. Clone the repository

    git clone https://github.com/harshitsaini17/slimimage.git
    cd slimimage
  2. Install dependencies

    yarn install
    # or
    npm install
  3. Install patches (if any)

    yarn postinstall

Running the Application

Start the development server

yarn start
# or
npm start

Run on Android

yarn android
# or
npm run android

Run on iOS (macOS only)

yarn ios
# or
npm run ios

Run on Web

yarn web
# or
npm run web

πŸ—οΈ Project Structure

slimimage/
β”œβ”€β”€ app/                      # Main application code
β”‚   β”œβ”€β”€ components/          # Reusable UI components
β”‚   β”œβ”€β”€ screens/             # Screen components
β”‚   β”‚   β”œβ”€β”€ HomeScreen.tsx
β”‚   β”‚   β”œβ”€β”€ CompressImageScreen.tsx
β”‚   β”‚   β”œβ”€β”€ ResizeImageScreen.tsx
β”‚   β”‚   β”œβ”€β”€ ConvertImageScreen.tsx
β”‚   β”‚   └── CropImageScreen.tsx
β”‚   β”œβ”€β”€ navigators/          # Navigation configuration
β”‚   β”œβ”€β”€ models/              # MobX State Tree models
β”‚   β”œβ”€β”€ services/            # API and external services
β”‚   β”œβ”€β”€ theme/               # Theming (colors, spacing, typography)
β”‚   β”œβ”€β”€ utils/               # Utility functions and hooks
β”‚   β”œβ”€β”€ i18n/                # Internationalization
β”‚   └── app.tsx              # App entry point
β”œβ”€β”€ assets/                   # Static assets
β”‚   β”œβ”€β”€ icons/               # App icons
β”‚   └── images/              # Images and graphics
β”œβ”€β”€ android/                  # Android native code
β”œβ”€β”€ ios/                      # iOS native code (when built)
β”œβ”€β”€ test/                     # Test files
β”œβ”€β”€ .maestro/                 # End-to-end tests
└── ignite/                   # Ignite CLI templates

πŸ› οΈ Technology Stack

Core Technologies

State Management

Navigation

  • React Navigation (^6.0.2) - Navigation library
  • React Navigation Native Stack - Stack navigator

Image Processing

UI & Styling

Storage & File System

Additional Libraries


πŸ“œ Available Scripts

Script Description
yarn start Start the Expo development server
yarn android Run the app on Android
yarn ios Run the app on iOS
yarn web Run the app on web browser
yarn test Run Jest tests
yarn test:watch Run tests in watch mode
yarn test:maestro Run Maestro end-to-end tests
yarn lint Lint and format code
yarn compile Type-check with TypeScript
yarn format Format code with Prettier
yarn build:android:prod Build production Android app
yarn build:ios:prod Build production iOS app

βš™οΈ Configuration

Environment Setup

The app uses Expo configuration defined in app.json and app.config.ts. Key configurations include:

  • App Name: Slim Image
  • Bundle Identifier (iOS): com.priyanshusaini.slimimage
  • Package Name (Android): com.priyanshusaini.slimimage
  • Permissions: Camera Roll, Media Library, File System

Build Configuration

EAS Build configurations are available in eas.json for:

  • Development builds
  • Production builds
  • Simulator/emulator builds

TypeScript Configuration

TypeScript is configured via tsconfig.json with:

  • Strict type checking enabled
  • Path aliases support (app/*, assets/*)
  • React Native and Expo type definitions

πŸ§ͺ Testing

Unit Tests

yarn test

Watch Mode

yarn test:watch

E2E Tests with Maestro

yarn test:maestro

For Maestro setup, follow the Ignite Cookbook guide.


🎨 UI Components

SlimImage uses a consistent design system with reusable components:

  • Screen: Base screen wrapper with safe area handling
  • Text: Themed text component with presets
  • Icon: Flexible icon component
  • Card: Container components with elevation
  • CompressionCard: Specialized card for compression options
  • TextField: Styled input fields

All components support the app's theming system and Tailwind CSS styling.


🀝 Contributing

Contributions are welcome! Here's how you can help:

  1. Fork the repository
  2. Create a feature branch
    git checkout -b feature/amazing-feature
  3. Commit your changes
    git commit -m 'Add some amazing feature'
  4. Push to the branch
    git push origin feature/amazing-feature
  5. Open a Pull Request

Development Guidelines

  • Follow the existing code style and conventions
  • Write meaningful commit messages
  • Add tests for new features
  • Update documentation as needed
  • Ensure all tests pass before submitting PR

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ‘¨β€πŸ’» Author

Harshit Saini (@harshitsaini17)


πŸ™ Acknowledgments


πŸ“ž Support

If you encounter any issues or have questions:

  1. Check the Issues page
  2. Create a new issue with detailed information
  3. Contact the maintainer through GitHub

Made with ❀️ using React Native and Expo

⭐ Star this repo if you find it helpful!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors