Timetrack - Development Guidelines
Important rules
When you use any of the rules below, mention their tag.
<manual_testing> When you want to test the UI, stop and ask the user to test for you (and give the user instructions of what exactly to test). </manual_testing>
<use_sqlite_transactions> IMPORTANT: Use transactions for multi-step database operations to ensure atomicity. </use_sqlite_transactions>
<bubbletea_submodel_pattern>
When adding sub-screens that capture the input, prefer to use the bubbletea sub-model
pattern where you create a new <submodel>.go file and put its Model/Update()/View
into that file, only calling it from the toplevel functions.
</bubbletea_submodel_pattern>
<tui_color_scheme> When using colors, use the pre-defined color scheme in the color_scheme.go file. <tui_color_scheme>
<use_local_files> Write and run test files in ./. </use_local_files>
<use_panicf> When throwing a fatal error, use log.Panicf </use_panicf>
Documentation
Start by reading the tool documentation by running man ./users/Profpatsch/timetrack/timetrack.1.
Features
- Time tracking with start/stop for multiple clients
- Milestone markers to track project phases and show cumulative hours between milestones
- Invoice generation with immutable line items
- Automatic data reloading when terminal gains focus
- Import time entries from JSON files
- Client archiving
Production database
The default database location is ~/.local/share/timetrack/timetrack.db.
Only do anything to the database when the user explicitly asks.