Git Product home page Git Product logo

make-me-move's Introduction

Make Me Move

Make Me Move is a simple app whose sole goal is to, well, make us all move a tiny bit more. If you are like me, you spend a good chunk of your (working) days in front of a screen. And while focus is excellent for getting things done, too much of it makes my neck stiff, my eyes sore and my back too damn arched. Make Me Move is an attempt to remedy or alleviate these negative side effects of this kind of focus.

The app allows you to schedule reminders repeated at regular intervals between certain times of a day. Once the time has come to ”Stretch your neck, it’s getting stiff!”, ”Do your eye gymnastics, matey!” or even ”C’mon! Smile at someone :)”, it shows a notification. That’s it, it can’t do no more, the rest is up to you.

Naturally, it can be used to help you perform any task that requires little effort but needs to be repeated often enough. Maybe, your new resolution is to drink 10 glasses of water a day. Or would you like to learn a new word every other hour? I use to perform reality checks more frequently to improve my chances of lucid dreaming.

Latest packaged versions of the app can be found here for OS X and here for Windows.

Run

Before you can try it out, run the following commands:

# install electron-prebuilt globally
npm i -g electron-prebuilt
# install electron-packager globally
npm i -g electron-packager
# install webpack globally
npm i -g webpack
# install webpack-dev-server globally
npm i -g webpack-dev-server

# install all the necessary local modules specified in `package.json`
npm i

Then, to run in development mode:

# first tab, allowing hot swap
npm run watch
# second tab, the app itself, in development mode
npm run dev

To package the app, run one of the following:

# OS X
npm run pack-mac
# Windows
npm run pack-win
# Linux
npm run pack-linux

Development

The app was created while experimenting with Electron during a competence day at Jayway in May, 2016. Electron is a framework that allows you to create native desktop apps using web technologies. E.g. Atom or Slack are written in it.

Let's have a look at an outline of the framework:

  • You could see it as a version of node.js focused on desktop, rather than a server. Also, it could be seen as minimal Chromium controlled by JavaScript.
  • There are two types of processes - the main and renderer process. The main process has access to native GUI and other resources and APIs. It manages child renderer processes which are created by instantiating BrowserWindow. Each browser window runs in a separate thread and it uses HTML, CSS and JavaScript to build GUI. Typically, you use asynchronous messaging systems, such as ipcMean and ipcRenderer (or alternatively the remote module), to communicate between the two.
  • Electron provides various modules for common tasks related to desktop integrations such as tray, application & context menu, recent documents, network tasks, etc. Notifications are built using the HTML 5 Notification API and Electron then relays such requests via native APIs to the OS.
  • It also offers numerous tools for handling common tasks such automatic updates, crash reporting, auto launching, etc.

I have never written any desktop app in anything other than Java Swing and I remember that being hell. My Electron experience has been incomparably more enjoyable and I would definitely take it into consideration if I were to develop a serious desktop app.

Development environment

The great thing about developing a desktop app using the ubiquitous web stack is that you have all your handy frameworks & tools at your disposal. Make Me Move has been written using React and Webpack.

This makes it relatively easy to set up hot swapping which is, in my opinion, quite rare in the realm of native desktop apps. Check the source to see how it's done.

make-me-move's People

Contributors

albintheander avatar

Watchers

James Cloos avatar

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.