From dc9fcba125fd63ce953d9fc0a6a8c170e8d45080 Mon Sep 17 00:00:00 2001 From: Huey Date: Sun, 25 Nov 2018 13:14:30 +0000 Subject: [PATCH 01/10] added code --- README.md | 52 +- app/.gitignore | 3 + app/App.js | 4 + app/RootNavigator.js | 21 + app/app.json | 27 + app/assets/icon.png | Bin 0 -> 2976 bytes app/assets/splash.png | Bin 0 -> 7178 bytes app/babel.config.js | 7 + app/components/HeaderText.js | 18 + app/components/NormalText.js | 18 + app/components/TimePicker.js | 38 + app/package.json | 21 + app/utils/NotificationsManager.js | 56 + app/views/AppointmentBookedView.js | 26 + app/views/BookAppointmentView.js | 60 + app/views/RootView.js | 56 + app/yarn.lock | 4791 + server/.gitignore | 3 + server/IVRS.js | 23 + server/IVRSServer.js | 35 + server/package.json | 7 + server/yarn.lock | 634 + .../branding/apple-touch-icon-ipad-pro.png | Bin 0 -> 1593 bytes .../branding/apple-touch-icon-ipad-retina.png | Bin 0 -> 1432 bytes .../assets/branding/apple-touch-icon-ipad.png | Bin 0 -> 799 bytes .../branding/apple-touch-icon-old-ipad.png | Bin 0 -> 743 bytes .../branding/apple-touch-icon-retina.png | Bin 0 -> 1210 bytes .../branding/apple-touch-icon-retina144.png | Bin 0 -> 1376 bytes .../branding/apple-touch-icon-retina180.png | Bin 0 -> 1714 bytes .../assets/branding/apple-touch-icon.png | Bin 0 -> 673 bytes wireframes/assets/branding/startup-568.png | Bin 0 -> 3468 bytes .../startup-ipad-landscape-retina.png | Bin 0 -> 8643 bytes .../branding/startup-ipad-landscape.png | Bin 0 -> 3667 bytes .../branding/startup-ipad-pro-landscape.png | Bin 0 -> 14949 bytes .../assets/branding/startup-ipad-pro.png | Bin 0 -> 12385 bytes .../assets/branding/startup-ipad-retina.png | Bin 0 -> 8677 bytes wireframes/assets/branding/startup-ipad.png | Bin 0 -> 4590 bytes .../assets/branding/startup-retina-6.png | Bin 0 -> 3853 bytes .../startup-retina-6plus-landscape.png | Bin 0 -> 10162 bytes .../assets/branding/startup-retina-6plus.png | Bin 0 -> 8063 bytes wireframes/assets/branding/startup-retina.png | Bin 0 -> 3347 bytes wireframes/assets/branding/startup.png | Bin 0 -> 1946 bytes .../3d332f92da0a730b92a7b09e7db13e10.svg | 1 + ...4d11361d17fef026e2d6b2c1a8fe379_999999.svg | 7 + ...0a2a6e58cba73da2d0b8dc3e0ac8fe8_ffffff.svg | 7 + wireframes/data/data.js | 1 + wireframes/frame.html | 118 + wireframes/images/player/actions-sprite-1.png | Bin 0 -> 11412 bytes wireframes/images/player/madewithproto.png | Bin 0 -> 2691 bytes wireframes/images/player/madewithproto@2x.png | Bin 0 -> 6068 bytes wireframes/images/player/madewithproto@3x.png | Bin 0 -> 9709 bytes wireframes/images/player/touch-cursor-64.png | Bin 0 -> 3944 bytes wireframes/index.html | 233 + .../libraries/common/components.1.00.css | 1 + wireframes/libraries/common/components.js | 6905 ++ wireframes/libraries/ios7/components.1.00.css | 1 + wireframes/libraries/ios7/components.js | 7540 ++ wireframes/readme.txt | 1 + wireframes/scripts/player-export.js | 203 + .../aframe-gif-shader.protoio.custom.js | 1033 + .../plugins/aframe/aframe.protoio.custom.js | 79471 ++++++++++++++++ .../scripts/plugins/lottie/lottie.min.js | 14092 +++ wireframes/scripts/preview-export-min.js | 2 + wireframes/stylesheets/player-export.css | 33 + wireframes/stylesheets/preview-export-min.css | 1 + 65 files changed, 115499 insertions(+), 51 deletions(-) create mode 100644 app/.gitignore create mode 100644 app/App.js create mode 100644 app/RootNavigator.js create mode 100644 app/app.json create mode 100644 app/assets/icon.png create mode 100644 app/assets/splash.png create mode 100644 app/babel.config.js create mode 100644 app/components/HeaderText.js create mode 100644 app/components/NormalText.js create mode 100644 app/components/TimePicker.js create mode 100644 app/package.json create mode 100644 app/utils/NotificationsManager.js create mode 100644 app/views/AppointmentBookedView.js create mode 100644 app/views/BookAppointmentView.js create mode 100644 app/views/RootView.js create mode 100644 app/yarn.lock create mode 100644 server/.gitignore create mode 100644 server/IVRS.js create mode 100644 server/IVRSServer.js create mode 100644 server/package.json create mode 100644 server/yarn.lock create mode 100644 wireframes/assets/branding/apple-touch-icon-ipad-pro.png create mode 100644 wireframes/assets/branding/apple-touch-icon-ipad-retina.png create mode 100644 wireframes/assets/branding/apple-touch-icon-ipad.png create mode 100644 wireframes/assets/branding/apple-touch-icon-old-ipad.png create mode 100644 wireframes/assets/branding/apple-touch-icon-retina.png create mode 100644 wireframes/assets/branding/apple-touch-icon-retina144.png create mode 100644 wireframes/assets/branding/apple-touch-icon-retina180.png create mode 100644 wireframes/assets/branding/apple-touch-icon.png create mode 100644 wireframes/assets/branding/startup-568.png create mode 100644 wireframes/assets/branding/startup-ipad-landscape-retina.png create mode 100644 wireframes/assets/branding/startup-ipad-landscape.png create mode 100644 wireframes/assets/branding/startup-ipad-pro-landscape.png create mode 100644 wireframes/assets/branding/startup-ipad-pro.png create mode 100644 wireframes/assets/branding/startup-ipad-retina.png create mode 100644 wireframes/assets/branding/startup-ipad.png create mode 100644 wireframes/assets/branding/startup-retina-6.png create mode 100644 wireframes/assets/branding/startup-retina-6plus-landscape.png create mode 100644 wireframes/assets/branding/startup-retina-6plus.png create mode 100644 wireframes/assets/branding/startup-retina.png create mode 100644 wireframes/assets/branding/startup.png create mode 100644 wireframes/assets/f1424091456673/3d332f92da0a730b92a7b09e7db13e10.svg create mode 100644 wireframes/assets/generated/54d11361d17fef026e2d6b2c1a8fe379_999999.svg create mode 100644 wireframes/assets/generated/b0a2a6e58cba73da2d0b8dc3e0ac8fe8_ffffff.svg create mode 100644 wireframes/data/data.js create mode 100644 wireframes/frame.html create mode 100644 wireframes/images/player/actions-sprite-1.png create mode 100644 wireframes/images/player/madewithproto.png create mode 100644 wireframes/images/player/madewithproto@2x.png create mode 100644 wireframes/images/player/madewithproto@3x.png create mode 100644 wireframes/images/player/touch-cursor-64.png create mode 100644 wireframes/index.html create mode 100644 wireframes/libraries/common/components.1.00.css create mode 100644 wireframes/libraries/common/components.js create mode 100644 wireframes/libraries/ios7/components.1.00.css create mode 100644 wireframes/libraries/ios7/components.js create mode 100644 wireframes/readme.txt create mode 100644 wireframes/scripts/player-export.js create mode 100644 wireframes/scripts/plugins/aframe/aframe-gif-shader.protoio.custom.js create mode 100644 wireframes/scripts/plugins/aframe/aframe.protoio.custom.js create mode 100644 wireframes/scripts/plugins/lottie/lottie.min.js create mode 100644 wireframes/scripts/preview-export-min.js create mode 100644 wireframes/stylesheets/player-export.css create mode 100644 wireframes/stylesheets/preview-export-min.css diff --git a/README.md b/README.md index e7d0f5a..a72d15c 100644 --- a/README.md +++ b/README.md @@ -1,51 +1 @@ -# hatch-template-project - replace with your project name - -This template project should be forked by hatch teams. - -This project was developed during [hatchlondon 2017](http://hatchlondon.io). - -## Todo - -Tick items off as you go along. - -- [ ] 1. [Sign up](https://help.github.com/articles/signing-up-for-a-new-github-account/) for a free GitHub account -- [ ] 2. [Fork](https://help.github.com/articles/fork-a-repo/) this project -- [ ] 3. Add your forked repo from `step 2` to this [project](https://github.com/SheCanCodeHQ/hatchlondon-2017-projects) as a [Pull Request](https://help.github.com/articles/about-pull-requests/) - -### Project setup - -From now on it is in your **Forked** repo - -- [ ] 4. At the top of your **repo** add a brief project description & link to where it is hosted. - -![Repo description and link](https://user-images.githubusercontent.com/624760/33160443-57e86a96-d014-11e7-8488-52592fc69a81.png) - -*TIP: [GitHub Pages](https://pages.github.com) gives free static website hosting* - -### README changes (this file) - -- [ ] 5. Change the name at the top of this file on `line 1` -- [ ] 6. Under the name of this project put a brief description of the project `line 3` (this can be more detailed than `step 4`) -- [ ] 7. Fill in your team members in the **TEAM** section below -- [ ] 8. Fill in the **PROBLEM AND SOLUTION** section below -- [ ] 9. Fill in the **INSTALL AND RUN THIS PROJECT** section below -- [ ] 10. Any *digital / paper* notes you make during the hackathon you MUST add to the **Issue** section in your repo - -*TIP: drag and drop [images / photos](https://help.github.com/articles/file-attachments-on-issues-and-pull-requests/)* - -## Team - -Include all members of your team for the hack here: - -* Full Name [github](link to github profile) -* Full Name [github](link to github profile) -* Full Name [github](link to github profile) -* Full Name [github](link to github profile) - -## Problem and Solution - -Describe here which problem you are working on during the event, and what your solution is, succinctly. - -## Install and run this project - -Paste here a link to the project if it is a running website, or some indications on how to use your code for other GitHub users who might be interested. The jury will take a look at what is in this repository during deliberations. +# Medicus diff --git a/app/.gitignore b/app/.gitignore new file mode 100644 index 0000000..839bfe4 --- /dev/null +++ b/app/.gitignore @@ -0,0 +1,3 @@ +node_modules +.expo +*.log \ No newline at end of file diff --git a/app/App.js b/app/App.js new file mode 100644 index 0000000..edca562 --- /dev/null +++ b/app/App.js @@ -0,0 +1,4 @@ +import { createAppContainer } from 'react-navigation' +import RootNavigator from './RootNavigator' + +export default createAppContainer(RootNavigator) diff --git a/app/RootNavigator.js b/app/RootNavigator.js new file mode 100644 index 0000000..5e1e533 --- /dev/null +++ b/app/RootNavigator.js @@ -0,0 +1,21 @@ +import { createStackNavigator } from 'react-navigation' + +import RootView from 'app/views/RootView' +import BookAppointmentView from 'app/views/BookAppointmentView' +import AppointmentBookedView from 'app/views/AppointmentBookedView' + +const RootNavigator = createStackNavigator({ + RootView: { + screen: RootView, + }, + BookAppointmentView: { + screen: BookAppointmentView, + }, + AppointmentBookedView: { + screen: AppointmentBookedView + } +}, { + intialRouteName: 'RootView' +}) + +export default RootNavigator diff --git a/app/app.json b/app/app.json new file mode 100644 index 0000000..4b8022b --- /dev/null +++ b/app/app.json @@ -0,0 +1,27 @@ +{ + "expo": { + "name": "medicus", + "description": "This project is really great.", + "slug": "medicus", + "privacy": "public", + "sdkVersion": "31.0.0", + "platforms": ["ios", "android"], + "version": "1.0.0", + "orientation": "portrait", + "icon": "./assets/icon.png", + "splash": { + "image": "./assets/splash.png", + "resizeMode": "contain", + "backgroundColor": "#ffffff" + }, + "updates": { + "fallbackToCacheTimeout": 0 + }, + "assetBundlePatterns": [ + "**/*" + ], + "ios": { + "supportsTablet": true + } + } +} diff --git a/app/assets/icon.png b/app/assets/icon.png new file mode 100644 index 0000000000000000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e}d(Ab&zlw0CZQ(OD{@-8z1YNxIViS!3J?hDi7 zbCS(&Egp!8nK!<;F$+!EV|0FCG}8Mx^;6`wG>h1;Mf>Vc)R2SDu-#D{4ktry@b6x8 zy*6>-?Y0U+mJ++%BJTTSM680yzr`);hcDynoldT{!{yTDuce|Hq42;a6BAm)y^{O4 zZ`*5FvPw#dL|V(4qe$bh@AmE6y%-FJQ<7ZF%EmVFRC#&1^))Yp+ze5YaoA1cXTyGPX#&>3HB6nX->MYM$h)K-0r$RnHC0%Q9K&_slB74L$BB^f8{bO zlCp9%=L2cerg)cY75CeU9UttziyilGIH`6=V|jJ+j``0UhYMcn2&=iIW9k{p>m==2 z_m)SGh6A0#zL03nvvH?XD+h@74wlD&n<}SHlf#~iU^s2r|31q q{6pHewK;{C+Z#SRjVy&NTMwQJaX3AELI$+lkdwWuT{$)2^uGb76$*O* literal 0 HcmV?d00001 diff --git a/app/assets/splash.png b/app/assets/splash.png new file mode 100644 index 0000000000000000000000000000000000000000..4f9ade699a4dc43aaf3c97ad983115cccd0e0640 GIT binary patch literal 7178 zcmeH~dpy(q`^QJpNTRw+H)SY?VndA0Ij399DT!{$X%4ZCnGhn?O=YPlIiEsKDTj&0 zh?2>WoHn8m8Ai_M-)BoOjF`m(8&^JPzGgp0VACPX~|2_(Rv3678ej2G4y8K5D)nHLE> zvzKAwkj)T+r-t}n;m?dy#9@FsZRun=}eM<<*gK|>r+`h5!+@1JS0zFRf{hQR_H zyD$pAZvqbyi{P4~|<6I@!rM!{4c(fw{ zhquDvyneW7?v5kieBE*05M5oiYbp?Fl%ul;mc1ymNuf|kBdjmM5$lXL($f$J@<2U2 zT#zS~l~qsb!Burn=$}+j&{xq>IH9bgV{j6osHmWza#HCBtA}&;!=SN*AFRuNSi~<` z_JP271C{mAc#lhH7Xv&F1KHd-(&N`!;J?hb#k%}ji^?xq7$645ZtuU^{bLC@L+r<& zhZlJHdHm5>;LPKJ!)*zERtExcsF|Bs>2GXo#KpxeFE8ih@O-)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8a?!Sn+4jX^!=x?*Z)Zt8tqyS;lcC)0wzEo2`*yIrv3 z-edvmO_YdqVtlm{;|rHyhiGo~#6zZKHS742sr_Jh$24Yc zT(81k$?LJMlnrz7t8Odrvg4)3>fml&K<;l!6weO33vDr-+wO66&t%6PCQmFo3}+LTV6d8G_Cklsm! zc4-CeHsYKYX(_gqDZR|2r3wWvmYh~`Y5nY)EW49y_E^x@cuoPDdo&*?O^^1p2^5*_ zrnz#(fUhu<>3Oh5D<~D+Gbe#}|Ks?9aWBw@7yQDZ4vOT>&M8c4@~#01zB6M*Oq0lr z?F7xHrn!@Qrp&mRET&6nX=BFd{{9ZnjtLIV)y$8}z^M1nkbWV0>6jnQUUW(!b^Es} znGuZ|nHLfr%PuQ^7W=0x;CZ$bjrpBL4{`csV&KJ5SeBvL&h#ldykz_dEOSc6p9ntp z31*JQYV%ITFSNw+-5M(f51eQ&u&&mU_~*0DbODIJhVq{CIJ2$IWui&eP#quZkNYy-Kp<10s6_=n*)?_Z9xBZ4pSd@KN*iaol_1H3}vhyyV8A;s!f2f8~Ubm*`yE z!Rkj}lToj(RD8;Bi)$y%JBV%Q%s!A!J7{o>to7kg39IeEjGv#%F!NQIs}QC@XEDoX zB6y;fs22T(l{zIiS3*cWk0?>Tf}Wz85sgELk2JckX9p}Vqt>o5rr%_pCYL*+Spl^`&gyC!UhuCjm<^Q$LQ|9$e1ZV8^Ivvv{YCh zVv5>VX;97!zc<;MF28TT9r*3QZwG!m@LwGW&fECI0mRK)REU(k-^&g)(l^z6deR~M Fe*iU3xyt|m literal 0 HcmV?d00001 diff --git a/app/babel.config.js b/app/babel.config.js new file mode 100644 index 0000000..935fa33 --- /dev/null +++ b/app/babel.config.js @@ -0,0 +1,7 @@ +module.exports = function(api) { + api.cache(true) + return { + "presets": ["babel-preset-expo"] + } +} + diff --git a/app/components/HeaderText.js b/app/components/HeaderText.js new file mode 100644 index 0000000..f9e8311 --- /dev/null +++ b/app/components/HeaderText.js @@ -0,0 +1,18 @@ +import React from 'react' +import { StyleSheet, Text } from 'react-native' + +class HeaderText extends React.Component { + render(){ + return ( + + ) + } +} + +const styles = StyleSheet.create({ + headerText: { + fontSize: 16 + } +}) + +export default HeaderText diff --git a/app/components/NormalText.js b/app/components/NormalText.js new file mode 100644 index 0000000..542ba5f --- /dev/null +++ b/app/components/NormalText.js @@ -0,0 +1,18 @@ +import React from 'react' +import { StyleSheet, Text } from 'react-native' + +class NormalText extends React.Component { + render(){ + return ( + + ) + } +} + +const styles = StyleSheet.create({ + normalText: { + fontSize: 14 + } +}) + +export default NormalText diff --git a/app/components/TimePicker.js b/app/components/TimePicker.js new file mode 100644 index 0000000..958b0a7 --- /dev/null +++ b/app/components/TimePicker.js @@ -0,0 +1,38 @@ +import React from 'react' +import { Picker, StyleSheet } from 'react-native' + +import _ from 'lodash' + +class TimePicker extends React.Component { + render(){ + const { selectedValue, style, onValueChange } = this.props + + const pickerItems = _.fill(Array(18), 0).map((v,i) => { + const hour = Math.floor(i / 2) + if(i % 2 === 0){ + const label = `${_.padStart(hour + 9, 2, 0)}:00hrs` + return + } else { + const label = `${_.padStart(hour + 9, 2, 0)}:30hrs` + return + } + + }) + + return ( + + {pickerItems} + + ) + } +} + +const styles = StyleSheet.create({ + picker: { + } +}) + +export default TimePicker diff --git a/app/package.json b/app/package.json new file mode 100644 index 0000000..6f70a3d --- /dev/null +++ b/app/package.json @@ -0,0 +1,21 @@ +{ + "name": "app", + "main": "node_modules/expo/AppEntry.js", + "private": true, + "scripts": { + "start": "expo start", + "android": "expo start --android", + "ios": "expo start --ios", + "eject": "expo eject" + }, + "dependencies": { + "expo": "^31.0.2", + "lodash": "^4.17.11", + "react": "16.5.0", + "react-native": "https://github.com/expo/react-native/archive/sdk-31.0.0.tar.gz", + "react-navigation": "^3.0.0" + }, + "devDependencies": { + "babel-preset-expo": "^5.0.0" + } +} diff --git a/app/utils/NotificationsManager.js b/app/utils/NotificationsManager.js new file mode 100644 index 0000000..a760615 --- /dev/null +++ b/app/utils/NotificationsManager.js @@ -0,0 +1,56 @@ +import { Notifications } from 'expo' + +import _ from 'lodash' + +const defaultNotif = { + ios: { + sound: true, + }, + android: { + channelId: 'default', + icon: '', + } +} + +const defaultChannel = { + name: 'Clinic Appointments', + sound: true, + priority: 'high', + vibrate: true, + badge: true +} + +const createDefaultChannel = () => { + Notifications.createChannelAndroidAsync('default', defaultChannel) +} + +const scheduleAppointmentConfirmationPN = () => { + const appointmentConfirmationNotif = _.merge({ + title: 'Can you make it?', + body: "Looks like you're still some ways away. Please confirm you can still make your appointment." + }, defaultNotif) + + Notifications.scheduleLocalNotificationAsync(appointmentConfirmationNotif, { + time: (new Date()).getTime() + 3000 + }) +} + +const scheduleAvailableAppointment = () => { + const availableAppointmentNotif = _.merge({ + title: 'Available Appointment @ 0900hrs', + body: 'Snap up this slot now!', + data: { + availableAppointment: true + } + }, defaultNotif) + + Notifications.scheduleLocalNotificationAsync(availableAppointmentNotif, { + time: (new Date()).getTime() + 3000 + }) +} + +export default { + createDefaultChannel, + scheduleAppointmentConfirmationPN, + scheduleAvailableAppointment +} \ No newline at end of file diff --git a/app/views/AppointmentBookedView.js b/app/views/AppointmentBookedView.js new file mode 100644 index 0000000..02c4da3 --- /dev/null +++ b/app/views/AppointmentBookedView.js @@ -0,0 +1,26 @@ +import React from 'react' +import { View, StyleSheet } from 'react-native' + +import HeaderText from 'app/components/HeaderText' + +class AppointmentBookedView extends React.Component { + render(){ + return ( + + Appointment Booked + 1100hrs @ Westminster Clinic + + ) + } +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + backgroundColor: '#fff', + alignItems: 'center', + justifyContent: 'center', + } +}) + +export default AppointmentBookedView diff --git a/app/views/BookAppointmentView.js b/app/views/BookAppointmentView.js new file mode 100644 index 0000000..5477b95 --- /dev/null +++ b/app/views/BookAppointmentView.js @@ -0,0 +1,60 @@ +import React from 'react' +import { View, StyleSheet, Alert, Button } from 'react-native' + +import HeaderText from 'app/components/HeaderText' +import NormalText from 'app/components/NormalText' +import TimePicker from 'app/components/TimePicker' + +class BookAppointmentView extends React.Component { + static navigationOptions = { + title: 'Book an Appointment' + } + constructor(){ + super() + this.state = { + startTime: '09:00hrs', + endTime: '17:00hrs' + } + } + render(){ + const { startTime, endTime } = this.state + return ( + + Westminster Clinic + + Notify me if there are available appointments between: + + + + and + + +