Tags are reusable, colored labels you can attach to any time entry to add a layer of categorization beyond projects. You might use them to separate client-facing work from internal tasks, mark entries by technology, or flag items for review. Tags are displayed as small chips or badges directly on the entry card, so you can scan them at a glance without opening an entry.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Aking16/timify/llms.txt
Use this file to discover all available pages before exploring further.
Tags data shape
Each row in thetags table holds the following fields.
UUID primary key, auto-generated with
crypto.randomUUID() on insert.Foreign key referencing the
user table. Deleting a user cascades and removes all their tags.The display name of the tag. Must be non-empty and at most 16 characters long.
Hex color code used to render the tag chip. Defaults to
#9ca3af (Tailwind gray-400) when not supplied.Creation timestamp, set automatically by SQLite via
unixepoch().Last-updated timestamp, refreshed on every write via Drizzle’s
$onUpdateFn.Many-to-many relationship: time_entry_tags
Tags and time entries share a many-to-many relationship managed through the time_entry_tags junction table. A unique index on (timeEntryId, tagId) prevents duplicate associations.
time_entry_tags table fields
time_entry_tags table fields
Creating a tag
Navigate to/app/tags and click the New Tag button to open the create dialog.
Enter a tag name
Type a short, descriptive name. The
createTag action validates that the name is non-empty and no longer than 16 characters.Pick a color (optional)
Choose a hex color for the tag chip. If you leave this blank, Timify uses the default color
#9ca3af.Validation rules for createTag
| Field | Rule |
|---|---|
name | Required · non-empty · maximum 16 characters |
color | Optional · hex color string · null accepted |
Editing a tag
Open the ⋮ menu on a tag card on the/app/tags page and select Edit. The editTag server action updates name and color for the given id.
Validation rules for editTag
| Field | Rule |
|---|---|
id | Required · existing tag UUID |
name | Required · non-empty · maximum 16 characters |
color | Optional · hex color string |
editTag calls revalidateTag("get-tags", "max") so the tag list and all entry chips refresh immediately.
Deleting a tag
Click Delete in the tag card’s action menu.deleteTag(id) verifies your session, runs db.delete(tags).where(eq(tags.id, id)), and revalidates the cache.
Attaching a tag to a time entry
From any entry card, click the tag icon or open the entry’s detail panel and select a tag from the dropdown. This callsaddTagToTimeEntry(timeEntryId, tagId).
The unique index
unique_time_entry_tag on (timeEntryId, tagId) means adding the same tag to the same entry twice will throw a database constraint error. The UI prevents duplicates by hiding already-attached tags from the selection list.Removing a tag from a time entry
Click the × on a tag chip in the entry card or deselect it in the tag picker. This callsremoveTagFromTimeEntry(timeEntryId, tagId).
addTagToTimeEntry and removeTagFromTimeEntry call revalidatePath("/project/") so the entry list re-renders with the updated tag chips.
Fetching all tags
ThegetTags() server action retrieves all tags from the tags table. It uses Next.js "use cache" with the get-tags cache tag so results are served from memory on repeat requests.
