$ show solidtime-io/solidtime
solidtime is an open-source time tracking application designed for freelancers and agencies. It provides a full-stack solution with a PHP backend (using a custom Laravel-like framework with strict typing) and a Vue 3 frontend served via Inertia.js. The system supports multi-tenant organizations with role-based permissions (Owner, Admin, Employee, Placeholder), project and task management, client and tag tracking, billable rates, goals, and detailed reporting with export to CSV, PDF, ODS, and XLSX. It also includes importers for Toggl, Clockify, Harvest, and generic CSV formats, as well as a native solidtime format. The architecture is a monolith with a RESTful API (versioned under /api/v1) and web controllers driven by Inertia.js. The backend uses a custom PHP framework that resembles Laravel but employs non-standard syntax (declare strict_types, use traits, fn closures). Key entry points include API controllers for time entries, projects, clients, tags, goals, reports, and import/export; console commands for administrative tasks, telemetry, and database consistency checks; and a Filament admin panel for CRUD operations. The frontend is built with Vue 3, Pinia stores, TanStack Query for caching, and a shared UI component library (packages/ui) that provides reusable primitives like dialogs, selects, calendars, and context menus. Data flows center around time entries, which are created via a timer or manual entry, associated with projects, tasks, clients, and tags, and aggregated for reporting and goal tracking. The system uses PostgreSQL as its primary database, with Redis for caching and queueing. External dependencies include a mail driver (Mailpit in dev), storage drivers (local/S3), and optional services like Gotenberg for PDF rendering and Paddle for subscriptions. The codebase is extensively tested with PHPUnit (unit/feature), Vitest (JS unit), and Playwright (E2E), and includes CI/CD pipelines for building, linting, and testing.
The LLM identified 5 files worth highlighting for reuse:
Central authorization service that defines five roles (owner, admin, manager, employee, placeholder) with granular CRUD permissions per entity. It caches permissions per user/organization and supports dynamic permissions (e.g., employees_can_manage_tasks). The pattern is cleanly separated from controllers and models, making it reusable in any multi-tenant application requiring role-based access control.
Provides centralized formatting for numbers, currencies, dates, times, and intervals based on per-organization settings (enums for format types). It is used across reports, exports, and UI rendering. The service is self-contained and could be extracted into any PHP project needing locale-aware formatting without external dependencies.
A secure ZIP extraction helper that guards against path traversal (zip-slip), decompression bombs, and excessive file counts/sizes. It validates entry names and limits uncompressed size. This is a reusable security pattern for any application that accepts ZIP uploads, demonstrating non-obvious attention to import security.
Pure-function module that computes break placement plans (gap finding, split/move operations) for a timesheet grid. It handles tolerance, obstacles, day boundaries, and keyboard navigation. The logic is isolated from UI and could be reused in any scheduling or calendar application requiring automatic break insertion.
Exports a comprehensive set of reusable Vue 3 components built on reka-ui/radix-vue, including Accordion, Calendar, Combobox, ContextMenu, Dialog, DropdownMenu, Field, NumberField, Popover, Progress, RangeCalendar, Select, Separator, Tabs, and Tooltip. Each component follows a consistent pattern with index exports, making the library easily extractable for other Vue projects.