├── .watchmanconfig ├── .gitattributes ├── client ├── assets │ ├── apple.png │ ├── icon.png │ ├── logo1.png │ ├── menu.png │ ├── slack.jpg │ ├── tesla.jpg │ ├── amazon.png │ ├── favicon.png │ ├── google.jpg │ ├── netflix.jpg │ ├── splash.png │ ├── square.png │ ├── twitter.png │ ├── add-item.png │ ├── facebook.png │ ├── githublogo.png │ ├── microsoft.png │ ├── screenshot1.png │ ├── screenshot2.png │ └── embr-placeholder.png ├── Archive.js ├── Menu.js ├── Login.js ├── PostCard.js ├── App.js ├── Home.js ├── AddPosting.js ├── styles.js └── PostFull.js ├── android ├── app │ ├── debug.keystore │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── values │ │ │ │ │ ├── strings.xml │ │ │ │ │ └── styles.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ └── mipmap-xxxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── embr │ │ │ │ │ ├── MainActivity.java │ │ │ │ │ └── MainApplication.java │ │ │ └── AndroidManifest.xml │ │ └── debug │ │ │ ├── AndroidManifest.xml │ │ │ └── java │ │ │ └── com │ │ │ └── embr │ │ │ └── ReactNativeFlipper.java │ ├── proguard-rules.pro │ ├── build_defs.bzl │ ├── _BUCK │ └── build.gradle ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── settings.gradle ├── build.gradle ├── gradle.properties ├── gradlew.bat └── gradlew ├── babel.config.js ├── ios ├── embr │ ├── Images.xcassets │ │ ├── Contents.json │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── AppDelegate.h │ ├── main.m │ ├── Info.plist │ ├── AppDelegate.m │ └── LaunchScreen.storyboard ├── embr.xcworkspace │ └── contents.xcworkspacedata ├── embrTests │ ├── Info.plist │ └── embrTests.m ├── embr-tvOSTests │ └── Info.plist ├── Podfile ├── embr-tvOS │ └── Info.plist ├── embr.xcodeproj │ ├── xcshareddata │ │ └── xcschemes │ │ │ ├── embr.xcscheme │ │ │ └── embr-tvOS.xcscheme │ └── project.pbxproj └── Podfile.lock ├── .buckconfig ├── README.md ├── index.js ├── __tests__ └── App-test.js ├── metro.config.js ├── server ├── models │ ├── userModel.js │ ├── jobModel.js │ └── index.js ├── server.js └── schema.js ├── .gitignore ├── package.json └── .flowconfig /.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text 2 | -------------------------------------------------------------------------------- /client/assets/apple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Charizard37/Embr/HEAD/client/assets/apple.png -------------------------------------------------------------------------------- /client/assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Charizard37/Embr/HEAD/client/assets/icon.png -------------------------------------------------------------------------------- /client/assets/logo1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Charizard37/Embr/HEAD/client/assets/logo1.png -------------------------------------------------------------------------------- /client/assets/menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Charizard37/Embr/HEAD/client/assets/menu.png -------------------------------------------------------------------------------- /client/assets/slack.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Charizard37/Embr/HEAD/client/assets/slack.jpg -------------------------------------------------------------------------------- /client/assets/tesla.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Charizard37/Embr/HEAD/client/assets/tesla.jpg -------------------------------------------------------------------------------- /client/assets/amazon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Charizard37/Embr/HEAD/client/assets/amazon.png -------------------------------------------------------------------------------- /client/assets/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Charizard37/Embr/HEAD/client/assets/favicon.png -------------------------------------------------------------------------------- /client/assets/google.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Charizard37/Embr/HEAD/client/assets/google.jpg -------------------------------------------------------------------------------- /client/assets/netflix.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Charizard37/Embr/HEAD/client/assets/netflix.jpg -------------------------------------------------------------------------------- /client/assets/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Charizard37/Embr/HEAD/client/assets/splash.png -------------------------------------------------------------------------------- /client/assets/square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Charizard37/Embr/HEAD/client/assets/square.png -------------------------------------------------------------------------------- /client/assets/twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Charizard37/Embr/HEAD/client/assets/twitter.png -------------------------------------------------------------------------------- /android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Charizard37/Embr/HEAD/android/app/debug.keystore -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /client/assets/add-item.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Charizard37/Embr/HEAD/client/assets/add-item.png -------------------------------------------------------------------------------- /client/assets/facebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Charizard37/Embr/HEAD/client/assets/facebook.png -------------------------------------------------------------------------------- /client/assets/githublogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Charizard37/Embr/HEAD/client/assets/githublogo.png -------------------------------------------------------------------------------- /client/assets/microsoft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Charizard37/Embr/HEAD/client/assets/microsoft.png -------------------------------------------------------------------------------- /client/assets/screenshot1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Charizard37/Embr/HEAD/client/assets/screenshot1.png -------------------------------------------------------------------------------- /client/assets/screenshot2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Charizard37/Embr/HEAD/client/assets/screenshot2.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | embr 3 | 4 | -------------------------------------------------------------------------------- /client/assets/embr-placeholder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Charizard37/Embr/HEAD/client/assets/embr-placeholder.png -------------------------------------------------------------------------------- /ios/embr/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Charizard37/Embr/HEAD/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Charizard37/Embr/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Charizard37/Embr/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Charizard37/Embr/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Charizard37/Embr/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Charizard37/Embr/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Charizard37/Embr/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Charizard37/Embr/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Charizard37/Embr/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Charizard37/Embr/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Charizard37/Embr/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'embr' 2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) 3 | include ':app' 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Embr 2 | 3 | The job-seeker's one-stop-shop for tracking and organizing pending job applications. 4 | 5 | 6 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import { AppRegistry } from 'react-native'; 6 | import App from './client/App'; 7 | import { name as appName } from './package.json'; 8 | 9 | AppRegistry.registerComponent(appName, () => App); 10 | -------------------------------------------------------------------------------- /ios/embr/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : UIResponder 5 | 6 | @property (nonatomic, strong) UIWindow *window; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /ios/embr/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char * argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.2-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /ios/embr.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /__tests__/App-test.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import 'react-native'; 6 | import React from 'react'; 7 | import App from '../App'; 8 | 9 | // Note: test renderer must be required after react-native. 10 | import renderer from 'react-test-renderer'; 11 | 12 | it('renders correctly', () => { 13 | renderer.create(); 14 | }); 15 | -------------------------------------------------------------------------------- /metro.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Metro configuration for React Native 3 | * https://github.com/facebook/react-native 4 | * 5 | * @format 6 | */ 7 | 8 | module.exports = { 9 | transformer: { 10 | getTransformOptions: async () => ({ 11 | transform: { 12 | experimentalImportSupport: false, 13 | inlineRequires: false, 14 | }, 15 | }), 16 | }, 17 | }; 18 | -------------------------------------------------------------------------------- /server/models/userModel.js: -------------------------------------------------------------------------------- 1 | module.exports = (sequelize, DataTypes) => { 2 | return sequelize.define( 3 | 'user', 4 | { 5 | id: { 6 | type: DataTypes.INTEGER, 7 | primaryKey: true, 8 | autoIncrement: true, 9 | }, 10 | firstName: DataTypes.STRING, 11 | lastName: DataTypes.STRING, 12 | }, 13 | { 14 | freezeTableName: true, 15 | } 16 | ); 17 | }; 18 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/embr/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.embr; 2 | 3 | import com.facebook.react.ReactActivity; 4 | 5 | public class MainActivity extends ReactActivity { 6 | 7 | /** 8 | * Returns the name of the main component registered from JavaScript. This is used to schedule 9 | * rendering of the component. 10 | */ 11 | @Override 12 | protected String getMainComponentName() { 13 | return "embr"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | -------------------------------------------------------------------------------- /android/app/build_defs.bzl: -------------------------------------------------------------------------------- 1 | """Helper definitions to glob .aar and .jar targets""" 2 | 3 | def create_aar_targets(aarfiles): 4 | for aarfile in aarfiles: 5 | name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")] 6 | lib_deps.append(":" + name) 7 | android_prebuilt_aar( 8 | name = name, 9 | aar = aarfile, 10 | ) 11 | 12 | def create_jar_targets(jarfiles): 13 | for jarfile in jarfiles: 14 | name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")] 15 | lib_deps.append(":" + name) 16 | prebuilt_jar( 17 | name = name, 18 | binary_jar = jarfile, 19 | ) 20 | -------------------------------------------------------------------------------- /ios/embr/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /ios/embrTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /ios/embr-tvOSTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | require_relative '../node_modules/react-native/scripts/react_native_pods' 2 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' 3 | 4 | platform :ios, '10.0' 5 | 6 | target 'embr' do 7 | config = use_native_modules! 8 | 9 | use_react_native!(:path => config["reactNativePath"]) 10 | 11 | target 'embrTests' do 12 | inherit! :complete 13 | # Pods for testing 14 | end 15 | 16 | # Enables Flipper. 17 | # 18 | # Note that if you have use_frameworks! enabled, Flipper will not work and 19 | # you should disable these next few lines. 20 | use_flipper! 21 | post_install do |installer| 22 | flipper_post_install(installer) 23 | end 24 | end 25 | 26 | target 'embr-tvOS' do 27 | # Pods for embr-tvOS 28 | 29 | target 'embr-tvOSTests' do 30 | inherit! :search_paths 31 | # Pods for testing 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /client/Archive.js: -------------------------------------------------------------------------------- 1 | import React, { useState } from 'react'; 2 | import PostCard from './PostCard'; 3 | import style from './styles'; 4 | import { 5 | SafeAreaView, 6 | StyleSheet, 7 | ScrollView, 8 | View, 9 | Text, 10 | StatusBar, 11 | Button, 12 | Alert, 13 | } from 'react-native'; 14 | 15 | const Archive = ({ navigation, route }) => { 16 | const PostCardArray = []; 17 | const jobArray = route.params.jobArray; 18 | if (jobArray.length) { 19 | jobArray.forEach((job, i) => { 20 | if (job.status === 'Rejected') { 21 | PostCardArray.push(); 22 | } 23 | }); 24 | } 25 | return ( 26 | 27 | Archived Postings 28 | {PostCardArray} 29 | 30 | ); 31 | }; 32 | 33 | export default Archive; 34 | -------------------------------------------------------------------------------- /server/models/jobModel.js: -------------------------------------------------------------------------------- 1 | module.exports = (sequelize, DataTypes) => { 2 | return sequelize.define( 3 | 'job', 4 | { 5 | id: { 6 | type: DataTypes.INTEGER, 7 | primaryKey: true, 8 | autoIncrement: true, 9 | }, 10 | user_id: { type: DataTypes.INTEGER, allowNull: false }, 11 | company: { type: DataTypes.STRING, allowNull: false }, 12 | position: { type: DataTypes.STRING, allowNull: false }, 13 | status: { type: DataTypes.STRING, allowNull: false }, 14 | comments: { type: DataTypes.STRING, allowNull: true }, 15 | phoneScreen: { type: DataTypes.BOOLEAN, allowNull: true }, 16 | interview: { type: DataTypes.BOOLEAN, allowNull: true }, 17 | takeHome: { type: DataTypes.BOOLEAN, allowNull: true }, 18 | doubleDown: { type: DataTypes.BOOLEAN, allowNull: true }, 19 | }, 20 | { 21 | freezeTableName: true, 22 | } 23 | ); 24 | }; 25 | 26 | //make applied into a date? 27 | -------------------------------------------------------------------------------- /server/models/index.js: -------------------------------------------------------------------------------- 1 | const Sequelize = require('sequelize'); 2 | const UserModel = require('./userModel'); 3 | const JobModel = require('./jobModel'); 4 | 5 | const sequelize = new Sequelize( 6 | 'postgres://volcmzja:siylZtNDjfceVNQeqqSzq6e7kSeWGS0J@lallah.db.elephantsql.com:5432/volcmzja', 7 | { 8 | dialect: 'postgres', 9 | logging: false, 10 | } 11 | ); 12 | 13 | const User = UserModel(sequelize, Sequelize); 14 | const Job = JobModel(sequelize, Sequelize); 15 | 16 | User.hasMany(Job); 17 | Job.belongsTo(User); 18 | 19 | sequelize.sync({ alter: true }).then(() => { 20 | console.log('db created'); 21 | }); 22 | // const models = { 23 | // User: sequelize.import('./userModel'), 24 | // Job: sequelize.import('./jobModel') 25 | // }; 26 | 27 | // Object.keys(models).forEach((key) => { 28 | // if ('associate' in models[key]) { 29 | // models[key].associate(models); 30 | // } 31 | // }); 32 | 33 | module.exports = sequelize; 34 | 35 | // export default models; 36 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | 24 | # Android/IntelliJ 25 | # 26 | build/ 27 | .idea 28 | .gradle 29 | local.properties 30 | *.iml 31 | 32 | # node.js 33 | # 34 | node_modules/ 35 | npm-debug.log 36 | yarn-error.log 37 | package-lock.json 38 | 39 | 40 | # BUCK 41 | buck-out/ 42 | \.buckd/ 43 | *.keystore 44 | !debug.keystore 45 | 46 | # fastlane 47 | # 48 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 49 | # screenshots whenever they are needed. 50 | # For more information about the recommended setup visit: 51 | # https://docs.fastlane.tools/best-practices/source-control/ 52 | 53 | */fastlane/report.xml 54 | */fastlane/Preview.html 55 | */fastlane/screenshots 56 | 57 | # Bundle artifact 58 | *.jsbundle 59 | 60 | # CocoaPods 61 | /ios/Pods/ 62 | 63 | 64 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 13 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | ext { 5 | buildToolsVersion = "29.0.2" 6 | minSdkVersion = 16 7 | compileSdkVersion = 29 8 | targetSdkVersion = 29 9 | } 10 | repositories { 11 | google() 12 | jcenter() 13 | } 14 | dependencies { 15 | classpath("com.android.tools.build:gradle:3.5.3") 16 | // NOTE: Do not place your application dependencies here; they belong 17 | // in the individual module build.gradle files 18 | } 19 | } 20 | 21 | allprojects { 22 | repositories { 23 | mavenLocal() 24 | maven { 25 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 26 | url("$rootDir/../node_modules/react-native/android") 27 | } 28 | maven { 29 | // Android JSC is installed from npm 30 | url("$rootDir/../node_modules/jsc-android/dist") 31 | } 32 | 33 | google() 34 | jcenter() 35 | maven { url 'https://www.jitpack.io' } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /client/Menu.js: -------------------------------------------------------------------------------- 1 | import 'react-native-gesture-handler'; 2 | import React, { useState } from 'react'; 3 | import { NavigationContainer } from '@react-navigation/native'; 4 | import { createStackNavigator } from '@react-navigation/stack'; 5 | import Archive from './Archive.js'; 6 | import Home from './Home.js'; 7 | import Login from './Login'; 8 | 9 | import { 10 | SafeAreaView, 11 | StyleSheet, 12 | ScrollView, 13 | View, 14 | Text, 15 | StatusBar, 16 | Button, 17 | Alert, 18 | } from 'react-native'; 19 | 20 | const Menu = ({ navigation, route, loggedIn, userLogout }) => { 21 | const [logOut, setLogOut] = useState(loggedIn); 22 | 23 | // const handleLogout = () => { 24 | // userLogout(false); 25 | // navigation.navigate('App'); 26 | // }; 27 | 28 | return ( 29 | 30 | 31 | 35 | 36 | 37 | 41 | 42 | ); 43 | }; 44 | 45 | export default Menu; 46 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | # AndroidX package structure to make it clearer which packages are bundled with the 21 | # Android operating system, and which are packaged with your app's APK 22 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 23 | android.useAndroidX=true 24 | # Automatically convert third-party libraries to use AndroidX 25 | android.enableJetifier=true 26 | 27 | # Version of flipper SDK to use with React Native 28 | FLIPPER_VERSION=0.37.0 29 | -------------------------------------------------------------------------------- /android/app/_BUCK: -------------------------------------------------------------------------------- 1 | # To learn about Buck see [Docs](https://buckbuild.com/). 2 | # To run your application with Buck: 3 | # - install Buck 4 | # - `npm start` - to start the packager 5 | # - `cd android` 6 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` 7 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck 8 | # - `buck install -r android/app` - compile, install and run application 9 | # 10 | 11 | load(":build_defs.bzl", "create_aar_targets", "create_jar_targets") 12 | 13 | lib_deps = [] 14 | 15 | create_aar_targets(glob(["libs/*.aar"])) 16 | 17 | create_jar_targets(glob(["libs/*.jar"])) 18 | 19 | android_library( 20 | name = "all-libs", 21 | exported_deps = lib_deps, 22 | ) 23 | 24 | android_library( 25 | name = "app-code", 26 | srcs = glob([ 27 | "src/main/java/**/*.java", 28 | ]), 29 | deps = [ 30 | ":all-libs", 31 | ":build_config", 32 | ":res", 33 | ], 34 | ) 35 | 36 | android_build_config( 37 | name = "build_config", 38 | package = "com.embr", 39 | ) 40 | 41 | android_resource( 42 | name = "res", 43 | package = "com.embr", 44 | res = "src/main/res", 45 | ) 46 | 47 | android_binary( 48 | name = "app", 49 | keystore = "//android/keystores:debug", 50 | manifest = "src/main/AndroidManifest.xml", 51 | package_type = "debug", 52 | deps = [ 53 | ":app-code", 54 | ], 55 | ) 56 | -------------------------------------------------------------------------------- /ios/embr-tvOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | NSAppTransportSecurity 26 | 27 | NSExceptionDomains 28 | 29 | localhost 30 | 31 | NSExceptionAllowsInsecureHTTPLoads 32 | 33 | 34 | 35 | 36 | NSLocationWhenInUseUsageDescription 37 | 38 | UILaunchStoryboardName 39 | LaunchScreen 40 | UIRequiredDeviceCapabilities 41 | 42 | armv7 43 | 44 | UISupportedInterfaceOrientations 45 | 46 | UIInterfaceOrientationPortrait 47 | UIInterfaceOrientationLandscapeLeft 48 | UIInterfaceOrientationLandscapeRight 49 | 50 | UIViewControllerBasedStatusBarAppearance 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /ios/embr/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | embr 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSRequiresIPhoneOS 26 | 27 | NSAppTransportSecurity 28 | 29 | NSAllowsArbitraryLoads 30 | 31 | NSExceptionDomains 32 | 33 | localhost 34 | 35 | NSExceptionAllowsInsecureHTTPLoads 36 | 37 | 38 | 39 | 40 | NSLocationWhenInUseUsageDescription 41 | 42 | UILaunchStoryboardName 43 | LaunchScreen 44 | UIRequiredDeviceCapabilities 45 | 46 | armv7 47 | 48 | UISupportedInterfaceOrientations 49 | 50 | UIInterfaceOrientationPortrait 51 | UIInterfaceOrientationLandscapeLeft 52 | UIInterfaceOrientationLandscapeRight 53 | 54 | UIViewControllerBasedStatusBarAppearance 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "embr", 3 | "displayName": "embr", 4 | "private": true, 5 | "version": "1.0.0", 6 | "description": "A job application tracking/organization tool", 7 | "author": "", 8 | "license": "ISC", 9 | "main": "index.js", 10 | "scripts": { 11 | "start": "node server/server.js", 12 | "dev": "nodemon server/server.js", 13 | "android": "react-native run-android", 14 | "ios": "react-native run-ios", 15 | "start-native": "react-native start", 16 | "test": "jest", 17 | "lint": "eslint ." 18 | }, 19 | "dependencies": { 20 | "@react-native-community/checkbox": "^0.5.2", 21 | "@react-native-community/masked-view": "^0.1.10", 22 | "@react-native-community/picker": "^1.7.1", 23 | "@react-navigation/native": "^5.7.3", 24 | "@react-navigation/stack": "^5.9.0", 25 | "express": "^4.17.1", 26 | "express-graphql": "^0.11.0", 27 | "graphql": "^15.3.0", 28 | "graphql-passport": "^0.6.3", 29 | "nodemon": "^2.0.4", 30 | "passport": "^0.4.1", 31 | "passport-github": "^1.1.0", 32 | "passport-oauth": "^1.0.0", 33 | "pg": "^8.3.3", 34 | "react": "16.13.1", 35 | "react-native": "0.63.2", 36 | "react-native-gesture-handler": "^1.8.0", 37 | "react-native-picker-select": "^8.0.0", 38 | "react-native-reanimated": "^1.13.0", 39 | "react-native-safe-area-context": "^3.1.7", 40 | "react-native-screens": "^2.10.1", 41 | "sequelize": "^6.3.5" 42 | }, 43 | "devDependencies": { 44 | "@babel/core": "^7.8.4", 45 | "@babel/runtime": "^7.8.4", 46 | "@react-native-community/eslint-config": "^1.1.0", 47 | "babel-jest": "^25.1.0", 48 | "eslint": "^6.5.1", 49 | "jest": "^25.1.0", 50 | "metro-react-native-babel-preset": "^0.59.0", 51 | "react-test-renderer": "16.13.1", 52 | "sequelize-cli": "^6.2.0" 53 | }, 54 | "jest": { 55 | "preset": "react-native" 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /client/Login.js: -------------------------------------------------------------------------------- 1 | import 'react-native-gesture-handler'; 2 | import React, { useState, useEffect } from 'react'; 3 | import { NavigationContainer } from '@react-navigation/native'; 4 | import { createStackNavigator } from '@react-navigation/stack'; 5 | import App from './App'; 6 | 7 | import { 8 | SafeAreaView, 9 | StyleSheet, 10 | ScrollView, 11 | View, 12 | Text, 13 | Button, 14 | Image, 15 | Linking, 16 | } from 'react-native'; 17 | 18 | const logoImage = require('./assets/logo1.png'); 19 | 20 | const Login = ({ loggedIn, userLogin }) => { 21 | const [authResult, setAuthResult] = useState(false); 22 | console.log(userLogin, 'in login'); 23 | const url = 'http://localhost:3000/ghlogin'; 24 | 25 | const handleAuth = async () => { 26 | await Linking.openURL(url); 27 | // set the state 28 | userLogin(true); 29 | }; 30 | 31 | return ( 32 | 33 | 34 | 35 | 36 | 37 | 68 | 69 | 70 | ); 71 | }; 72 | 73 | export default AddPosting; 74 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/embr/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.embr; 2 | 3 | import android.app.Application; 4 | import android.content.Context; 5 | import com.facebook.react.PackageList; 6 | import com.facebook.react.ReactApplication; 7 | import com.facebook.react.ReactInstanceManager; 8 | import com.facebook.react.ReactNativeHost; 9 | import com.facebook.react.ReactPackage; 10 | import com.facebook.soloader.SoLoader; 11 | import java.lang.reflect.InvocationTargetException; 12 | import java.util.List; 13 | 14 | public class MainApplication extends Application implements ReactApplication { 15 | 16 | private final ReactNativeHost mReactNativeHost = 17 | new ReactNativeHost(this) { 18 | @Override 19 | public boolean getUseDeveloperSupport() { 20 | return BuildConfig.DEBUG; 21 | } 22 | 23 | @Override 24 | protected List getPackages() { 25 | @SuppressWarnings("UnnecessaryLocalVariable") 26 | List packages = new PackageList(this).getPackages(); 27 | // Packages that cannot be autolinked yet can be added manually here, for example: 28 | // packages.add(new MyReactNativePackage()); 29 | return packages; 30 | } 31 | 32 | @Override 33 | protected String getJSMainModuleName() { 34 | return "index"; 35 | } 36 | }; 37 | 38 | @Override 39 | public ReactNativeHost getReactNativeHost() { 40 | return mReactNativeHost; 41 | } 42 | 43 | @Override 44 | public void onCreate() { 45 | super.onCreate(); 46 | SoLoader.init(this, /* native exopackage */ false); 47 | initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); 48 | } 49 | 50 | /** 51 | * Loads Flipper in React Native templates. Call this in the onCreate method with something like 52 | * initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); 53 | * 54 | * @param context 55 | * @param reactInstanceManager 56 | */ 57 | private static void initializeFlipper( 58 | Context context, ReactInstanceManager reactInstanceManager) { 59 | if (BuildConfig.DEBUG) { 60 | try { 61 | /* 62 | We use reflection here to pick up the class that initializes Flipper, 63 | since Flipper library is not available in release mode 64 | */ 65 | Class aClass = Class.forName("com.embr.ReactNativeFlipper"); 66 | aClass 67 | .getMethod("initializeFlipper", Context.class, ReactInstanceManager.class) 68 | .invoke(null, context, reactInstanceManager); 69 | } catch (ClassNotFoundException e) { 70 | e.printStackTrace(); 71 | } catch (NoSuchMethodException e) { 72 | e.printStackTrace(); 73 | } catch (IllegalAccessException e) { 74 | e.printStackTrace(); 75 | } catch (InvocationTargetException e) { 76 | e.printStackTrace(); 77 | } 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /server/server.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const { graphqlHTTP } = require('express-graphql'); 3 | const schema = require('./schema.js'); 4 | const passport = require('passport'); 5 | const sequelize = require('./models/index.js'); 6 | const GitHubStrategy = require('passport-github').Strategy; 7 | 8 | const PORT = 3000; 9 | const app = express(); 10 | 11 | // GitHub OAuth login 12 | passport.use( 13 | new GitHubStrategy( 14 | { 15 | authorizationURL: 'https://github.com/login/oauth/authorize', 16 | clientID: '6656e9fb701948578da4', 17 | clientSecret: '9384e2860766938e1a35a573604381c23dcc5af0', 18 | callbackURL: 'http://localhost:3000/auth/github/callback', 19 | }, 20 | (accessToken, refreshToken, profile, cb) => { 21 | console.log('profile', profile); 22 | console.log('accessToken', accessToken); 23 | // User.findOrCreate({ githubId: profile.id }, (err, user) => { ---> to create database object 24 | // return cb(err, user); 25 | cb(null, profile); 26 | // }); 27 | } 28 | ) 29 | ); 30 | 31 | // structure url as full http url and private IP address from QR code and then:3000/ 32 | 33 | passport.serializeUser((user, done) => { 34 | done(null, user.id); 35 | }); 36 | 37 | passport.deserializeUser((id, done) => { 38 | User.findById(id, (err, user) => { 39 | done(err, user); 40 | }); 41 | }); 42 | 43 | app.use(passport.initialize()); 44 | 45 | app.get('/ghlogin', passport.authenticate('github')); 46 | 47 | app.get( 48 | '/auth/github/callback', 49 | passport.authenticate('github', { 50 | failureRedirect: '/login', 51 | failureFlash: true, 52 | }), 53 | (req, res) => { 54 | // auth successful need to redirect to home page 55 | res.send('Auth successful'); 56 | res.redirect('/'); 57 | } 58 | ); 59 | 60 | app.use( 61 | '/graphql', 62 | graphqlHTTP({ 63 | schema, 64 | graphiql: true, 65 | }) 66 | ); 67 | //db 68 | 69 | //Test connection to database 70 | sequelize 71 | .authenticate() 72 | .then(() => console.log('Database connected')) 73 | .catch((err) => console.log('Error: ' + err)); 74 | 75 | // sequelize.sync().then(() => { 76 | // console.log('sync'); 77 | // }); 78 | 79 | app.get('/', (req, res) => { 80 | res.redirect('/graphql'); 81 | }); 82 | 83 | app.use('*', function (req, res) { 84 | res.status(404); 85 | }); 86 | 87 | app.use((err, req, res, next) => { 88 | const defaultErr = { 89 | log: 'Express error handler caught unknown middleware error', 90 | status: 400, 91 | message: { err: 'An error occurred' }, 92 | }; 93 | const errorObj = Object.assign(defaultErr, err); 94 | // console.log('err: ', err); 95 | console.error('console error: ', err); 96 | return res.status(errorObj.status).send('Something broke!'); 97 | }); 98 | 99 | app.listen(PORT, () => console.log(`listening on port ${PORT}`)); 100 | -------------------------------------------------------------------------------- /android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%" == "" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%" == "" set DIRNAME=. 29 | set APP_BASE_NAME=%~n0 30 | set APP_HOME=%DIRNAME% 31 | 32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 34 | 35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 37 | 38 | @rem Find java.exe 39 | if defined JAVA_HOME goto findJavaFromJavaHome 40 | 41 | set JAVA_EXE=java.exe 42 | %JAVA_EXE% -version >NUL 2>&1 43 | if "%ERRORLEVEL%" == "0" goto init 44 | 45 | echo. 46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 47 | echo. 48 | echo Please set the JAVA_HOME variable in your environment to match the 49 | echo location of your Java installation. 50 | 51 | goto fail 52 | 53 | :findJavaFromJavaHome 54 | set JAVA_HOME=%JAVA_HOME:"=% 55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 56 | 57 | if exist "%JAVA_EXE%" goto init 58 | 59 | echo. 60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 61 | echo. 62 | echo Please set the JAVA_HOME variable in your environment to match the 63 | echo location of your Java installation. 64 | 65 | goto fail 66 | 67 | :init 68 | @rem Get command-line arguments, handling Windows variants 69 | 70 | if not "%OS%" == "Windows_NT" goto win9xME_args 71 | 72 | :win9xME_args 73 | @rem Slurp the command line arguments. 74 | set CMD_LINE_ARGS= 75 | set _SKIP=2 76 | 77 | :win9xME_args_slurp 78 | if "x%~1" == "x" goto execute 79 | 80 | set CMD_LINE_ARGS=%* 81 | 82 | :execute 83 | @rem Setup the command line 84 | 85 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 86 | 87 | @rem Execute Gradle 88 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 89 | 90 | :end 91 | @rem End local scope for the variables with windows NT shell 92 | if "%ERRORLEVEL%"=="0" goto mainEnd 93 | 94 | :fail 95 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 96 | rem the _cmd.exe /c_ return code! 97 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 98 | exit /b 1 99 | 100 | :mainEnd 101 | if "%OS%"=="Windows_NT" endlocal 102 | 103 | :omega 104 | -------------------------------------------------------------------------------- /android/app/src/debug/java/com/embr/ReactNativeFlipper.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | *

