Skip to content

Pomi is a web application designed for tracking time spent using a timeboxing methodology (e.g. Pomodoro Technique™).

Notifications You must be signed in to change notification settings

pawelgrimm/pomi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pomi

Content:

About

Pomi is a work-in-progress web application designed for tracking time spent using a timeboxing methodology (e.g. Pomodoro Technique™).

See the Documentation section for in-depth functional and technical specifications, or check out the Functionality and Technologies sections for a quick summary.

It's not recommended since the app is not yet released, but if you'd like to build and run the app locally, see the Instructions section.

Key Functionality

  • Web client
  • Configurable timer
  • Logging work sessions to database
  • Searching for tasks and projects and linking them to work sessions
  • Creating and editing projects and tasks
  • Viewing and filtering logged sessions
  • User authentication
  • Native notifications

Technologies Used

  • React (front-end library)
  • HTML5/JSX and CSS3 (front-end layout and styling)
  • Material UI (UI library)
  • Redux (client state management)
  • Firebase Authentication (OAuth 2.0 authentication solution)
  • TypeScript (JavaScript superset with static typing for client and server code)
  • Node.js (back-end JavaScript runtime)
  • Express.js (HTTP server framework)
  • PostgreSQL (SQL database)
  • Jest, React Testing Library (testing frameworks)
  • Webpack (module bundler)

Documentation

Instructions

NOTE: No guarantees provided - this application may fail to build during this pre-release stage.

To install

  1. Install Node.js, Yarn, and PostgreSQL

  2. Clone the repository:

    $ git clone https://github.com/pawelgrimm/pomi.git
    
  3. Set up PostgreSQL (see tutorial or blog for help)

    • Connect to the default database (called postgres):

      $ psql
      
    • Create a new user:

      postgres=# CREATE ROLE pomi WITH LOGIN PASSWORD 'root';
      
    • Create a new database called pomi_dev, owned by the pomi user:

      postgres=# CREATE DATABASE pomi_example WITH OWNER = pomi;
      
    • Quit psql:

      postgres=# \q
      
    • Connect to the new database:

      $ psql pomi_dev
      
    • Enable the pgcrypto extension:

      pomi_dev=# CREATE EXTENSION pgcrypto;
      
    • Quit psql:

      postgres=# \q
      
  4. Set up the config file

    • Create a file called src/server/config/.env.development

    • Edit it as follows:

      DATABASE_URL=postgresql://pomi:root@localhost:5432/pomi_dev
      PORT=3001
      
  5. Provision a new Firebase Authentication application, download the service account key, name them firebaseServiceAccountKey.json, and move to src/server/config/

  6. Install dependencies:

    $ yarn install
    
  7. Migrate the database:

    $ yarn reset-dev-db
    
  8. Start the app in development mode:

    $ yarn develop
    

To run tests

  1. Set up a new database called pomi_test owned by the pomi user (don't forget connect to the new database: $ psql pomi_test and enable the pgcrypto extension pomi_test# CREATE EXTENSION pgcrypto;)

  2. Set up the config file:

    • Create a file called src/server/config/.env.test

    • Edit it as follows:

      DATABASE_URL=postgresql://pomi:root@localhost:5432/pomi_test
      PORT=3001
      
  3. Run all tests:

    $ yarn test
    

    or run client tests:

    $ yarn test:client
    

    or run server tests:

    $ yarn test:server
    

    or run shared tests:

    $ yarn test:shared
    

To build and run production

  1. Set up a new database called pomi_prd owned by the pomi user (don't forget connect to the new database: $ psql pomi_prd and enable the pgcrypto extension pomi_prd=# CREATE EXTENSION pgcrypto;)

  2. Set up the config file:

    • Create a file called src/server/config/.env.production

    • Edit it as follows:

      DATABASE_URL=postgresql://pomi:root@localhost:5432/pomi_prd
      PORT=3001
      
  3. Build the app:

    $ yarn build
    
  4. Migrate the database:

    $ yarn migrate-db prd
    
  5. Serve the app:

    $ yarn start
    

Other useful scripts

  • Generate a new component (with tests) or database model (with queries, routes, validation, and tests):

    $ yarn generate {component|model}
    
  • Migrate a database to a given version:

    $ yarn migrate-db {dev|test|prd} {version}
    
  • Reset the dev by dropping all contents and running migrations up to highest version:

    $ yarn reset-dev-db
    

    or do the same for the test database:

    $ yarn reset-test-db
    
  • Kill the Node.js server (if it misbehaved and didn't exit gracefully):

    $ yarn killnode
    

About

Pomi is a web application designed for tracking time spent using a timeboxing methodology (e.g. Pomodoro Technique™).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published