Skip to content

issacto/MyTinder

Repository files navigation

What doesn't kill u makes u - Tinder


A simulation app for Tinder
Front-end: React Native
Backend: Amazon Cognito, Google Firebase
Packages/System: Redux, React Native Gifted Chat, ImagePicker

Demonstration

cd tinder
react-native run-android

LoginScreen

(Click to see demonstration on Youtube!)


ProfileScreen


MatchedScreen


ChatScreen

(Click to see demonstration on Youtube!)

Amazon Cognito

In App.js:

import Amplify from 'aws-amplify';
Amplify.configure(aws_exports);

In registrationScreen.js:

import { Auth } from 'aws-amplify';
Auth.signUp({
       username: email,
       password,
       attributes: { email },
       })

** Amazon will send a email-verification email attached with a verification code for the user to input on the app


In loginScreen.js:

import { Auth } from 'aws-amplify';
Auth.signIn(email,password)
        .then(  user=>   
        store.dispatch(updateAuth({loggedin: true, name:name })))
        // On failure, display error in console
        .catch(err => Alert.alert("Wrong Username/Password"));
    }

In resetPasswordScreen.js

import { Auth } from 'aws-amplify';
Auth.forgotPasswordSubmit(email, confirmationForgotCode, ForgotGeneratedPassword)
    .then(xxxx)

Google Firebase

Realtime Database:

import firebase from '../firebase.js';
firebase.database().ref('users/' + name).set({xxxx});

Storage:

import firebase from '../firebase.js';
firebase.storage().ref("Usersimage/"+this.state.username).put(xxxx);

Areas to work on

  1. Get more description for Swipe
  2. Calculate distance for users
  3. Use id for Key instead of email

Special thanks to : Timothy Lo
Guide for swipetool.js: https://www.instamobile.io/react-native-controls/react-native-swipe-cards-tinder/