Vafilor / TimeTracker

Web App for tracking time

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TimeTracker

Web App for tracking your time. Currently only locally deployable.

Features

  • Use tags on each time entry so you can track multiple records at once
  • Add descriptions in Markdown for Time Entries
  • Keep track of Tasks and their associated time entries
  • Keep track of how often events happen with Timestamps
  • REST api
  • Working on more, see TimeTracker Project

Local Setup

  1. Make sure you have php 8.0 or greater

  2. Install Composer

  3. Install Yarn

  4. Install Symfony Binary

  5. Cd to project root and run

composer install
yarn install
yarn encore dev
php bin/console lexik:jwt:generate-keypair
  1. Set up your database connection in .env. postgresql, mysql, mariadb, sqlite are supported.

  2. Setup database

symfony console doctrine:database:create 
  1. Run migrations
./bin/console doctrine:migrations:migrate
  1. Create your user
./bin/console app:user:create
  1. Start the symfony server
symfony serve

Local Setup with Docker (wip)

  1. Make sure you have php 8.0 or greater

  2. Install Composer

  3. Install Yarn

  4. Install Symfony Binary

  5. Install Docker

  6. Cd to project root and run

composer install
yarn install
yarn encore dev
php bin/console lexik:jwt:generate-keypair
  1. Setup database with docker
docker-compose up -d 
  1. Run migrations
./bin/console doctrine:migrations:migrate
  1. Create your user
./bin/console app:user:create
  1. Start the symfony server
symfony serve

App Concepts

Continue

This will create a new time entry with the same tags.

Resume

This will remove the 'ended' part of the current time entry and resume the timer. This is mostly for "oops" moments when you accidentally stopped a time entry.

Rest API

To get the Auth Token

POST to /api/login_check With headers

  • Content-Type: application/json (required) Body
{
    "username": "email@email.com",
    "password": "password"
}

Note: body says username but it is actually the email

You get

{
  "token": "token..."
}

in response.

Then, provide the token as a header: Authorization: Bearer

As an example, you can get the time entries with

GET /api/time-entry With headers

  • Content-Type: application/json (required)

DateTime

When a field is a DateTime, use the following format in requests

"endedAt": {
    "date": "yyyy-mm-dd",
    "time": "hh:mm:ss"
}

Where hh is 24 hour time.

For example,

"endedAt": {
    "date": "2021-04-16",
    "time": "13:33:01"
}

Will result in: 04/16/2021 01:33:01 PM

Code

Javascript is analyzed using webpack-bundle-analyzer

To check it out, run:

yarn run --silent build --json > stats.json

Then

yarn webpack-bundle-analyzer stats.json public/build

About

Web App for tracking time

License:MIT License


Languages

Language:PHP 65.9%Language:Twig 14.7%Language:TypeScript 12.8%Language:JavaScript 5.4%Language:SCSS 1.2%