{"id":31809728,"url":"https://github.com/proofrock/tsk","last_synced_at":"2025-10-11T05:50:04.570Z","repository":{"id":318626009,"uuid":"1071413489","full_name":"proofrock/tsk","owner":"proofrock","description":"Vibe coding experiment. ToDo app.","archived":false,"fork":false,"pushed_at":"2025-10-08T10:07:29.000Z","size":8719,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-08T10:13:47.391Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Svelte","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/proofrock.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-07T10:12:37.000Z","updated_at":"2025-10-08T10:07:32.000Z","dependencies_parsed_at":"2025-10-08T10:13:58.487Z","dependency_job_id":"59a36259-32d9-47a4-bd7a-b5e8cc142066","html_url":"https://github.com/proofrock/tsk","commit_stats":null,"previous_names":["proofrock/tsk"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/proofrock/tsk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proofrock%2Ftsk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proofrock%2Ftsk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proofrock%2Ftsk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proofrock%2Ftsk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/proofrock","download_url":"https://codeload.github.com/proofrock/tsk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proofrock%2Ftsk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279006357,"owners_count":26084088,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-11T05:50:03.328Z","updated_at":"2025-10-11T05:50:04.555Z","avatar_url":"https://github.com/proofrock.png","language":"Svelte","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tsk\n\nA minimal, aesthetically pleasing task manager/todo list web application with subtask support.\n\n## Features\n\n- ✅ **Create and manage tasks** - Add tasks with title, description, and category\n- 🌳 **Hierarchical subtasks** - Create one level of subtasks under parent tasks\n- ✏️ **Edit tasks** - Modify any task or subtask details\n- ✓ **Delete tasks** - Select and delete multiple tasks at once\n- 🔄 **Drag-and-drop reordering** - Reorder tasks and subtasks with mouse or touch\n- 📂 **Categories** - Organize tasks by category with configurable default\n- 🎯 **Task badges** - Parent tasks show the count of their subtasks\n- 👁️ **Collapse/expand** - Toggle subtask visibility individually or all at once\n- 🎨 **Modern dark theme** - Clean UI with orange accent color (#f97316)\n- 📱 **Fully responsive** - Mobile-first design with Bootstrap 5\n- 🚀 **Single binary deployment** - Embedded frontend and SQLite database\n\n## Tech Stack\n\n- **Backend**: Go 1.21+ with embedded SQLite database (CGO enabled)\n- **Frontend**: Svelte 5 + Vite with Bootstrap 5\n- **Deployment**: Docker \u0026 Docker Compose\n- **Build System**: Makefile with automated version management\n\n## Quick Start with Docker\n\nThe easiest way to run tsk is using Docker:\n\n```bash\ndocker run -d -p 8080:8080 --user 1000:1000 -v tsk-data:/db ghcr.io/proofrock/tsk:latest\n```\n\nThe application will be available at `http://localhost:8080`\n\n### Docker Images\n\nImages are automatically built and pushed to GitHub Container Registry on each tagged release:\n\n- `ghcr.io/proofrock/tsk:latest` - Latest release\n- `ghcr.io/proofrock/tsk:v1.0.0` - Specific version\n\n## Development Setup\n\n### Prerequisites\n\n- Go 1.21+ (with CGO enabled)\n- Node.js 20+\n- npm\n- make (optional, for build automation)\n\n### Backend Setup\n\n```bash\ncd backend\ngo mod download\n```\n\n### Frontend Setup\n\n```bash\ncd frontend\nnpm install\n```\n\n### Running in Development\n\n1. Start the backend:\n```bash\ncd backend\ngo run main.go\n```\n\n2. In a separate terminal, start the frontend dev server:\n```bash\ncd frontend\nnpm run dev\n```\n\nThe frontend will be available at `http://localhost:5173` with API proxy to the backend.\n\n## Building for Production\n\nUse the Makefile:\n\n```bash\nmake build\n# or simply\nmake\n```\n\nThis will:\n1. Build the frontend and create optimized static files\n2. Build the Go backend with embedded frontend\n3. Create a single `./tsk` binary\n\nRun the binary:\n```bash\n./tsk\n```\n\nCheck version:\n```bash\n./tsk --version\n```\n\n### Building with Version\n\nThe version is automatically detected from git tags. To build with a specific version:\n```bash\nmake build VERSION=v1.0.0\n```\n\nOr create a git tag:\n```bash\ngit tag v1.0.0\nmake build\n```\n\n### Makefile Targets\n\n- `make build` - Build frontend and backend (default)\n- `make frontend` - Build only frontend\n- `make backend` - Build only backend (requires frontend to be built first)\n- `make clean` - Remove all build artifacts (node_modules, dist, binaries, etc.)\n- `make help` - Show available targets\n\n## Managing Categories\n\n### Adding Categories via UI\n\nCategories must be added directly to the database. Once added, they appear in the category dropdown.\n\n### Adding Categories via Database\n\n1. Connect to the database:\n```bash\nsqlite3 tsk.db\n```\n\n2. Insert a new category:\n```sql\nINSERT INTO categories (name, is_default) VALUES ('Work', 0);\nINSERT INTO categories (name, is_default) VALUES ('Personal', 0);\nINSERT INTO categories (name, is_default) VALUES ('Shopping', 0);\n```\n\n3. Set a category as default (optional):\n```sql\nUPDATE categories SET is_default = 0;  -- Unset all defaults first\nUPDATE categories SET is_default = 1 WHERE name = 'Work';  -- Set Work as default\n```\n\n4. Restart the application to see the new categories.\n\n## Database Schema\n\n### Categories Table\n- `id`: INTEGER PRIMARY KEY AUTOINCREMENT\n- `name`: TEXT NOT NULL UNIQUE\n- `is_default`: BOOLEAN NOT NULL DEFAULT 0\n\n### Tasks Table\n- `id`: INTEGER PRIMARY KEY AUTOINCREMENT\n- `title`: TEXT NOT NULL\n- `description`: TEXT\n- `category_id`: INTEGER (foreign key to categories)\n- `parent_id`: INTEGER (nullable, foreign key to tasks with CASCADE delete)\n- `order`: INTEGER (for drag-drop ordering)\n- `completed`: BOOLEAN\n\n### Task Hierarchy Rules\n\n- **One level only**: Subtasks cannot have their own subtasks\n- **Category inheritance**: Subtasks inherit their parent's category\n- **Cascade delete**: Deleting a parent deletes all its subtasks\n- **Cascade category changes**: Changing a parent's category updates all subtasks\n- **No circular references**: Tasks with subtasks cannot become subtasks\n\n## Database Migrations\n\nMigration scripts are provided for upgrading existing databases:\n\n### migrate.sql\nAdds subtask support (parent_id column):\n```bash\nsqlite3 tsk.db \u003c migrate.sql\n```\n\n### migrate2.sql\nAdds default category support (is_default column):\n```bash\nsqlite3 tsk.db \u003c migrate2.sql\n```\n\n## API Endpoints\n\n### Categories\n- `GET /api/categories` - List all categories with default flag\n\n### Tasks\n- `GET /api/tasks?category_id={id}` - List tasks by category (includes subtasks)\n- `POST /api/tasks` - Create a new task\n  ```json\n  {\n    \"title\": \"Task title\",\n    \"description\": \"Optional description\",\n    \"category_id\": 1,\n    \"parent_id\": null  // or parent task ID for subtasks\n  }\n  ```\n- `PUT /api/tasks/{id}` - Update a task (cascades category to subtasks)\n  ```json\n  {\n    \"title\": \"Updated title\",\n    \"description\": \"Updated description\",\n    \"category_id\": 1,\n    \"parent_id\": null\n  }\n  ```\n- `POST /api/tasks/{id}/complete` - Mark task as complete (deletes it)\n- `POST /api/tasks/reorder` - Reorder tasks and update parent relationships\n  ```json\n  {\n    \"tasks\": [\n      {\"id\": 1, \"parent_id\": null},\n      {\"id\": 2, \"parent_id\": 1},\n      {\"id\": 3, \"parent_id\": null}\n    ]\n  }\n  ```\n\n### Version\n- `GET /api/version` - Get application version\n\n## User Interface Guide\n\n### Task Management\n\n- **Add Task**: Click the \"Add Task\" button in the header\n- **Edit Task**: Click the pencil icon on the right side of any task\n- **Delete Tasks**: Check the boxes of tasks to delete, then click \"Delete X tasks\"\n- **Reorder Tasks**: Drag and drop tasks with mouse or touch\n\n### Subtasks\n\n- **Create Subtask**: In the task modal, select a parent from the \"Parent Task\" dropdown\n- **Make Child**: Drag a task to the right edge (1/6 width) of another task\n- **Promote to Task**: Drag a subtask to the left area of any non-subtask\n- **Reorder within Subtasks**: Drag subtasks within the right edge zone (green indicator)\n- **Collapse/Expand**: Click the chevron button on parent tasks, or use toolbar buttons\n\n### Visual Indicators\n\n- **Orange line**: Normal task reordering or new child creation\n- **Green line**: Reordering within subtask group\n- **Badge**: Number on parent tasks shows subtask count\n- **Indentation**: Subtasks are indented 3rem from left\n\n### Drag-and-Drop Zones\n\n- **Left 5/6 of task**: Normal reordering (before/after)\n- **Right 1/6 of parent task**: Make dragged task a child\n- **Right 1/6 of subtask**: Reorder as sibling within same parent\n\n## Docker Deployment\n\n### Build the image:\n```bash\ndocker build -t tsk .\n```\n\n### Run with docker-compose:\n```bash\ndocker-compose up -d\n```\n\nThe application data (SQLite database) is persisted in a Docker volume named `tsk-data`.\n\n### Docker Volume Management\n\nTo backup the database:\n```bash\ndocker run --rm -v tsk-data:/db -v $(pwd):/backup alpine cp /db/tsk.db /backup/tsk-backup.db\n```\n\nTo restore from backup:\n```bash\ndocker run --rm -v tsk-data:/db -v $(pwd):/backup alpine cp /backup/tsk-backup.db /db/tsk.db\n```\n\n## Configuration\n\n### Port Configuration\n\nThe application runs on port 8080 by default. To change this, modify the `main.go` file:\n\n```go\nlog.Fatal(http.ListenAndServe(\":8080\", handler))\n```\n\n### Database Location\n\nBy default, the database is stored in `./tsk.db`. In Docker, this is mounted to `/db/tsk.db`.\n\n## Releases\n\nTo create a new release:\n\n1. Tag the commit with a version following semver format:\n   ```bash\n   git tag v1.0.0\n   git push origin v1.0.0\n   ```\n\n2. GitHub Actions will automatically:\n   - Build the frontend\n   - Build the Docker image for linux/amd64\n   - Push the image to `ghcr.io/proofrock/tsk:v1.0.0`\n   - Update the `latest` tag\n\nThe version number will be embedded in both the binary and the UI footer.\n\n## Troubleshooting\n\n### Build Issues\n\n- **CGO errors**: Ensure CGO is enabled (`CGO_ENABLED=1`) and build tools are installed\n- **SQLite errors**: Install SQLite development libraries (`libsqlite3-dev` on Debian/Ubuntu)\n- **Frontend build fails**: Clear `node_modules` and run `npm install` again\n\n### Runtime Issues\n\n- **Database locked**: Stop all instances of the application before running a new one\n- **Port already in use**: Change the port in `main.go` or stop the conflicting service\n- **Drag-and-drop not working on mobile**: Ensure you're not touching interactive elements (checkboxes, buttons)\n\n## License\n\nThis project is licensed under the European Union Public Licence (EUPL) v. 1.2.\n\nSee the [LICENSE](LICENSE) file for the full license text.\n\nThe EUPL is a copyleft open-source license compatible with GPL, AGPL, MPL, LGPL, and other major open-source licenses. You can find more information about the EUPL at https://eupl.eu/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproofrock%2Ftsk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fproofrock%2Ftsk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproofrock%2Ftsk/lists"}