π Table of Contents
Development :
π± Demo
If you want to view app by yourself :
-
First variant :
1. install Expo for Android or Expo for IOS
2. launch expo and scan this qrcode :
- Second variant:
π Download GulSnap.apk for Android
π¬ 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 :
- 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
- Install latest Node.js :
nvm install node
- Install Yarn or Npm :
sudo apt install yarn
ornvm install --latest-npm
- Install Expo-cli :
npm install -g expo-cli
oryarn add global expo-cli
π¨ Installation
- Go to the directory where you want
cd somedirectory
- Clone this repo to your computer
git clone https://github.com/noth8/GulSnap-react-native
- Go to cloned repo
cd GulSnap-react-native
- Install all packages with
yarn install
ornpm install
π΄ Launch
Commands
name | Description |
---|---|
yarn start |
Launch expo server |
npm start |
Launch expo server |