health's Issues
Redesign the dashboard
Redesign the dashboard to show a preview of the selected date, and make the scorecard and checklist list views unnecessary. (See figma sketches)
Fix Redux issues
Improve Redux usage and fix caching between users.
Include top selected task stats in reports
Might be interesting to know which tasks are most commonly accomplished.
Incorporate "Self-Activation" Methods into a feature
See https://github.com/reichert621/blog/wiki/Feeling-Good for reference
It would be nice to have this be more interactive, e.g. asking the user what's preventing them from being happy or productive at the moment, and then guiding them to the appropriate "self-activating" technique.
Include top selected checklist stats in reports
Might be interesting to know which issues are most common.
Create alternative UI for check-in
Show one question at a time, allow sliding right and left (next and previous), and allow keyboard shortcuts to answer questions (0, 1, 2, 3, 4).
Improve design of checklist
Improve the radio button selection, formatting, etc.
Create simple UI to manage user tasks
Allow users to customize their tasks and categories.
Persist selected dashboard date in url query string
Right now if a user clicks into a date and then navigates back to the dashboard, it resets to today's date. It would be better if the previously selected date persisted.
Update reporting chart on dashboard UI
Minor design updates to chart, create toggle to hide/show list vs chart.
Set up React Native client
Just set up some UI components to get the ball rolling.
- Home screen (dashboard)
- Scorecard
- Check-in
Add simple sign-up flow
Just focus on allowing the creation of new users with some simple validations.
Create a README
Rough draft:
Getting started
Install dependencies
- Install Node v8.x and npm v5.x if you haven't already (nvm or n are create tools for this)
- Next, install the dependencies from
package.json
with$ npm install
- To keep things easy, install a few global dependencies:
$ npm install -g webpack knex
Set up a local Postgres database
- Install Postgres if you haven't already (see Installing Postgres via Brew)
- Optional: Install a Postgres client (see Postico or PSequel)
- Create a database (this will be your
$BLOG_DB_NAME
environment variable)- Or in SQL, with
psql -c CREATE DATABASE [insert_dev_db_name_here];
- This can either be done with
createdb [insert_dev_db_name_here]
- Or in SQL, with
- Optional: Test your database credentials by connecting to the newly created database in your Postgres client
- Using these credentials, add your database environment variables to your
~/.bash_profile
, or wherever you store them. This is required for theknexfile.js
- Set your
$NODE_ENV
environment variable todev
, so that theknexfile
knows which configuration to use
For reference, my local environment variables look like this in my ~/.bash_profile
file:
# Node environment
export NODE_ENV='dev'
# DB credentials
export BLOG_DB_PORT=5432
export BLOG_DB_HOST='localhost'
export BLOG_DB_NAME='blog' # this should match the db you created above
export BLOG_DB_USER=''
export BLOG_DB_PW=''
Run the app
Migrate the database, build the client, and run the server:
$ npm start
which is the same as:
$ npm run db:migrate # Ensures the db is up to date with latest migrations
$ npm run build:react # Builds the React client
$ node server/javascript/index.js # Runs the Node/Express server
Go to localhost:8000
(or whatever $PORT
you set) to check that the app is running.
Development
The current focus of this project is in the server/javascript
directory for the API, and the client/react
directory for the client.
To simply start the server, run:
$ npm run dev
(TODO: set up nodemon
or something similar to prevent the need to restart the server manually to make changes go into effect)
This will serve the contents of the client/react/build
directory, which are built with Webpack.
To run Webpack in --watch
mode, run:
$ npm run react:watch
And that should be it! Happy hacking ๐ค
Migrate React app to TypeScript
A few of the helper files are in TS, but it would be nice to move everything in the React directory to TS.
Write more APIs for reporting stats
Some ideas:
- Average scorecard/depression score on each day of the week
- Depression score distributions (i.e. how many scores occur in each range)
- Top tasks on days with lowest depression scores
- Total points/accomplishments per task category
- Anything else?
Indicate when the scorecard is saving/saved
Right now it's not super obvious that checking off a task on the scorecard persists as complete, so make it more explicit that the scorecard is updated after checking a task.
Screenshot (see https://www.figma.com/file/SnjKtER4cGfDNaRpRsgL8x2X/Scorecard):
Refactor Express API file into controllers
Right now all the API handlers are all in one file. Time to split these up into appropriate controller files.
Toggling a task on an existing scorecard should auto-save
Prevent the need to click "submit" to save an updated scorecard if some tasks are toggled.
Add indexes to db
Add indexes to the database to improve queries.
Allow users to remove/deactivate tasks
People may not want all of the default tasks in their scorecards, so let them "deactivate" the ones they don't want to show up.
Fix date/timezone inconsistency with db
For some reason there is not always consistency between the date in the db and in the client. Seems like it's probably a timezone issue, or potentially related to the moment
library.
Create default tasks for new users
When a new user signs up, automatically create a list of default tasks and categories to make it easier to get started.
Allow blog entries to be private vs public
Logs should be private by default, but allow users to "publish" them so others can see their public posts.
Create non-editable view of submitted checklist
Right now the checklist only has a view for "new" and for "editing," but we need a view that simply displays the results nicely.
Add daily log feature
In additional to the daily check-in and task list, add the ability to write a little bit about each day.
Make it easier to access today's scorecard from the dashboard
Do we want to include it on the dashboard? Or just an easy link to it? Maybe a modal? Or some UI that slides out? Need to figure all this out.
Calculate earnings in reporting dashboard
Based on streaks and number of non-zero days, determine how much a user has earned based on their membership type (default to "Pro" for now).
Pricing might look something like this:
- Free
- Free
- $0.1 per day, $0.3 week bonus, $1 max per week ($52 max per year)
- $2 month bonus ($24 max per year)
- $4 3-month bonus
- $8 6-month bonus
- $12 year bonus (max $100 for the year)
- Standard
- $30 per year cost
- $0.5 per day, $1.5 week bonus, $5 max per week ($260 max per year)
- $10 month bonus ($120 max per year)
- $20 3-month bonus
- $40 6-month bonus
- $60 year bonus (max $500 for the year)
- Pro
- $50 per year cost
- $1 per day, $3 week bonus, $10 max per week ($520 max per year)
- $20 month bonus ($240 max per year)
- $40 3-month bonus
- $80 6-month bonus
- $120 year bonus (max $1000 for the year)
Auto-create scorecards and checklists
When a date is selected with no scorecard or checklist, auto-create these (instead of requiring filling out the entire form and submitting)
Improve state management with Redux
...or any other tool.
Add eslint/tslint
There are a bunch of minor errors that could be cause more easily with a linter.
Add unit testing for the JS API
Just set up some very basic tests so we can start running them!
Add Daily Dos and Don'ts
This was a great idea from Joe to compile a list of things to do and not to do on a daily basis (reference).
Perhaps in the future could include daily reminders of these lists?
Allow creation and editing of user tasks
Let users customize their tasks if they want.
Fix the `updateSelectedTasks` API
Right now the update will not remove deselected tasks, and will create duplicate entries if updated multiple times.
See https://github.com/reichert621/blog/blob/master/server/javascript/db/models/scorecard.js#L107-L122
Improve design of scorecard
Customize radio/checkbox inputs, make layout nicer, figure out how to display points in a more elegant way, etc.
Add descriptions to checklist answers
Make it more obvious what the answers mean, e.g 0 = disagree, 1 = somewhat agree, etc.
Add unit testing for the React client
Just set up some very basic tests so we can start running them!
Create a simple navbar
Create a navbar to:
- contain the page title
- allow navigation back to the dashboard
- log out
Allow date-range selection for reports
This is low priority until we have more data.
Remove unnecessary project directories
i.e remove the other project parts, etc
Improve webpack config for production
I think production currently uses the same build steps as dev, which is not ideal.
Prevent creating scorecard/checklist with date in the future
The max date should be today's date.
Include more details on checklists/scorecards list views
Right now these list views only show the dates of submitted checklists/scorecards. Might be nice to include the total points per date, and maybe a preview of some other details?
Customize checkbox input design
Customize the designs of these inputs to avoid using the browser defaults.
Brainstorm some ways to gamify the app
Ideas:
- Leveling up
- "Growing"
- Starting as a sapling, growing into a tree
- Starting as an empty field, filling it with plants, animals, home, etc, where each item represents a different accomplishment (e.g. "home" grows with social life, "plants" grow with reading, "sun" shines more brightly with meditation)
- Small cash prizes for meeting certain goals, or checking in a certain number of days in a row
- $1 per day that user checks in and has non-zero day
- Bonus at end of week if user checks in every day of the week
- Bonus at end of month if user checks in every day of the month
- Bonus at end of year?
- What else?
Show more stats in dashboard
(Alternatively, just create an entirely separate view for analytics)
Possible stats to show:
- Latest productivity streak
- Latest check-in streak
- Total tasks completed to date
- Total points scored to date
- Anything else?
Stats for reporting:
- Average scorecard/depression score on each day of the week
- Depression score distributions (i.e. how many scores occur in each range)
- Top tasks on days with lowest depression scores
- Total points/accomplishments per task category
- What else?
Fix empty state for reporting
Right now a lot of the UI breaks for new users with no data.
Write API for top selected tasks
Required for #9
Redirect to login page if user is not authenticated
Right now if a user tries to view their dashboard but isn't authenticated, we show a dashboard with no data. Instead, the user should be redirected to the login page.
Create an "About" page
Include:
- The inspiration for the app
- How the app is meant to be used
- Credit to "Feeling Good" book for the Depression Checklist
- (Optional) FAQ
TODO:
- Write page content in markdown in this issue
- Create simple React component with the static content
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.