Skip to content

Commit

Permalink
Sammich Detector works
Browse files Browse the repository at this point in the history
  • Loading branch information
Kris Salvador committed Apr 2, 2018
0 parents commit a524428
Show file tree
Hide file tree
Showing 23 changed files with 7,998 additions and 0 deletions.
Binary file added .DS_Store
Binary file not shown.
8 changes: 8 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"presets": ["babel-preset-expo", "react-native-dotenv"],
"env": {
"development": {
"plugins": ["transform-react-jsx-source"]
}
}
}
75 changes: 75 additions & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
[ignore]
; We fork some components by platform
.*/*[.]android.js

; Ignore templates for 'react-native init'
<PROJECT_ROOT>/node_modules/react-native/local-cli/templates/.*

; Ignore RN jest
<PROJECT_ROOT>/node_modules/react-native/jest/.*

; Ignore RNTester
<PROJECT_ROOT>/node_modules/react-native/RNTester/.*

; Ignore the website subdir
<PROJECT_ROOT>/node_modules/react-native/website/.*

; Ignore the Dangerfile
<PROJECT_ROOT>/node_modules/react-native/danger/dangerfile.js

; Ignore Fbemitter
<PROJECT_ROOT>/node_modules/fbemitter/.*

; Ignore "BUCK" generated dirs
<PROJECT_ROOT>/node_modules/react-native/\.buckd/

; Ignore unexpected extra "@providesModule"
.*/node_modules/.*/node_modules/fbjs/.*

; Ignore polyfills
<PROJECT_ROOT>/node_modules/react-native/Libraries/polyfills/.*

; Ignore various node_modules
<PROJECT_ROOT>/node_modules/react-native-gesture-handler/.*
<PROJECT_ROOT>/node_modules/expo/.*
<PROJECT_ROOT>/node_modules/react-navigation/.*
<PROJECT_ROOT>/node_modules/xdl/.*
<PROJECT_ROOT>/node_modules/reqwest/.*
<PROJECT_ROOT>/node_modules/metro-bundler/.*

[include]

[libs]
node_modules/react-native/Libraries/react-native/react-native-interface.js
node_modules/react-native/flow/
node_modules/expo/flow/

[options]
emoji=true

module.system=haste

module.file_ext=.js
module.file_ext=.jsx
module.file_ext=.json
module.file_ext=.ios.js

munge_underscores=true

module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'

suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState
suppress_type=$FixMe

suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(5[0-6]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native_oss[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(5[0-6]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native_oss[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError

unsafe.enable_getters_and_setters=true

[version]
^0.56.0
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# expo
.expo/

# dependencies
/node_modules

# misc
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
registry=https://registry.npmjs.org/
email=krissalvador27@gmail.com
1 change: 1 addition & 0 deletions .watchmanconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
42 changes: 42 additions & 0 deletions App.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import React, { Component } from "react";
import { StackNavigator } from "react-navigation";
import HomeScreen from "./components/Home";
import CameraScreen from "./components/Camera";
import DetectorScreen from "./components/Detector";
import ResultsScreen from "./components/Results";

const mapNavigationParamsToProps = SomeComponent => {
return class extends React.Component {
render() {
const { navigation, ...otherProps } = this.props;

// Unpack navigation params to send as props
const { state: { params } } = navigation;

return <SomeComponent {...this.props} {...params} />;
}
};
};

export default StackNavigator(
{
Home: {
screen: HomeScreen
},
Camera: {
screen: CameraScreen
},
Detector: {
screen: mapNavigationParamsToProps(DetectorScreen)
},
Results: {
screen: mapNavigationParamsToProps(ResultsScreen)
}
},
{
headerMode: "none",
navigationOptions: {
headerVisible: false
}
}
);
9 changes: 9 additions & 0 deletions App.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React from 'react';
import App from './App';

import renderer from 'react-test-renderer';

it('renders without crashing', () => {
const rendered = renderer.create(<App />).toJSON();
expect(rendered).toBeTruthy();
});
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Sammich

Life changing mobile app that determines whether or not something is a sandwich

## How to run

This app was built with [Create React Native App (CRNA)](https://facebook.github.io/react-native/blog/2017/03/13/introducing-create-react-native-app.html) and requires an API key from [Clarifai](https://clarifai.com/developer/guide/) in order for the app to access their public [food model API](https://clarifai.com/models/food-image-recognition-model-bd367be194cf45149e75f01d59f77ba7)

To run locally put your Clarifai API KEY in the `.env` file then do

npm install
npm start

You can then download [Expo](https://expo.io/tools#client) on your android or iOS device, scan the QR code and view the app :)

## Credits

* Create React Native App
* Clarifai
* Kawaii Icons made by [FreePik](https://www.flaticon.com/authors/freepik) from [flaticon](www.flaticon.com)
5 changes: 5 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"expo": {
"sdkVersion": "25.0.0"
}
}
Binary file added assets/.DS_Store
Binary file not shown.
43 changes: 43 additions & 0 deletions assets/camera.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions assets/checkmark-white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/fonts/VarelaRound-Regular.ttf
Binary file not shown.
Binary file added assets/loading.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions assets/redo-white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/sandwich.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit a524428

Please sign in to comment.