Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
21fcbaa
completed refactoring of CSS
comrww Oct 4, 2016
fc58c06
merge conflict fix
Oct 4, 2016
057db4d
Merge pull request #13 from Incentify/css-refactor
Oct 4, 2016
73f5901
trying to fix font sizes
Oct 5, 2016
b42e55b
fixed merge conflicts
Oct 5, 2016
966e3e0
fixed merge conflicts
Oct 5, 2016
15cf2bd
fixed top branding padding
Oct 5, 2016
cd88b83
code cleanup
Oct 5, 2016
2872fc7
navbar has colors that stay on clicking different tabs
Oct 5, 2016
57fc003
refactoring Dashboard style
Oct 5, 2016
40215c5
commented in a note about the webroot for cordova vs server
Oct 5, 2016
c97e428
removed this component
Oct 5, 2016
cc46183
resized inputs
Oct 5, 2016
d7b261a
reordered components, removed Settings
Oct 5, 2016
afce37a
just commiting to get rid of it, deprecated component
Oct 5, 2016
6f5ef61
capitalizing navbar component
Oct 5, 2016
114b7f6
unfinished commit, commented out styles
Oct 5, 2016
bf44514
un-capitalizing navbar
Oct 5, 2016
61bb10e
indented styles
Oct 5, 2016
a049bfa
viewport meta tag
Oct 5, 2016
e11285f
restorededit and save functionality on input field
Oct 5, 2016
03a2963
fixed all issues with goal component
Oct 5, 2016
6d2c44a
fixed merge conflicts
Oct 5, 2016
4eec133
Merge pull request #16 from Incentify/animations
ReggieSibley Oct 5, 2016
3bb45ee
fixed merge conflict
Oct 6, 2016
ad564cb
fixed merge conflicts
Oct 6, 2016
ab1ffdc
matching brackets in HTML
Oct 6, 2016
500527a
deleting dead CSS code
Oct 6, 2016
12ad503
actually matched all of the HTML brackets this time
Oct 6, 2016
a5ff246
removed big animation
Oct 6, 2016
70ab517
mass commit, fixes and tests mostly
Oct 6, 2016
9c3295e
Merge pull request #17 from Incentify/register-component
Oct 6, 2016
53d49e4
started css styling on the add-goal component
Oct 6, 2016
e8f77c3
implemented sticky header and added spacing so they don't cover up co…
Oct 6, 2016
f47663a
finished goal styling
Oct 7, 2016
f602151
Merge pull request #18 from Incentify/newgoal
Oct 7, 2016
591d90b
button highlight class switch
Oct 7, 2016
5a9fc1e
fixed minor things on the application
Oct 10, 2016
31a6c55
Merge pull request #19 from Incentify/minorFixes
Oct 10, 2016
e1b4085
adding vue-resource
Oct 11, 2016
774458b
added right name for email icon
Oct 12, 2016
28b53ed
added vue-resource
Oct 12, 2016
d630ea5
register working, needs callbacks
Oct 12, 2016
122daa5
basic changes for reggie
Oct 12, 2016
a403b25
added bulma notifications to login
Oct 12, 2016
fff709d
register component working
Oct 12, 2016
491326a
added username field
Oct 13, 2016
ff35485
Merge pull request #20 from Incentify/goalUsername
Oct 13, 2016
85cce02
adding proper icon support after build
Oct 13, 2016
77ca7dc
weird commit issues
Oct 13, 2016
6fc8302
non working commit, commiting so reggie can get code
Oct 18, 2016
a86ce8d
just logging some stuff
Oct 18, 2016
c30990c
squared off edges on header bard
Oct 18, 2016
16fee0b
Merge branch 'dev' of https://github.com/Incentify/client into profil…
Oct 18, 2016
c51ef30
got data for goal component and data bound, still fixing bugs
Oct 18, 2016
569a117
get user data now works
Oct 18, 2016
adbd547
GET method now triggers at the right time
Oct 18, 2016
3efedc1
shorter redirect wait
Oct 18, 2016
5cdcc0d
Merge pull request #21 from Incentify/profilePUT
Oct 18, 2016
783a5e1
fixed issue with opening and cloasing the integrations.
Oct 18, 2016
7d22d5d
Merge branch 'dev' of https://github.com/Incentify/client into goalGET
Oct 18, 2016
84f50d4
fixed card spacing issue
Oct 18, 2016
e3ba076
Merge pull request #22 from Incentify/goalGET
ReggieSibley Oct 19, 2016
de2d006
reduced tap/touch lag on phone deployment
Oct 19, 2016
69e2fcc
fixing weird merge conflict issue
Oct 19, 2016
38f1d77
Merge pull request #23 from Incentify/touchLag
Oct 19, 2016
e67d5f4
changing some placeholders
Oct 19, 2016
5ac94c7
removed the navagation from the registration page
Oct 19, 2016
3ad2f01
Merge pull request #24 from Incentify/register-styling
Oct 19, 2016
fe221f3
got rid of social login vestigials
Oct 19, 2016
51df8fe
fixed merge conflict
Oct 19, 2016
428b602
stripped down register page and fixed merge conflict
Oct 19, 2016
3731d6d
deleted register route and hid nav/header component
Oct 19, 2016
fee9ca7
styled the registration page component
Oct 19, 2016
b33b815
Merge pull request #25 from Incentify/register-component
Oct 19, 2016
c075a41
registration background animation, merge fixes, made the mistake of t…
Oct 20, 2016
abc1336
Merge pull request #26 from Incentify/goalPost
Oct 20, 2016
a283e75
commit for reggie
Oct 20, 2016
b597e9f
completed the registration page completely, may need minor tweaks
Oct 21, 2016
c0f7828
fixed merge conflicts
Oct 21, 2016
9547e34
added login functionality
Oct 21, 2016
7ac52a1
changed webpack information in order to run a build
Oct 21, 2016
6491a04
created a splash screen with proper delay
Oct 22, 2016
4df6d93
adjusted the background image and v-showed the forms for register and…
Oct 22, 2016
f8be1c5
moutain background is moving again. fixed.
Oct 24, 2016
c2daa2c
finished test implementation for stripe integration
Oct 24, 2016
271c00f
almost working goal input
Oct 24, 2016
8417646
merge conflict fix
Oct 24, 2016
2b666cc
Merge pull request #27 from Incentify/goalPost
Oct 24, 2016
34aab68
updating for merge testing
Oct 24, 2016
4c1b7ab
Merge pull request #28 from Incentify/stripeIntegration
Oct 24, 2016
dcc9fbf
non working commit to show props issue
Oct 25, 2016
e90f3aa
switched object name to send register details instead of login
Oct 25, 2016
d0d926c
formatting- indentations
Oct 25, 2016
bbc7896
added passing of props
Oct 25, 2016
3e6e9ea
receving props
Oct 25, 2016
25889c0
adding environment variables
Oct 25, 2016
337e229
adding DEBUG keys to environment files
Oct 25, 2016
a59a8eb
added enviroment variables
Oct 25, 2016
f78980d
commitment on add-goal screen now works
Oct 25, 2016
317c648
Merge pull request #29 from Incentify/goalPost
Oct 25, 2016
0f68ee1
removed redundancy in web copy
Oct 25, 2016
cc3f60d
some progress on integrating Stripe
Oct 26, 2016
601cecd
pushing changes made in order to put commit data, still buggy
Oct 26, 2016
86ca483
more stripe attempts
Oct 26, 2016
6442b58
Merge pull request #30 from Incentify/stripeIntegration
Oct 26, 2016
037f265
getting rid of keep alive
Oct 26, 2016
3f16d29
added styling to the app, and sweetalert
Oct 26, 2016
992a338
fixed merge conflicts
Oct 26, 2016
6ef59b5
Merge pull request #31 from Incentify/appStyling
ReggieSibley Oct 26, 2016
16a7395
unknown what is different
Oct 27, 2016
bc651d0
Merge branch 'dev' of https://github.com/Incentify/client into dev
Oct 27, 2016
ae65806
working commit saving
Oct 27, 2016
abd9be3
merge conflict fix
Oct 27, 2016
f1ceca3
fixed the date to display 1 week from today
Oct 27, 2016
798278f
temp commit to pull
Nov 3, 2016
3fad661
updated README, added comments
Nov 3, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
build/*.js
config/*.js
config/*.js
*
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ dist/
npm-debug.log
selenium-debug.log
test/unit/coverage
test/e2e/reports
test/e2e/reports
31 changes: 18 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,26 @@
# incentify
# Incentify

> Motivation app through financial consequences

By tracking metric based achievement sites (Fitbit/Duolingo), we can interface with their API and let users set a goal (5 miles per week) and a financial incentive ($10). If they fail to meet that weekly goal, they get charged through the Stripe API.

## Technologies used
**NERV Stack**
Back End: Node/Express
Database: RethinkDB
Front End: Vue.js

**APIs**
Stripe
Team Treehouse

**CSS**
Bulma.io
Animate.css

## Build Setup

``` bash
```
# install dependencies
npm install

Expand All @@ -13,15 +29,4 @@ npm run dev

# build for production with minification
npm run build

# run unit tests
npm run unit

# run e2e tests
npm run e2e

# run all tests
npm test
```

For detailed explanation on how things work, checkout the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
2 changes: 1 addition & 1 deletion build/webpack.base.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var projectRoot = path.resolve(__dirname, '../')

module.exports = {
entry: {
app: './src/main.js'
app: ['./src/main.js']
},
output: {
path: config.build.assetsRoot,
Expand Down
4 changes: 3 additions & 1 deletion config/dev.env.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@ var merge = require('webpack-merge')
var prodEnv = require('./prod.env')

module.exports = merge(prodEnv, {
NODE_ENV: '"development"'
DEBUG_MODE: true,
NODE_ENV: '"development"',
API_URL: '"http://localhost:3000"'
})
3 changes: 2 additions & 1 deletion config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ module.exports = {
index: path.resolve(__dirname, '../dist/index.html'),
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPath: '/',
// remove the dot below if you want it for webroot vs cordova
assetsPublicPath: './',
productionSourceMap: true,
// Gzip off by default as many popular static hosts such as
// Surge or Netlify already gzip all static assets for you.
Expand Down
4 changes: 3 additions & 1 deletion config/prod.env.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
module.exports = {
NODE_ENV: '"production"'
DEBUG_MODE: false,
NODE_ENV: '"production"',
API_URL: '"https://incentifyapi.herokuapp.com"'
}
4 changes: 3 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
<head>
<meta charset="utf-8">
<title>Incentify</title>
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<script src="https://checkout.stripe.com/checkout.js"></script>
</head>
<body>
<!-- built files will be auto injected -->
<app></app>
</body>
</html>
</html>
15 changes: 12 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,14 @@
"lint": "eslint --ext .js,.vue src test/unit/specs test/e2e/specs"
},
"dependencies": {
"animate.css": "^3.5.2",
"babel-runtime": "^6.0.0",
"font-awesome": "^4.6.3",
"lodash": "^4.16.4",
"stripe": "^4.12.0",
"sweetalert": "^1.1.3",
"vue": "^1.0.21",
"babel-runtime": "^6.0.0"
"vue-sweetalert": "^0.1.15"
},
"devDependencies": {
"babel-core": "^6.0.0",
Expand All @@ -34,24 +40,27 @@
"eventsource-polyfill": "^0.9.6",
"express": "^4.13.3",
"extract-text-webpack-plugin": "^1.0.1",
"fastclick": "^1.0.6",
"file-loader": "^0.8.4",
"font-awesome": "^4.6.3",
"function-bind": "^1.0.2",
"html-webpack-plugin": "^2.8.1",
"http-proxy-middleware": "^0.12.0",
"json-loader": "^0.5.4",
"less-loader": "^2.2.3",
"node-sass": "^3.10.1",
"ora": "^0.2.0",
"sass-loader": "^4.0.2",
"shelljs": "^0.6.0",
"spectre.css": "^0.1.26",
"style-loader": "^0.13.1",
"url-loader": "^0.5.7",
"vue-hot-reload-api": "^1.2.0",
"vue-html-loader": "^1.0.0",
"vue-loader": "^8.3.0",
"vue-moment": "^2.0.2",
"vue-resource": "^1.0.3",
"vue-router": "^0.7.13",
"vue-style-loader": "^1.0.0",
"vue-touch": "^1.1.0",
"webpack": "^1.12.2",
"webpack-dev-middleware": "^1.4.0",
"webpack-hot-middleware": "^2.6.0",
Expand Down
14 changes: 0 additions & 14 deletions rethinkdb_data/log_file

This file was deleted.

Binary file removed rethinkdb_data/metadata
Binary file not shown.
89 changes: 40 additions & 49 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -1,84 +1,75 @@
<template>
<div id="app">
<div id="app" v-bind:class="{ 'no-margin': $route.path === '/' }">
<!-- route outlet -->
<top-branding></top-branding>
<router-view class="wrapper"></router-view>
<navbar class="navbar-one"></navbar>
<top-branding class="header" v-show="$route.path !== '/'" ></top-branding>
<router-view></router-view>
<navbar class="navbar" v-show="$route.path !== '/'"></navbar>
</div>
</template>

<script>
import navbar from './components/navbar';
import topBranding from './components/top-branding';
import Vue from 'vue';
import auth from './auth/index.js';


// require('spectre.css/dist/spectre.css');
// require('bulma/css/bulma.css');
require('bulma/bulma.sass');
require('font-awesome/css/font-awesome.css');
require('animate.css/animate.css');
require('!style!css!sass!font-awesome/scss/font-awesome.scss');

export default {
components: {
navbar,
topBranding,
},
replace: false,
ready() {
Vue.http.interceptors.push((request, next) => {
var token = auth.getToken()
if(token && !request.headers.has("authorization")){
request.headers.append("authorization", "JWT " + token);
}
next();
});
}
};
</script>

<style>
.navbar-one {
position: fixed;
bottom: 0px;
width: 100%;
body{
font-size: calc(1em + 1vw);
}

body {
align-items: center;
justify-content: center;
padding: 5px !important;
flex-wrap: nowrap !important;
background-color: ghostwhite !important;
.no-margin {
margin: 0 !important;
}

.wrapper {
height: 81vh !important;
width: 100% !important;
.header{
margin-bottom: 4rem;
z-index: 10;
}

.btn-padding {
padding: 10px !important;
font-size: 20px !important;
text-transform: uppercase !important;
height: 150px !important;
.navbar {
position: fixed;
bottom: 0px;
width: 100%;
z-index: 10;
background-color: ghostwhite;
}

.red-nav {
color: red !important;
border-color: red !important;
background-color: white !important;
/* this makes the sticky headers/footers without covering up the content */
#app{
margin-top: 9rem;
margin-bottom: 3.5rem;
}