This source code is licensed under the MIT license found in the LICENSE file in the root 5 | * directory of this source tree. 6 | */ 7 | package com.embr; 8 | 9 | import android.content.Context; 10 | import com.facebook.flipper.android.AndroidFlipperClient; 11 | import com.facebook.flipper.android.utils.FlipperUtils; 12 | import com.facebook.flipper.core.FlipperClient; 13 | import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin; 14 | import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin; 15 | import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin; 16 | import com.facebook.flipper.plugins.inspector.DescriptorMapping; 17 | import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin; 18 | import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor; 19 | import com.facebook.flipper.plugins.network.NetworkFlipperPlugin; 20 | import com.facebook.flipper.plugins.react.ReactFlipperPlugin; 21 | import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin; 22 | import com.facebook.react.ReactInstanceManager; 23 | import com.facebook.react.bridge.ReactContext; 24 | import com.facebook.react.modules.network.NetworkingModule; 25 | import okhttp3.OkHttpClient; 26 | 27 | public class ReactNativeFlipper { 28 | public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { 29 | if (FlipperUtils.shouldEnableFlipper(context)) { 30 | final FlipperClient client = AndroidFlipperClient.getInstance(context); 31 | 32 | client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults())); 33 | client.addPlugin(new ReactFlipperPlugin()); 34 | client.addPlugin(new DatabasesFlipperPlugin(context)); 35 | client.addPlugin(new SharedPreferencesFlipperPlugin(context)); 36 | client.addPlugin(CrashReporterPlugin.getInstance()); 37 | 38 | NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin(); 39 | NetworkingModule.setCustomClientBuilder( 40 | new NetworkingModule.CustomClientBuilder() { 41 | @Override 42 | public void apply(OkHttpClient.Builder builder) { 43 | builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin)); 44 | } 45 | }); 46 | client.addPlugin(networkFlipperPlugin); 47 | client.start(); 48 | 49 | // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized 50 | // Hence we run if after all native modules have been initialized 51 | ReactContext reactContext = reactInstanceManager.getCurrentReactContext(); 52 | if (reactContext == null) { 53 | reactInstanceManager.addReactInstanceEventListener( 54 | new ReactInstanceManager.ReactInstanceEventListener() { 55 | @Override 56 | public void onReactContextInitialized(ReactContext reactContext) { 57 | reactInstanceManager.removeReactInstanceEventListener(this); 58 | reactContext.runOnNativeModulesQueueThread( 59 | new Runnable() { 60 | @Override 61 | public void run() { 62 | client.addPlugin(new FrescoFlipperPlugin()); 63 | } 64 | }); 65 | } 66 | }); 67 | } else { 68 | client.addPlugin(new FrescoFlipperPlugin()); 69 | } 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /ios/embr.xcodeproj/xcshareddata/xcschemes/embr.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 53 | 55 | 61 | 62 | 63 | 64 | 70 | 72 | 78 | 79 | 80 | 81 | 83 | 84 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /ios/embr.xcodeproj/xcshareddata/xcschemes/embr-tvOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 53 | 55 | 61 | 62 | 63 | 64 | 70 | 72 | 78 | 79 | 80 | 81 | 83 | 84 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /client/styles.js: -------------------------------------------------------------------------------- 1 | import { SafeAreaView, StyleSheet, ScrollView, View, Text, StatusBar } from 'react-native'; 2 | 3 | import { 4 | Header, 5 | LearnMoreLinks, 6 | Colors, 7 | DebugInstructions, 8 | ReloadInstructions, 9 | } from 'react-native/Libraries/NewAppScreen'; 10 | 11 | const styles = StyleSheet.create({ 12 | scrollView: { 13 | backgroundColor: Colors.lighter, 14 | }, 15 | engine: { 16 | position: 'absolute', 17 | right: 0, 18 | }, 19 | body: { 20 | backgroundColor: Colors.white, 21 | }, 22 | sectionContainer: { 23 | marginTop: 32, 24 | paddingHorizontal: 24, 25 | }, 26 | sectionTitle: { 27 | fontSize: 24, 28 | fontWeight: '600', 29 | color: Colors.black, 30 | }, 31 | sectionDescription: { 32 | marginTop: 8, 33 | fontSize: 18, 34 | fontWeight: '400', 35 | color: Colors.dark, 36 | }, 37 | highlight: { 38 | fontWeight: '700', 39 | }, 40 | footer: { 41 | color: Colors.dark, 42 | fontSize: 12, 43 | fontWeight: '600', 44 | padding: 4, 45 | paddingRight: 12, 46 | textAlign: 'right', 47 | }, 48 | container: { 49 | marginTop: 10, 50 | marginBottom: 10, 51 | marginRight: 10, 52 | marginLeft: 10, 53 | justifyContent: 'center', 54 | alignItems: 'center', 55 | }, 56 | containerFull: { 57 | marginTop: 10, 58 | marginBottom: 10, 59 | marginRight: 10, 60 | marginLeft: 10, 61 | }, 62 | imageContainer: { 63 | marginTop: 10, 64 | alignItems: 'center', 65 | }, 66 | PostCardFrame: { 67 | // borderWidth: 1, 68 | // borderColor: 'black', 69 | marginTop: 10, 70 | marginBottom: 10, 71 | marginRight: 10, 72 | marginLeft: 10, 73 | maxHeight: 175, 74 | width: '40%', 75 | borderRadius: 10, 76 | }, 77 | CompanyName: { 78 | marginTop: 5, 79 | marginBottom: 5, 80 | marginRight: 5, 81 | marginLeft: 5, 82 | color: 'black', 83 | textAlign: 'center', 84 | }, 85 | JobTitle: { 86 | marginTop: 5, 87 | marginBottom: 5, 88 | marginRight: 5, 89 | marginLeft: 5, 90 | color: 'grey', 91 | textAlign: 'center', 92 | }, 93 | CompanyNameFull: { 94 | marginTop: 5, 95 | marginBottom: 5, 96 | marginRight: 5, 97 | marginLeft: 5, 98 | color: 'black', 99 | textAlign: 'left', 100 | fontSize: 40, 101 | }, 102 | JobTitleFull: { 103 | marginTop: 5, 104 | marginBottom: 5, 105 | marginRight: 5, 106 | marginLeft: 5, 107 | color: 'grey', 108 | textAlign: 'left', 109 | fontSize: 30, 110 | }, 111 | logo: { 112 | maxHeight: 75, 113 | maxWidth: 75, 114 | justifyContent: 'center', 115 | alignItems: 'center', 116 | }, 117 | rowContainer: { 118 | display: 'flex', 119 | flexDirection: 'row', 120 | flexWrap: 'wrap', 121 | justifyContent: 'center', 122 | alignItems: 'center', 123 | }, 124 | textInputStyle: { 125 | height: '40%', 126 | width: '100%', 127 | backgroundColor: 'azure', 128 | fontSize: 20, 129 | }, 130 | newPostingView: { 131 | marginTop: 100, 132 | display: 'flex', 133 | flexDirection: 'column', 134 | justifyContent: 'space-around', 135 | alignItems: 'center', 136 | }, 137 | newPosting: { 138 | height: 30, 139 | width: '70%', 140 | borderStyle: 'solid', 141 | borderWidth: 1, 142 | borderRadius: 5, 143 | backgroundColor: 'white', 144 | paddingLeft: 5, 145 | marginBottom: 20, 146 | }, 147 | inputIOS: { 148 | height: 40, 149 | fontSize: 20, 150 | borderStyle: 'solid', 151 | borderLeftWidth: 0, 152 | borderRightWidth: 0, 153 | marginTop: 5, 154 | borderWidth: 1, 155 | backgroundColor: 'white', 156 | paddingLeft: 5, 157 | marginBottom: 5, 158 | textAlign: 'center', 159 | }, 160 | inputAndroid: { 161 | height: 30, 162 | textAlign: 'center', 163 | }, 164 | fullNotes: { 165 | display: 'flex', 166 | justifyContent: 'center', 167 | alignItems: 'center', 168 | }, 169 | checkContainer: { 170 | width: '100%', 171 | display: 'flex', 172 | flexDirection: 'row', 173 | justifyContent: 'space-between', 174 | marginBottom: 9, 175 | }, 176 | companyContainer: { 177 | display: 'flex', 178 | flexDirection: 'row', 179 | justifyContent: 'space-between', 180 | alignItems: 'center', 181 | marginBottom: 30, 182 | }, 183 | }); 184 | 185 | export default styles; 186 | -------------------------------------------------------------------------------- /client/PostFull.js: -------------------------------------------------------------------------------- 1 | import React, { useState, useEffect } from 'react'; 2 | import styles from './styles.js'; 3 | import RNPickerSelect from 'react-native-picker-select'; 4 | import CheckBox from '@react-native-community/checkbox'; 5 | 6 | import { 7 | SafeAreaView, 8 | StyleSheet, 9 | ScrollView, 10 | View, 11 | Text, 12 | StatusBar, 13 | Button, 14 | Alert, 15 | Image, 16 | TouchableOpacity, 17 | TextInput, 18 | } from 'react-native'; 19 | 20 | const PostFull = ({ navigation, route }) => { 21 | const [jobArray, setJobArray] = useState({}); 22 | const [checked, setCheck] = useState(true); 23 | 24 | const companyLogo = route.params.logo; 25 | const { jobObj } = route.params; 26 | const { id, status, phoneScreen, interview, takeHome, doubleDown, comments } = jobObj; 27 | 28 | const [appStatus, setAppStatus] = useState(status); 29 | const [appPhoneScreen, setAppPhoneScreen] = useState(phoneScreen); 30 | const [appInterview, setAppInterview] = useState(interview); 31 | const [appTakeHome, setAppTakeHome] = useState(takeHome); 32 | const [appDoubleDown, setAppDoubleDown] = useState(doubleDown); 33 | const [appComments, setAppComments] = useState(comments); 34 | 35 | const saveChanges = () => { 36 | fetch('http://localhost:3000/graphql', { 37 | method: 'POST', 38 | body: JSON.stringify({ 39 | query: `mutation {editJob(id: ${id}, status: "${appStatus}", phoneScreen: ${appPhoneScreen}, interview: ${appInterview}, takeHome: ${appTakeHome}, doubleDown: ${appDoubleDown}, comments: "${appComments}"){id}}`, 40 | }), 41 | headers: { 'Content-Type': 'application/json' }, 42 | }) 43 | .then((data) => data.json()) 44 | .then((data) => { 45 | console.log('Mutated that sucka'); 46 | navigation.goBack(); 47 | }) 48 | .catch((error) => console.log(error)); 49 | }; 50 | 51 | return ( 52 | 53 | 54 | 55 | {jobObj.company} 56 | {jobObj.position} 57 | 58 | 59 | 60 | 61 | setAppStatus(val)} 64 | placeholder={{ label: appStatus, value: appStatus }} 65 | style={styles} 66 | items={[ 67 | { label: 'Not yet applied', value: 'Not yet applied' }, 68 | { label: 'Applied, waiting to hear back', value: 'Applied, waiting to hear back' }, 69 | { label: 'Heard back', value: 'Heard back' }, 70 | { label: 'Offer received', value: 'Offer received' }, 71 | { label: 'Rejected', value: 'Rejected' }, 72 | ]} 73 | > 74 | 75 | 76 | Double Down 77 | setAppDoubleDown(!appDoubleDown)} 81 | /> 82 | 83 | 84 | Phonescreen 85 | setAppPhoneScreen(!appPhoneScreen)} 89 | /> 90 | 91 | 92 | Interview 93 | setAppInterview(!appInterview)} 97 | /> 98 | 99 | 100 | Take-Home 101 | setAppTakeHome(!appTakeHome)} 105 | /> 106 | 107 | 108 | {/* Phonescreen, Interview, Takehome, DoubleDowns Checkboxes*/} 109 | 110 | 111 | setAppComments(text)} 115 | multiline={true} 116 | > 117 | {comments} 118 | 119 |