bizley / timeclock
Simple Work Time Clock Project
Fund package maintenance!
bizley
Installs: 316
Dependents: 0
Suggesters: 0
Security: 0
Stars: 34
Watchers: 2
Forks: 11
Open Issues: 5
Type:project
pkg:composer/bizley/timeclock
Requires
- php: >=7.1
- ext-mbstring: *
- npm-asset/air-datepicker: ^2.2
- npm-asset/fortawesome--fontawesome-free: ^5.6
- yiisoft/yii2: >=2.0.15.1 <2.1.0
- yiisoft/yii2-bootstrap4: ^2.0
- yiisoft/yii2-swiftmailer: ^2.0
Requires (Dev)
- phpunit/phpunit: >=7.5
- roave/security-advisories: dev-master
- yiisoft/yii2-debug: ^2.0
This package is auto-updated.
Last update: 2025-10-18 21:10:48 UTC
README
Simple work time clocking service built on Yii 2 framework.
Installation
-
Install TimeClock using Composer:
composer create-project --prefer-dist bizley/timeclock timeclock -
Prepare virtual host pointing to
/publicdirectory. -
Prepare configuration for DB of your choice. Place it in
/src/config/db.php. -
Modify the
/src/config/web.phpfile to change:timeZone(defaultUTC),language(defaulten-US;planddetranslations are provided in/src/messages/folder),components > mailerconfiguration to actually send emails (needed for password reset),components > formatterconfiguration of date and time formats,params > company(defaultCompany Name; displayed in footer and other layout places),params > email(defaultemail@company.com; used as the email sender address for emails),params > allowedDomains(default['@company.com']; array with email domains allowed for registration).
-
Change
/public/index.phpfile to setYII_DEBUGmode tofalseandYII_ENVenvironment toprod. -
Apply migrations by running in console
php yii migrate. -
Start webserver and register first account.
-
If you want to make an account to be admin run in console
php yii admin/set IDwhereIDis DB identifier of account to be set (usually first one is1).
Ground rules
- Registering account requires its email address to be in one of the provided domains. If you want to change this behavior
you must prepare your own code. Current implementation is at
/src/models/RegisterForm.phpand/src/views/site/register.php. - Session can be started at any time but it must be ended not overlapping any other ended session.
- There can be many sessions in one day.
- Session can not be longer than midnight.
- Not ended sessions not count for work hours.
- Off-time must not overlap any other off-time period.
- Holidays are automatically fetched from
https://www.kalendarzswiat.plwhich is Polish holiday list. If you want to use something different you must prepare your own code for this. Current implementation is at/src/models/Holiday.php.
Features
- account registration
- password reset
- profile update
- themes
- signing in with login or PIN
- session time with note
- off-time with note
- session and off-time history
- calendar
- holidays
- admin section
- REST API
- Bootstrap 4 layout
New in 2.3.0
- vacations requests
- projects
- sessions time CSV download for admins
- deactivating accounts for admins
Upgrading from 2.2.1 to 2.3.0
- Update all the project files to match the repository.
- Apply migrations by running in console
php yii migrate.
General help
Read TimeClock Wiki first.
For anything related to Yii go to the Yii 2 Guide.
I really don't want to point obvious links with solutions from there.
Usage of this project
You can use this project in whatever way you like as long as you mention where did you get it from.