.red-nav:hover {
background-color: black !important;
color: white !important;
border-color: red !important;
background-color: white;
.is-success {
background-color: #00856d;
}

.red-nav:focus {
background-color: black !important;
color: white !important;
border-color: red !important;
background-color: white;
.is-primary {
background-color: #61cbec;
}

.red-nav:active {
background-color: black !important;
color: white !important;
border-color: white !important;
background-color: white;
}
.lil-marg {
margin-right: 25px !important;
}

</style>
Binary file added src/assets/incentify-logo-square_360.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/incentify.logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/assets/logo.png
Binary file not shown.
Binary file added src/assets/mountain.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/mountain.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions src/auth/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import {router} from '../main'

export default {

// User object will let us check authentication status
user: {
authenticated: false
},

// To log out, we just need to remove the token
logout() {
localStorage.removeItem('token')
this.user.authenticated = false;
state.go('/register');
},

checkAuth() {
var jwt = localStorage.getItem('token')
if(jwt) {
this.user.authenticated = true
state.go('/dashboard')
}
else {
this.user.authenticated = false
state.go('/register')
}
},

getToken() {
return localStorage.getItem('token');
}

}
14 changes: 14 additions & 0 deletions src/auth/interceptor.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import Vue from 'vue';
// import VueResource from 'vue-resource';
import auth from './index.js';

export default{
init(){
Vue.http().interceptors.push((request, next) => {
if(!request.headers["Authorization"]) {
request.headers["Authorization"] = 'Bearer ' + auth.getToken()
}
next()
})
}
}
Loading