-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commitment
- Loading branch information
Daniel Leightley
committed
Nov 29, 2017
1 parent
89b0ad5
commit 5c9c26e
Showing
559 changed files
with
276,169 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Windows image file caches | ||
Thumbs.db | ||
ehthumbs.db | ||
|
||
# Folder config file | ||
Desktop.ini | ||
|
||
# Recycle Bin used on file shares | ||
$RECYCLE.BIN/ | ||
|
||
# Windows Installer files | ||
*.cab | ||
*.msi | ||
*.msm | ||
*.msp | ||
|
||
# Windows shortcuts | ||
*.lnk | ||
|
||
# Logs | ||
*.log | ||
|
||
# Node modules | ||
node_modules | ||
|
||
# Generated files | ||
|
||
|
||
# ========================= | ||
# Operating System Files | ||
# ========================= | ||
|
||
# OSX | ||
# ========================= | ||
|
||
.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
|
||
# Thumbnails | ||
._* | ||
|
||
# Files that might appear in the root of a volume | ||
.DocumentRevisions-V100 | ||
.fseventsd | ||
.Spotlight-V100 | ||
.TemporaryItems | ||
.Trashes | ||
.VolumeIcon.icns | ||
|
||
# Directories potentially created on remote AFP share | ||
.AppleDB | ||
.AppleDesktop | ||
Network Trash Folder | ||
Temporary Items | ||
.apdisk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,85 @@ | ||
# index-app-public | ||
InDEx App Public Release | ||
# InDEx App - Public Release (v1.0.0) | ||
|
||
InDEx is a software package for reporting and monitoring alcohol consumption via a smartphone application. Consumption of alcohol is self-reported by the user, with the app providing a visual representation of drinking behaviour and consumption levels compared to the general population. The app was developed by [Dr Daniel Leightley](https://www.leightley.com) of the [King's Centre for Military Health Research](https://www.kcl.ac.uk/kcmhr/index.aspx) funded by a [Medical Research Council](https://www.mrc.ac.uk/) Grant led by [Dr Laura Goodwin](https://www.liverpool.ac.uk/psychology-health-and-society/staff/laura-goodwin/) and [Professor Nicola Fear](https://kclpure.kcl.ac.uk/portal/nicola.t.fear.html). | ||
|
||
## Table of Contents | ||
|
||
- [License](#license) | ||
- [Publication](#publication) | ||
- [Getting Started](#getting-started) | ||
- [App Preview](#app-preview) | ||
- [Deploying](#deploying) | ||
- [Misc](#misc) | ||
- [-Obfuscate](#obfuscate) | ||
- [-RESTful API](#restful-api) | ||
- [-Other Publications](#other-publications) | ||
- [-Future Work](#future-work) | ||
- [-SVG Images](#svg-images) | ||
|
||
## License | ||
|
||
The InDEx app has been released under [GNU General Public License (v3)](https://www.gnu.org/licenses/gpl-3.0.en.html) license to promote open source app development and sharing of innovation within the research community. Simply, use freely but make your software accessible to others. | ||
|
||
## Publication | ||
|
||
You can cite this software using the following reference: | ||
|
||
``` | ||
Leightley, D., Puddephatt, J., Goodwin, L., Roberto, R., Fear, N. T., (2017). InDEx: Open source iOS and Android software for self-reporting and monitoring of alcohol consumption. Journal of Open Research Software X(X), p.X. DOI: X | ||
``` | ||
NOTE: Manuscript currently under review. | ||
|
||
## Getting Started | ||
|
||
* [Download the installer](https://nodejs.org/) for Node.js. | ||
* Install the ionic CLI globally: `npm install -g ionic` (life saver) | ||
* Clone this repository: `git clone https://github.com/DrDanL/index-app-public.git`. | ||
* Run `npm install` from the project root. | ||
* Run `ionic serve` in a terminal from the project root. | ||
* Enjoy. :beers: | ||
|
||
_Note: You may need to add “sudo” in front of any global commands to install the utilities._ | ||
|
||
## App Preview | ||
|
||
[Try it live](https://drdanl.github.io/index-app-public/www) | ||
|
||
All app preview screenshots were taken by running `ionic serve --l`. | ||
|
||
- Add Drinks Page | ||
|
||
<img src="resources/screenshots/add_drink.png" alt="Add Drinks Page"> | ||
|
||
- Dashboard Page | ||
|
||
<img src="resources/screenshots/dashboard.png" alt="Dashboard"> | ||
|
||
- To see more images of the app, check out the [screenshots directory](https://github.com/DrDanL/index-app-public/tree/master/resources/screenshots)! | ||
|
||
## Deploying | ||
|
||
* PWA - run `npm run ionic:build --prod` and then push the `www` folder to your favorite hosting service | ||
* Android - Run `ionic cordova run android --prod` | ||
* iOS - Run `ionic cordova run ios --prod` | ||
|
||
## Misc. | ||
|
||
### Obfuscate | ||
|
||
Whilst building InDEx with Ionic, it was great to have code separated out into separate files with plenty of white space to increase readability and rapid detection of errors. However, when submitting the application to iOS or Android App Stores it is important that the project source code is obfuscated. Currently this has not been implemented and all code has been separated (see /www/index.html for an example). However, cordovda-uglify is setup for the task. | ||
|
||
### RESTful API | ||
|
||
The InDEx app was built upon a RESTful API service (info graphic [here]( https://www.leightley.com/content/images/2017/02/infographic_mrc_v2.png)). However, due the API being tightly coupled to the King’s Centre for Military Health Research network we have chosen to release the InDEx app as a standalone application. It is very easy to implement a RESTful API within the platform. Future releases of InDEx will also include the backend API. | ||
|
||
### Other Publications | ||
|
||
This section will be updated with references to publications based on the InDEx app. | ||
|
||
### Future Work | ||
|
||
The app is currently under active development for v2.0.0, the codebase is due for release post testing in early 2019. If you are interested in finding out more, before this time, please contact [Dr Daniel Leightley](https://www.leightley.com/contact-daniel/). | ||
|
||
### SVG Images | ||
|
||
All SVG icons have been sourced from [FlatIcon](https://www.flaticon.com/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "InDExApp", | ||
"private": "true", | ||
"devDependencies": { | ||
"ionic": "driftyco/ionic-bower#1.3.2", | ||
"ionic-platform-web-client": "^0.7.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<widget id="com.index-app.alcohol" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> | ||
<name>InDEx</name> | ||
<description> | ||
InDex App - An alcohol intervention for those leaving the Armed Forces | ||
</description> | ||
<author email="dleightley@ieee.org" href="https://index-app.org/"> | ||
Daniel Leightley | ||
</author> | ||
<content src="index.html"/> | ||
<access origin="*"/> | ||
<allow-navigation href="*"/> | ||
<preference name="orientation" value="portrait"/> | ||
<preference name="webviewbounce" value="false"/> | ||
<preference name="UIWebViewBounce" value="false"/> | ||
<preference name="DisallowOverscroll" value="true"/> | ||
<preference name="SplashScreenDelay" value="2000"/> | ||
<preference name="FadeSplashScreenDuration" value="2000"/> | ||
<preference name="android-minSdkVersion" value="16"/> | ||
<preference name="BackupWebStorage" value="none"/> | ||
<preference name="SplashScreen" value="screen"/> | ||
<feature name="StatusBar"> | ||
<param name="ios-package" onload="true" value="CDVStatusBar"/> | ||
</feature> | ||
<plugin name="cordova-plugin-device" spec="~1.1.4"/> | ||
<plugin name="cordova-plugin-console" spec="~1.0.5"/> | ||
<plugin name="cordova-plugin-whitelist" spec="~1.3.1"/> | ||
<plugin name="cordova-plugin-splashscreen" spec="~4.0.1"/> | ||
<plugin name="cordova-plugin-statusbar" spec="~2.2.1"/> | ||
<plugin name="ionic-plugin-keyboard" spec="~2.2.1"/> | ||
<platform name="ios"> | ||
<icon src="resources/ios/icon/icon.png" width="57" height="57"/> | ||
<icon src="resources/ios/icon/icon@2x.png" width="114" height="114"/> | ||
<icon src="resources/ios/icon/icon-40.png" width="40" height="40"/> | ||
<icon src="resources/ios/icon/icon-40@2x.png" width="80" height="80"/> | ||
<icon src="resources/ios/icon/icon-40@3x.png" width="120" height="120"/> | ||
<icon src="resources/ios/icon/icon-50.png" width="50" height="50"/> | ||
<icon src="resources/ios/icon/icon-50@2x.png" width="100" height="100"/> | ||
<icon src="resources/ios/icon/icon-60.png" width="60" height="60"/> | ||
<icon src="resources/ios/icon/icon-60@2x.png" width="120" height="120"/> | ||
<icon src="resources/ios/icon/icon-60@3x.png" width="180" height="180"/> | ||
<icon src="resources/ios/icon/icon-72.png" width="72" height="72"/> | ||
<icon src="resources/ios/icon/icon-72@2x.png" width="144" height="144"/> | ||
<icon src="resources/ios/icon/icon-76.png" width="76" height="76"/> | ||
<icon src="resources/ios/icon/icon-76@2x.png" width="152" height="152"/> | ||
<icon src="resources/ios/icon/icon-83.5@2x.png" width="167" height="167"/> | ||
<icon src="resources/ios/icon/icon-small.png" width="29" height="29"/> | ||
<icon src="resources/ios/icon/icon-small@2x.png" width="58" height="58"/> | ||
<icon src="resources/ios/icon/icon-small@3x.png" width="87" height="87"/> | ||
<splash src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" height="1136"/> | ||
<splash src="resources/ios/splash/Default-667h.png" width="750" height="1334"/> | ||
<splash src="resources/ios/splash/Default-736h.png" width="1242" height="2208"/> | ||
<splash src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" height="2048"/> | ||
<splash src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" height="2732"/> | ||
<splash src="resources/ios/splash/Default-Portrait~ipad.png" width="768" height="1024"/> | ||
<splash src="resources/ios/splash/Default@2x~iphone.png" width="640" height="960"/> | ||
<splash src="resources/ios/splash/Default~iphone.png" width="320" height="480"/> | ||
</platform> | ||
<platform name="android"> | ||
<icon src="resources/android/icon/drawable-ldpi-icon.png" density="ldpi"/> | ||
<icon src="resources/android/icon/drawable-mdpi-icon.png" density="mdpi"/> | ||
<icon src="resources/android/icon/drawable-hdpi-icon.png" density="hdpi"/> | ||
<icon src="resources/android/icon/drawable-xhdpi-icon.png" density="xhdpi"/> | ||
<icon src="resources/android/icon/drawable-xxhdpi-icon.png" density="xxhdpi"/> | ||
<icon src="resources/android/icon/drawable-xxxhdpi-icon.png" density="xxxhdpi"/> | ||
<splash src="resources/android/splash/drawable-port-ldpi-screen.png" density="port-ldpi"/> | ||
<splash src="resources/android/splash/drawable-port-mdpi-screen.png" density="port-mdpi"/> | ||
<splash src="resources/android/splash/drawable-port-hdpi-screen.png" density="port-hdpi"/> | ||
<splash src="resources/android/splash/drawable-port-xhdpi-screen.png" density="port-xhdpi"/> | ||
<splash src="resources/android/splash/drawable-port-xxhdpi-screen.png" density="port-xxhdpi"/> | ||
<splash src="resources/android/splash/drawable-port-xxxhdpi-screen.png" density="port-xxxhdpi"/> | ||
</platform> | ||
<icon src="resources/android/icon/drawable-xhdpi-icon.png"/> | ||
</widget> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
var gulp = require('gulp'); | ||
var gutil = require('gulp-util'); | ||
var bower = require('bower'); | ||
var concat = require('gulp-concat'); | ||
var sass = require('gulp-sass'); | ||
var minifyCss = require('gulp-minify-css'); | ||
var rename = require('gulp-rename'); | ||
var sh = require('shelljs'); | ||
|
||
var paths = { | ||
sass: ['./scss/**/*.scss'] | ||
}; | ||
|
||
gulp.task('serve:before', ['sass', 'watch']); | ||
gulp.task('default', ['sass']); | ||
|
||
gulp.task('sass', function(done) { | ||
gulp.src('./scss/ionic.app.scss') | ||
.pipe(sass()) | ||
.on('error', sass.logError) | ||
.pipe(gulp.dest('./www/css/')) | ||
.pipe(minifyCss({ | ||
keepSpecialComments: 0 | ||
})) | ||
.pipe(rename({ extname: '.min.css' })) | ||
.pipe(gulp.dest('./www/css/')) | ||
.on('end', done); | ||
}); | ||
|
||
gulp.task('watch', ['sass'], function() { | ||
gulp.watch(paths.sass, ['sass']); | ||
}); | ||
|
||
gulp.task('install', ['git-check'], function() { | ||
return bower.commands.install() | ||
.on('log', function(data) { | ||
gutil.log('bower', gutil.colors.cyan(data.id), data.message); | ||
}); | ||
}); | ||
|
||
gulp.task('git-check', function(done) { | ||
if (!sh.which('git')) { | ||
console.log( | ||
' ' + gutil.colors.red('Git is not installed.'), | ||
'\n Git, the version control system, is required to download Ionic.', | ||
'\n Download git here:', gutil.colors.cyan('http://git-scm.com/downloads') + '.', | ||
'\n Once git is installed, run \'' + gutil.colors.cyan('gulp install') + '\' again.' | ||
); | ||
process.exit(1); | ||
} | ||
done(); | ||
}); |
Oops, something went wrong.