A lightweight web application for managing tasks, built with PHP. This application allows users to create, view, edit, and delete tasks without requiring a database setup - all data is stored in a JSON file.
- View All Tasks - Display a list of all tasks with status indicators
- Add New Task - Create new tasks with title and status
- Edit Tasks - Modify existing task titles and statuses
- Delete Tasks - Remove tasks from the list
- Task Statistics - View counts of tasks by status
- Task Filtering - Filter tasks by status (To Do, In Progress, Done)
- Add Comments - Add comments to tasks with author attribution
- Edit Comments - Inline editing of comments with AJAX support
- Delete Comments - Remove comments from tasks
- Author Tracking - Track comment authors and timestamps
- Create Tags - Create color-coded tags for task organization
- Color Management - Assign custom colors to tags
- Tag Assignment - Assign and remove tags from tasks
- Filter by Tags - Filter tasks by assigned tags
- Tag Management - Comprehensive tag CRUD operations
- To Do - Tasks that haven't been started
- In Progress - Tasks currently being worked on
- Done - Completed tasks
- PHP 7.4 or higher
- Composer (for dependency management)
- Web server (Apache, Nginx, or PHP built-in server)
- Write permissions for
data/andlogs/directories
vlucas/phpdotenv^5.4 - Environment variable management
phpunit/phpunit^9.5 - Testing framework
- JSON extension (usually included by default)
- Session extension (usually included by default)
-
Clone or download the project
git clone <repository-url> cd simple-task-manager
-
Install dependencies (if using Composer)
composer install
-
Set up permissions
chmod 755 data/ logs/ chmod 644 data/tasks.json
-
Start the application
Option A: Using PHP built-in server
php -S localhost:8000
Option B: Using Composer script
composer run serve
-
Access the application
- Open your browser and navigate to
http://localhost:8000 - Start creating and managing your tasks!
- Open your browser and navigate to
- Click the "Add New Task" button
- Enter a task title (3-255 characters)
- Select a status (defaults to "To Do")
- Optionally assign tags to categorize the task
- Click "Create Task"
- Click the "Edit" button on any task
- Modify the title, status, or assigned tags as needed
- Click "Update Task" to save changes
- Click the "Delete" button on any task
- Confirm the deletion in the popup dialog
- Use the filter buttons to view tasks by status
- Click on tags to filter tasks by specific categories
- Use "All" to view all tasks regardless of status
- Navigate to a task's edit page
- Scroll to the comments section
- Click "Add Comment" to show the comment form
- Enter your comment content and author name
- Click "Post Comment"
- Edit: Click the edit button on any comment for inline editing
- Delete: Click the delete button and confirm removal
- AJAX Updates: Comments can be edited without page refresh
- Click "Manage Tags" from the main task list
- Click "Create Tag"
- Enter tag name and select a color
- Click "Create Tag"
- Edit a task
- In the tags section, select from available tags
- Save the task to apply tag assignments
- Edit existing tags to change name or color
- Delete tags (removes them from all assigned tasks)
- View all tags in the tag management interface
Ctrl+N(orCmd+Non Mac) - Create new taskEscape- Go back to task list
The application can be configured by editing the config/config.php file or by using environment variables in a .env file.
APP_NAME- Application name (default: "Simple Task Manager")APP_DEBUG- Enable/disable debug mode (true/false)APP_ENV- Environment (development/production)
STORAGE_DRIVER- Storage type (currently: json)STORAGE_PATH- Path to the tasks JSON file
LOG_ENABLED- Enable/disable logging (true/false)LOG_LEVEL- Log level (info, debug, error, warning)LOG_PATH- Path to log files
CSRF_PROTECTION- Enable/disable CSRF protection (true/false)XSS_PROTECTION- Enable/disable XSS protection (true/false)SESSION_LIFETIME- Session timeout in seconds
DISPLAY_ERRORS- Show PHP errors (development only)ERROR_REPORTING- PHP error reporting level
- Input Sanitization - All user input is sanitized to prevent XSS attacks
- Input Validation - Both client-side and server-side validation
- File Locking - Prevents data corruption during concurrent access
- Error Handling - Graceful error handling and logging
The application uses JSON files for data persistence:
[
{
"id": "task_unique_id",
"title": "Task title",
"status": "To Do",
"tags": ["tag_id_1", "tag_id_2"],
"created_at": "2024-01-01 12:00:00",
"updated_at": "2024-01-01 12:00:00"
}
][
{
"id": "comment_unique_id",
"task_id": "task_unique_id",
"content": "Comment content",
"author": "Author name",
"created_at": "2024-01-01 12:00:00",
"updated_at": "2024-01-01 12:00:00"
}
][
{
"id": "tag_unique_id",
"name": "Tag name",
"color": "#007bff",
"created_at": "2024-01-01 12:00:00"
}
]- Chrome 60+
- Firefox 55+
- Safari 12+
- Edge 79+
The application provides the following endpoints:
GET /?action=index- List all tasksGET /?action=create- Show create task formPOST /?action=create- Create new taskGET /?action=edit&id={id}- Show edit task formPOST /?action=edit&id={id}- Update taskPOST /?action=delete&id={id}- Delete task
GET /?action=comments- List all commentsGET /?action=create_comment- Show create comment formPOST /?action=create_comment- Create new commentGET /?action=edit_comment&id={id}- Show edit comment formPOST /?action=edit_comment&id={id}- Update commentPOST /?action=delete_comment&id={id}- Delete commentPOST /?action=update_comment_ajax&id={id}- Update comment via AJAX
GET /?action=tags- List all tagsGET /?action=create_tag- Show create tag formPOST /?action=create_tag- Create new tagGET /?action=edit_tag&id={id}- Show edit tag formPOST /?action=edit_tag&id={id}- Update tagPOST /?action=delete_tag&id={id}- Delete tagPOST /?action=assign_tag- Assign tag to taskPOST /?action=remove_tag- Remove tag from task
The project includes PHPUnit for testing:
# Run all tests
composer test
# Run tests with coverage (if configured)
vendor/bin/phpunit --coverage-html coverage/Permission Denied Errors
- Ensure the web server has write permissions to
data/andlogs/directories - Check file ownership and permissions
Tasks Not Saving
- Verify
data/tasks.jsonexists and is writable - Check error logs for detailed error messages
Styling Issues
- Ensure CSS files are being loaded correctly
- Check browser console for any JavaScript errors
Enable debug mode by setting APP_DEBUG=true in your .env file or config/config.php. This will:
- Display detailed error messages
- Show PHP errors and warnings
- Log additional debug information
This project is open source and available under the MIT License.
For support, please check the troubleshooting section above or create an issue in the project repository.