Hypnotoads is a social workout tracker intended to let users to share their progress, learn from others, and find support in a safe, health-oriented environment.
Feel free to fork hypnotoads and work on it. If you're going to make a pull request, make it early (before you've completed too much work) and start a conversation with us. We'd love to hear about what you're planning, tell you how we feel about it and work with you if it excites us.
Please follow the style guide (STYLE-GUIDE.md) when writing code that will be submitted in a pull request.
The application uses Node.js, jwt-simple, Express.js, Sequelize.js, Postgres, Angular.js, Bootstrap, D3.js, Moment.js.
Node server uses Express.js and Sequelize.js with Postgres for the database. Uses ES6 syntax.
app.js - initialization for server
Routes.js - all server-side routing (Express)
Utils.js - checkUser function that decodes & attaches user to request (jwt)
Empty, unused directory. Should be removed.
controllers/index.js - contains all of the methods used by routes.js to:
- Create users
- Log in users
- Add workouts
- Retrieve all workouts
- Retrieve a user’s workouts
- Delete a workout
db/index.js - tables, relationships, and db initialization for PostgreSQL db via Sequelize
Uses ngRouter to provide client-side routing. Contains controller and factories related to authentication (adding users, checking users, tokens, sessions, etc).
Provides template for all application views, which contains navigation bar and dependency script tags.
Includes /signin/signin.html and /signup/signup.html. Corresponding controllers and factories can be accessed in app.js.
/feed/feed.html displays the workout schedule for each user. This view uses the controller in post/postWorkout.js.
/post/postWorkout.html allows the user to add workouts to their schedule. /post/postWorkout.js contains the corresponding controller and factory. It references $http functions that are stored in /services/services.js.
/profile/profile.html provides the workouts of the logged in user, displayed in both a list and a graph visualization. The corresponding functions are found in profile/profile.js. It references $http functions that are stored in /services/services.js.
This Angular factory contains the $http functions that interact with the server endpoints, allowing the client-side code to have access to and post to the database.
/styles/styles.css contains the CSS styling for the application. It uses a combination of pure CSS and Bootstrap.
/testdata/new.json contains placeholder data that can be used to run the profile.html page.
Esther Oh
https://github.com/ohesoh
Anna Zhao
https://github.com/annatangzhao
Jeff Bernstein
https://github.com/jeff-bernstein
Jonathan Hawley-Peters
https://github.com/jonathanhawleypeters
Copyright (c) 2016, Hypnotoads
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.