Giter Club home page Giter Club logo

pushu.ps's Introduction

What is pushu.ps

Pushu.ps is a simple tracking app for your daily pushup workout. It's main purpose was to give me a look on how to build Svelte websites and learn the new thing. The app and the design itself are copyrighted but the source is open for learning purposes.

Created by Łukasz Krysiewicz

Development

To install the app locally you would need Node.js, npm and possibly git. Then you need to clone the repository:

git clone https://github.com/z-x/pushu.ps.git

Next, navigate to the local repository that you've just downloaded

cd x:/pushu.ps

And finally install the whole thing to get all the dependencies:

npm install

Run the development server

To run the dev server you just need to run

npm run dev

It should run the server at http://localhost:5000 by default so you can just type this into your browser navigation bar and you should see the app.

When runing the server this way you are also loading the developement version of the training. This means that it will be a short training with quick breaks between sets. This allows you to test faster.

You can also run the server with the production version of training with

npm run start

The code includes comments for easier understanding if you are looking for any particular solution. I am aware it could be better in places, but please keep in mind that this is just a side project done after hours.

Build the final package

To build the optimized and pure JavaScript package you need to run

npm run build

The output will be placed in public directory.

Production vs Developement

The app knows it should run in production mode when it finds the environment variable NODE_ENV set to production. It runs in developement mode otherwise.

The main difference is that in production mode it uses a real training data while on developement mode it just uses simplified version of training.

Testing

For end to end testing I am using Cypress. The tests are located in cypress/integration/test.js. To run the tests you just need to run

npm run test

Cypress client will open and will let you run tests. Keep in mind that the test.js file is written to test the developement version of the training. It is based on shorter breaks between sets and overall simplified version of the actual training. This is made so the test would finish faster. The prod.js tests just if the production data was loaded and nothing more.

This project uses GitHub Actions to automatically test each new pull request. The tests are runing on Vercel preview deployments.

Tech stack

Where to find what

The master branch is where the current stable release sits. This is the branch that Pushu.ps main website runs.

License

The code and the design files are opened only for learning purposes, please keep in mind that the final app and it’s design are copyrighted.

pushu.ps's People

Contributors

z-x avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pushu.ps's Issues

Timer turns music off

Hi!
Cool small app you created there, thanks!
Bit of a feedback:

iOS 13, iPhone X, PWA mode.
A few days ago I noticed that when the app triggers the timer to start, the music stops for some reason. I suspect your app plays some sound, which makes the system to stop all other sounds.
Also for some reason you cannot leave the app without freezing it (menu won't open, timer would stop, etc.).
So every timer forces me to trigger music again and then reboot the app. Kind of annoying :)

Seems to me working out with music turned on is more important than minor sounds.

The screen dims when user is training and in resting mode

The screen should be active when user is training, but instead it dims and turns of if user doesn't wake it manually by tapping the screen. This can actually freeze the timer and force the user to reload the page.

The solution before was to play a silent hidden video in the background in a loop, but since some iOS update it seem that this solution no longer prevents the screen from dimming.

Current best hope is to wait for Screen Wake Lock API to be implemented in mobile browsers, but this is not going to be anytime soon, especially on iOS. I don't know of any solution that can be implemented right now unfortunately.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.