noth8 / gulsnap-react-native

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸ“‘ Table of Contents


Development :

  1. Prerequisites
  2. Installation
  3. Launch



πŸ“± Demo



If you want to view app by yourself :





🏬 Project Structure


β”œβ”€β”€ expo-shared/                        # Shared folder between collaborators 
β”‚   └── assets.json                     # Compressed images
β”œβ”€β”€ assets/                             # Main assets of the app
β”‚   β”œβ”€β”€ icon.png                        # App icon 
β”‚   └── splash.png                      # App splash screen
β”œβ”€β”€ src/                                # Source files
β”‚   β”œβ”€β”€ actions/                        # Redux actions
β”‚   β”‚   β”œβ”€β”€ ApiActions.js               # Fetching images from api 
β”‚   β”‚   β”œβ”€β”€ AuthActions.js              # Firebase auth
β”‚   β”‚   β”œβ”€β”€ ImageActions.js             # Handling current selected image
β”‚   β”‚   β”œβ”€β”€ index.js                    # Export all objects from this dir   
β”‚   β”‚   β”œβ”€β”€ LikesActions.js             # Saving/fetching favorite images from firebase
β”‚   β”‚   β”œβ”€β”€ NavigationActions.js        # Handling return to the prev screen behavior 
β”‚   β”‚   └── Types.js                    # Actions types
β”‚   β”œβ”€β”€ assets/                         # Local assets
β”‚   β”‚   └── logo.png                    # Logo for auth screens 
β”‚   β”œβ”€β”€ components/                     # App components
β”‚   β”‚   β”œβ”€β”€ common/                     # Reusable components
β”‚   β”‚   β”‚   β”œβ”€β”€ Button.js               # Button for submiting actions
β”‚   β”‚   β”‚   β”œβ”€β”€ index.js                # Export all objects from this dir
β”‚   β”‚   β”‚   β”œβ”€β”€ InputField.js           # Input field for auth screens
β”‚   β”‚   β”‚   β”œβ”€β”€ Spinner.js              # Spinner for loading data process
β”‚   β”‚   β”‚   └── StatusBar.js            # Customized status bar for Android/IOS
β”‚   β”‚   β”œβ”€β”€ LikeButton.js               # Button for saving/removing a favorite image
β”‚   β”‚   β”œβ”€β”€ List.js                     # Show the list of thumbnails images
β”‚   β”‚   └── Thumbnail.js                # Wrapper for a thumbnail image
β”‚   β”œβ”€β”€ config/                         # App config
β”‚   β”‚   β”œβ”€β”€ app.js                      # Main settings
β”‚   β”‚   β”œβ”€β”€ firebase.js                 # Firebase connection setting
β”‚   β”‚   └── languages.js                # All text strings used in the app
β”‚   β”œβ”€β”€ navigation/                     # App navigations between screens
β”‚   β”‚   └── AppNavigator.js             # Base Routes
β”‚   β”œβ”€β”€ reducers/                       # Redux reducers state handling
β”‚   β”‚   β”œβ”€β”€ ApiReducer.js               # Fetching images
β”‚   β”‚   β”œβ”€β”€ AuthReducer.js              # Firebase auth
β”‚   β”‚   β”œβ”€β”€ ImageReducer.js             # Handling for a currently selected image
β”‚   β”‚   β”œβ”€β”€ index.js                    # Export all objects from this dir
β”‚   β”‚   β”œβ”€β”€ LikesReducer.js             # Saving/fetching favorite images from firebase
β”‚   β”‚   └── NavigationReducer.js        # State handling for returning to the prev screen
β”‚   β”œβ”€β”€ screens/                        # App screens
β”‚   β”‚   β”œβ”€β”€ auth/                       # Auth screens
β”‚   β”‚   β”‚   β”œβ”€β”€ LoginScreen.js          # Login using firebase
β”‚   β”‚   β”‚   β”œβ”€β”€ RegisterScreen.js       # Register using firebase
β”‚   β”‚   β”‚   └── ResetPasswordScreen.js  # Reset password using firebase
β”‚   β”‚   β”œβ”€β”€ FullImageScreen.js          # View image in full size
β”‚   β”‚   β”œβ”€β”€ HomeScreen.js               # List of fetched images from api
β”‚   β”‚   β”œβ”€β”€ index.js                    # Export all objects from this dir
β”‚   β”‚   β”œβ”€β”€ LikesScreen.js              # Show list of user saved images 
β”‚   β”‚   └── UserScreen.js               # Show auth stuff 
β”‚   β”œβ”€β”€ utils/                          # Helper functions
β”‚   β”‚   β”œβ”€β”€ checkLike.js                # Check if user has favorite image or not
β”‚   β”‚   β”œβ”€β”€ index.js                    # Export all objects from this dir
β”‚   β”‚   β”œβ”€β”€ percentageToDP.js           # Responsive height and width
β”‚   β”‚   β”œβ”€β”€ replaceUrlParam.js          # Change quality and size in url request 
β”‚   β”‚   └── toHash.js                   # Convert image url to hash for firebase storing
β”‚   └── App.js                          # The main entry point of the app
β”œβ”€β”€ .gitignore                          # List of files ignored by git
β”œβ”€β”€ .watchmanconfig                     # Config for a file watching service
β”œβ”€β”€ App.js                              # Export main entry point of the app
β”œβ”€β”€ app.json                            # Prettier formatter config
β”œβ”€β”€ babel.config.js                     # Babel presets
β”œβ”€β”€ LICENCE                             # Project license
β”œβ”€β”€ readme.md                           # Description of the project
└── package.json                        # Node.js dependencies and scripts



πŸ” Packages list


General :

  • expo - The fastest way to build an app.

    Purpose : build, deploy, and quickly iterate on native iOS and Android apps from the same JavaScript codebase.
    
  • firebase - is platform which allow to build web and mobile applications without server side programming language.

    Purpose : storing users data(accounts, favorite images) on real-time database and syncing data among users without delay.
    
  • redux - A predictable state container for JavaScript apps.

    Purpose : helps to write application that behave consistently, run in different environments (client, server, and native), and are easy to test.
    
  • redux-thunk - Thunk middleware for Redux.

    Purpose : Middleware extend the store's abilities, and let to write async logic that interacts with the store.
    
  • react-navigation - is born from the React Native community's need for an extensible yet easy-to-use navigation solution based on Javascript.

    Purpose : Routing and navigation for app.
    
  • react-navigation-material-bottom-tabs - A Material Design bottom tab navigator for React Navigation

    Purpose : animation.
    
  • react-navigation-redux-helpers - Redux middleware and utils for React Navigation.

    Purpose : controling app routes through redux.
    
  • react-navigation-transitions - Custom transitions for react-navigation.

    Purpose : animation.
    
  • recyclerlistview - high performance listview for React Native and web.

    Purpose : apart from all performance benefits RecyclerListView comes with great features out of the box and also fixing memomory leaks with default FlatList. 
    
  • react-native-image-progress - Progress indicator for networked images in React Native.

    Purpose : find out the state of downloading image. 
    



🚧 Prerequisites


You must have :

  • Node.js
  • Yarn or Npm
  • Expo-cli

or install :

  1. Install Node Version Manager with these commands:
    • sudo apt update
    • sudo apt install build-essential libssl-dev
    • curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
    • source ~/.bashrc

  1. Install latest Node.js :
    • nvm install node

  1. Install Yarn or Npm :
    • sudo apt install yarn or
    • nvm install --latest-npm

  1. Install Expo-cli :
    • npm install -g expo-cli or
    • yarn add global expo-cli



πŸ”¨ Installation


  1. Go to the directory where you want cd somedirectory
  2. Clone this repo to your computer git clone https://github.com/noth8/GulSnap-react-native
  3. Go to cloned repo cd GulSnap-react-native
  4. Install all packages with yarn install or npm install



πŸ”΄ Launch


Commands
name Description
yarn start Launch expo server
npm start Launch expo server

About

License:MIT License


Languages

Language:JavaScript 100.0%