FitLit - Part One!
Goals and Objectives
- Use object and array prototype methods to perform data manipulation.
- Create a user interface that is easy to use and displays information in a clear way.
- Write DRY, reusable code that follows SRP and trends toward function purity
- Implement a robust testing suite using TDD.
- Make network requests to retrieve data.
- Collaborate productively and professionally as a team. Ensure all team members are able to be heard and contribute throughout the project.
In this project, you will be given data from an activity tracker for many users over many days. Think of something like Fitbit or Strava. Activity devices log data and present it on a dashboard for their users. Your goal is to present a useful dashboard for a user to view and see their latest activity data, goals, and milestones.
Note
The image above is not a comp. We expect you to design your own dashboard layout that is relevant to the data that was logged or calculated for a user or group of users. Use inspiration from Fitbit and other fitness/activity apps, but do not copy an app directly.
Find 3 inspirations from 3 different apps that you want to use to guide the user interface of your application. (Google image search is great for finding inspiration as well as a site called Dribbble).
Be specific about what piece you are trying to re-create. What specifically do you want to replicate from this site? (i.e. layout, color palette, flat design, font, etc)
Timeline and Deliverables
Dates and deadlines to be aware of:
Monday Week 2 - Submit the following to your PM BEFORE beginning to write code via Slack:
- DTR - some things to highlight:
- Individual learning goals
- Schedules
- Communication expectations
- When you will do a quick 15-minute daily check-in as a whole group
- Project board (this should be kept updated throughout the project and will be reviewed by PM in check-ins).
- 3 design inspirations (Please include links and details on what you’re trying to re-create).
- Wireframes (a rough sketch of your website for planning - pen and paper is perfectly fine for this)
Monday, Week 3 - Project due at 9PM.
- Submit part one of your project here
Working with Webpack
This project is set up to use Webpack, a module bundler. It will take whatever code we write, and bundle it into a series of more efficient files that the browser can read (allowing us to use things like Sass, npm packages and ES6 import
/ export
syntax).
This video provides a nice overview of some things webpack lets us do out of the box, most of which is set up for you already.
This article provides some more detail into how Webpack works, and what the webpack.config.js
file is doing (don’t mess with this file unless you’re sure you need to – feel free to ask before you change things).
Notes on Webpack
Requirements
Initial Setup
For this project, you need to use this FitLit Starter Kit repo. Follow the instructions in the README for forking the repo and getting it set up. Once you have it set up, follow the instructions to verify it is set up correctly.
Testing Setup
There is some boilerplate for testing in the starter-kit repo. You will need to set up the rest of the tests yourself. If you have run npm install
in the setup instructions, then the tooling you need to start testing is already installed (mocha
and chai
). Refer to the testing lesson from week 1 as a guide to get started as well as the mocha and chai documentation pages.
Project Iterations
Each iteration has a “Data” section and “Dashboard” section. Data deals with using the data to calculate something meaningful for the user. The Dashboard section deals with what to display on the page.
Don’t get too caught up with polishing your dashboard too early. You’ll want to focus your energies first on calculation functions, and then move on to the dashboard display. Establish some kind of minimum viable product (MVP) for your dashboard look, and then polish from there.
Note About Dates
For this dataset, when “today” is referenced in iterations, it is the last date in the data. The latest week is the most recent 7 days in the data (even if they aren’t consecutive).
You should not be hardcoding the date. You should be using code to find the last (most recent) date in the dataset for the current user, using that date as “today”, and displaying data based on that date. Note that different users may have a different date as their most recent date - once you are dynamically pulling this date from the data, it shouldn’t matter that it changes for different users.
Third-Party Libraries
Please get instructor approval first before using additional third-party libraries. You may use Day.js to help with manipulating / formatting dates if you find it necessary. You may also use Chart.js in order to help with displaying some data. (Note: Learning a new technology does take extra time. Plan ahead and maybe do a research spike over the first weekend, before deciding to use it.)
- You are not required to use any 3rd party libraries
Iteration 1 - Get Familiar with the Data and Users
User Data
User Stories (Dashboard)
Iteration 2 - Hydration
Hydration Data
User Stories (Dashboard)
Iteration 3 - Fetch Calls
Iteration 4 - Sleep
Sleep Data
User Stories (Dashboard)
Iteration 5 - Activity
Activity Data
Dashboard
Extension Options
Testing
You should NOT use the original data files in the data
directory for testing. These are big files to begin with, and a real-world dataset would have millions of records. That’s far too big to use every time you want to run a test.
Instead, for your tests, you should create small, sample datasets that match the structure of the application data. By creating this sample dataset, you will also know if your functions are working correctly because you can do the calculations by hand with a much smaller dataset.
You are expected to:
- Build a robust testing suite. This might include testing pure functions in your
scripts.js
.
Remember to test all possible outcomes (happy/sad/etc). Ask yourself:
- Does the function return anything?
- Are there different possible outcomes to test based on different arguments being passed in?
You are not expected to test:
- DOM manipulation / DOM manipulating functions (like
document.querySelector(...)
) - Fetch calls
Minimum Collaboration and Professionalism Expectations
- Team holds daily standups throughout project.
- Commits are atomic and frequent, effectively documenting the evolution/progression of the application. There is no more than a 10% disparity in project contributions between teammates.
- A project board is utilized (and updated throughout the project) with Github issues and labels.
- Team uses branches, PRs and thorough code reviews to add new code to the main branch.
- The README is formatted well and at a minimum contains:
- Overview of project and goals
- Overview of technologies used, challenges, wins, and any other reflections
- Screenshots/gifs of your app
- List of contributors
- Team collaborates effectively to accomplish the shared goal. Team productively and professionally works through challenges and conflicts to ensure all team members are able to be heard and contribute throughout the project.
- Instructors are available to offer support and guidance but conversations around what is and what is not working are expected to be led by the team members themselves.
Daily Check-Ins
Every work day, your group should do a check-in as a whole group, preferably live over Zoom, and discuss at least these things:
- What is the state of the project so far? (update your GitHub project board if necessary)
- What is each person working on today?
- Are there any blockers, and what is your plan to get through the blocker?
Your daily check-in (sometimes called “stand-ups”) schedule should be outline in your DTR so the whole group is aware of the meeting.
Rubric
For the rubric sections below, you will be scored as Wow, Yes or Not Yet depending on whether you have demonstrated competency in that area. Each section lists examples of what types of things we may be looking for as demonstrations of competency. Just as there are many ways to approach code, there are many many ways to demonstate competency. These are just some examples.
Functional Expectations
JavaScript & Style / Functional Programming / Fetch
Test-Driven Development
User Interface
Collaboration and Professionalism
- See “Minimum Collaboration and Professionalism Expectations” above.
- While this is not a scored rubric section, every team member is expected to fully participate, contribute, communicate and collaborate with the team throughout the entirety of this project. Failure to do so can result in an individual failing the project, even if the group/project is otherwise passing.