Skip to content

A PHP-based timesheet tracker with project management, tagging, and reporting features. Built with Twig and MySQL, Tasky offers a responsive UI with light/dark theme support.

License

Notifications You must be signed in to change notification settings

ItsMeStevieG/tasky

Repository files navigation

Tasky - Timesheet Tracker

Tasky Logo

Tasky is a web-based timesheet tracking application built with PHP, MySQL, and Bootstrap 5.3.3, inspired by tools like Clockify. It allows users to track work hours, manage projects, tags, and users, update their profiles, and generate reports, with support for light and dark themes.

Table of Contents

Features

  • User Authentication: Secure login with CSRF protection.
  • User Management: Admins can add, edit, and delete users (username, password, full name, admin status).
  • Profile Management: Users can update their full name, password, and profile picture with cropping support.
  • Time Tracking: Start/stop timer to log work hours, with manual entry support.
  • Project Management: Add and list projects with client details.
  • Tag Management: Categorize entries with custom tags.
  • CRUD Operations: Create, read, update, and delete timesheet entries.
  • Comments: Discuss work with comment threads on each timesheet entry.
  • Board View: Visualize entries on a simple Kanban board with status updates.
  • Reporting: Generate reports of total hours by project with date range filtering.
  • Theme Support: Toggle between light and dark modes (available on login page and all authenticated pages) with persistent user preference.
  • Responsive Design: Built with Bootstrap 5.3.3 for a mobile-friendly UI.
  • Error Logging: Custom error handler logs to logs/php_errors.log for debugging.

For a concise reference of these features, see docs/FEATURES.md.

For a concise reference of these features, see docs/FEATURES.md.

Screenshots

Login Page with Theme Toggle

Login Page

Dashboard with Timer

Dashboard

User Management

User Management

Profile Page with Cropping

Profile Page

Reports

Reports

Installation

Prerequisites

  • PHP 7.4+ with PDO MySQL extension
  • MySQL 5.7+
  • Web Server (e.g., Apache via XAMPP, WAMP, or MAMP)
  • Composer (PHP dependency manager) Download

Steps

  1. Clone the Repository:

    git clone https://github.com/itsmestevieg/tasky.git
    cd tasky
  2. Install Dependencies:

  • Run Composer to install Twig:
    composer install
  1. Set Up the Database:
  • Set up your database by importing the schema from database.sql.
    • Note: The default admin password (passsword) is hashed in database.sql.
  1. Configure Database Connection:
  • Update config.php with your MySQL credentials:
    <?php
    try {
       $pdo = new PDO("mysql:host=localhost;dbname=tasky_db", "root", "");
       $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
    } catch (PDOException $e) {
       die("Connection failed: " . $e->getMessage());
    }
  1. Set Up File Permissions:
  • Ensure the logs/ and uploads/ directories exist and are writable:
    mkdir logs uploads
    chmod 777 logs uploads
  • On Windows, ensure the directories are writable by the web server user (e.g., via File Explorer > Properties > Security).
  1. Run the Application:
  • Place the project in your web server’s root directory (e.g., C:\xampp\htdocs\tasky).
  • Start your web server and MySQL (e.g., via XAMPP).
  • Access the app at http://localhost/tasky/index.php.

Usage

  1. Log in:
  • Use the default admin credentials:
    • Username: admin
    • Password: passsword
  1. Toggle Theme:
  • Use the theme toggle button (sun/moon icon) in the navbar to switch between light and dark modes, available even on the login page.
  1. Track Time:
  • On the dashboard, select a project, start the timer, and save your entry.
  • Add a description, tag, and mark as billable if needed.
  1. Manage Projects and Tags:
  • Navigate to "Projects" to add new projects.
  • Navigate to "Tags" to add custom tags for categorizing entries.
  1. Edit/Delete Entries:
  • From the dashboard, click "Edit" or "Delete" on any timesheet entry.
  1. Manage Users (Admins Only):
  • Go to "Users" to add, edit, or delete users.
  • Set admin status for users as needed.
  1. Update Profile:
  • Click your name in the navbar to go to your profile.
  • Update your full name, password, and profile picture (with cropping support).
  1. Generate Reports:
  • Go to "Reports" to view total hours by project within a date range.

Project Structure

tasky/
├── app/
│   ├── Auth.php
│   ├── Project.php
│   ├── Tag.php
│   ├── Timesheet.php
│   ├── Report.php
│   └── User.php
├── logs/
│   └── php_errors.log
├── uploads/
├── templates/
│   ├── pages/
│   │   ├── login.twig
│   │   ├── dashboard.twig
│   │   ├── projects.twig
│   │   ├── tags.twig
│   │   ├── edit_entry.twig
│   │   ├── reports.twig
│   │   ├── users.twig
│   │   ├── edit_user.twig
│   │   └── profile.twig
│   ├── partials/
│   │   └── headscripts.twig
│   └── base.twig
├── vendor/
├── composer.json
├── composer.lock
├── config.php
└── index.php

Contributing

Contributions are welcome! To contribute:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/your-feature).
  3. Make your changes and commit (git commit -m "Add your feature").
  4. Push to your branch (git push origin feature/your-feature).
  5. Open a Pull Request.

Please ensure your code follows PSR-4 standards and includes appropriate tests.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

A PHP-based timesheet tracker with project management, tagging, and reporting features. Built with Twig and MySQL, Tasky offers a responsive UI with light/dark theme support.

Topics

Resources

License

Stars

Watchers

Forks