Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MVP: Manual Sleep Tracking App #53

Open
2 of 10 tasks
nelsonic opened this issue Oct 13, 2021 · 10 comments
Open
2 of 10 tasks

MVP: Manual Sleep Tracking App #53

nelsonic opened this issue Oct 13, 2021 · 10 comments

Comments

@nelsonic
Copy link
Member

nelsonic commented Oct 13, 2021

There are many apps #8 and wearable devices #7 that people can use for sleep-tracking.
The issue is that these have a cost and the people using them have no control of their data.

I want to build the bare minimum interface for capturing/tracking sleep.
At it's most basic, a sleep tracker is just a stop-watch https://github.com/nelsonic/stopwatch
But rather than simply discarding the start and stop times, we record them.

Todo

  • Sketch the most basic interface for capturing data
    • Should be "Dark Mode" by default to minimise LED light from device. i.e. light text on a dark background
    • Should be Mobile First as this is the device most people look at last/first thing.
  • Describe the schema for storing the data including person_id using auth_plug for authentication!
  • Build a Basic Phoenix App to capture start and stop times for sleep
  • Integrate Authentication via auth_plug
  • Add ability to add Comments [Later!]
  • Deploy to Heroku? https://dashboard.heroku.com/apps/sleepdev
  • Start using it to capture my own data!

Dependent on:

My plan is to write this out as a tutorial that a complete beginner can follow similar to all of our others.

@nelsonic
Copy link
Member Author

nelsonic commented Dec 5, 2021

Thinking of just using Google Docs / Draw.io to wireframe this ... see: https://github.com/dwyl/learn-wireframing

@nelsonic
Copy link
Member Author

nelsonic commented Dec 7, 2021

Simon has been implementing auth in the LiveView Chat app:
https://github.com/dwyl/phoenix-liveview-chat-example/pull/16/files

I think we will do it slightly differently in this Sleep App because I don't really want to allow "anonymous" use.
API Key: https://authdev.herokuapp.com/apps/3 🔑

@nelsonic
Copy link
Member Author

nelsonic commented Dec 8, 2021

I feel like my lack of sleep - and crucially my poor sleep communication - is holding me back in life. See: #46
So I'm bumping up the priority on this and moving it to "In progress" so I will chip away at it over the coming weeks.

nelsonic added a commit that referenced this issue Dec 8, 2021
@nelsonic
Copy link
Member Author

nelsonic commented Dec 9, 2021

Can you tell what it is yet? 😜
phoenix-framerwork-welcome-page

@nelsonic nelsonic pinned this issue Dec 9, 2021
@nelsonic
Copy link
Member Author

nelsonic commented Dec 9, 2021

Continue:
~/code/phoenix-liveview-chat-example
~/code/sleep

(have to restart my Mac to install updates ...)

@nelsonic
Copy link
Member Author

nelsonic commented Jan 4, 2022

I'm keen to use our "Prod" Auth instance for this so that there is zero start-up/wait time for using this twice-a-day app.

@nelsonic
Copy link
Member Author

Deployed the "Prod" version to Fly.io https://auth.dwyl.com which means that Auth has zero startup time.
So going to use that to make this mini app.

@nelsonic
Copy link
Member Author

nelsonic added a commit that referenced this issue Mar 14, 2022
nelsonic added a commit that referenced this issue Mar 23, 2022
@nelsonic
Copy link
Member Author

Tried to git push the code I wrote over the weekend as need to close all my non-work tabs to focus on work-work ...
Get the following error:

Enumerating objects: 15, done.
Counting objects: 100% (15/15), done.
Delta compression using up to 8 threads
Compressing objects: 100% (10/10), done.
Writing objects: 100% (11/11), 2.44 KiB | 1.22 MiB/s, done.
Total 11 (delta 3), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (3/3), completed with 2 local objects.
remote: Internal Server Error
To github.com:dwyl/sleep.git
 ! [remote rejected] basic-sleep-app-issue-#53 -> basic-sleep-app-issue-#53 (Internal Server Error)
error: failed to push some refs to 'github.com:dwyl/sleep.git'

From googling, it looks like GitHub is having a hickup:
https://stackoverflow.com/questions/71514374/im-trying-to-git-push-some-changes-and-i-get-this-internal-server-error
isaacs/github#1253
https://www.githubstatus.com/
github-status-1

github-status-2

github-status-3

Just going to close all the windows and hope that my Laptop doesn't die while GitHub is not working ... ⏳

Will continue with this mini side-project on the weekend. 🤞

@nelsonic
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant