Commit Graph

150 Commits

Author SHA1 Message Date
Trey t
0cf64cfb0c Add performance optimizations and database indexes
Database Indexes (migrations 006-009):
- Add case-insensitive indexes for auth lookups (email, username)
- Add composite indexes for task kanban queries
- Add indexes for notification, document, and completion queries
- Add unique index for active share codes
- Remove redundant idx_share_code_active and idx_notification_user_sent

Repository Optimizations:
- Add FindResidenceIDsByUser() lightweight method (IDs only, no preloads)
- Optimize GetResidenceUsers() with single UNION query (was 2 queries)
- Optimize kanban completion preloads to minimal columns (id, task_id, completed_at)

Service Optimizations:
- Remove Category/Priority/Frequency preloads from task queries
- Remove summary calculations from CRUD responses (client calculates)
- Use lightweight FindResidenceIDsByUser() instead of full FindByUser()

These changes reduce database load and response times for common operations.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 01:06:08 -06:00
Trey t
2ea5cea936 Add custom interval days support for task frequency
Backend changes:
- Add "Custom" frequency option to database seeds
- Add custom_interval_days field to Task model
- Update task DTOs to accept custom_interval_days
- Update task service to use custom_interval_days for next due date calculation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-13 19:05:42 -06:00
Trey t
780e699463 Add Google OAuth authentication support
- Add Google OAuth token verification and user lookup/creation
- Add GoogleAuthRequest and GoogleAuthResponse DTOs
- Add GoogleLogin handler in auth_handler.go
- Add google_auth.go service for token verification
- Add FindByGoogleID repository method for user lookup
- Add GoogleID field to User model
- Add Google OAuth configuration (client ID, enabled flag)
- Add i18n translations for Google auth error messages
- Add Google verification email template support

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-13 00:51:44 -06:00
Trey t
684856e0e9 Add timezone-aware overdue task detection
Fix issue where tasks showed as "Overdue" on the server while displaying
"Tomorrow" on the client due to timezone differences between server (UTC)
and user's local timezone.

Changes:
- Add X-Timezone header support to extract user's timezone from requests
- Add TimezoneMiddleware to parse timezone and calculate user's local "today"
- Update task categorization to accept custom time for accurate date comparisons
- Update repository, service, and handler layers to pass timezone-aware time
- Update CORS to allow X-Timezone header

The client now sends the user's IANA timezone (e.g., "America/Los_Angeles")
and the server uses it to determine if a task is overdue based on the
user's local date, not UTC.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-13 00:04:09 -06:00
Trey t
a568658b58 Add nextDueDate field to TaskResponse for recurring task support
- Add nextDueDate field to TaskResponse model (from API's next_due_date)
- Add effectiveDueDate computed property (nextDueDate ?? dueDate)
- Update DynamicTaskCard, TaskCard to display effectiveDueDate
- Update WidgetDataManager to save effectiveDueDate to widget cache
- Update TaskFormView to use effectiveDueDate when editing
- Fix preview mock data to include nextDueDate parameter

This ensures recurring tasks show the correct next due date after completion
instead of the original due date.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 11:10:16 -06:00
Trey t
56b60fcfc8 Add user count column to residences admin page
- Add user_count field to ResidenceResponse DTO
- Update residence handler to preload Users and calculate count
- Count includes owner (1) plus all shared users
- Add Users column to admin residences list

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-09 18:40:30 -06:00
Trey t
68a4c28d68 Add ID and Created columns to all admin pages with sortable columns
- Add ID column to all admin list pages for easy record identification
- Add Created column (created_at/date_joined) to pages missing it
- Implement client-side column sorting in DataTable component
- Fix sorting implementation to work without getSortingRowModel export

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-09 17:14:08 -06:00
Trey t
80c6b58361 Increase CPU sampling interval for accurate readings
Changed from 100ms to 1 second sampling interval in gopsutil
cpu.Percent() call. Shorter intervals can give inaccurate readings
due to timing issues.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-09 10:57:51 -06:00
Trey t
3f2b5415ed Fix frontend/backend type mismatches in monitoring
TypeScript types now match Go backend JSON field names:
- MemoryStats: used_bytes, total_bytes, usage_percent, heap_alloc, heap_sys, heap_inuse
- DiskStats: used_bytes, total_bytes, free_bytes, usage_percent
- RuntimeStats: num_gc, last_gc_pause_ns
- HTTPStats: requests_total, requests_per_minute
- EndpointStats: error_rate (ratio), p95_latency_ms
- AsynqStats: removed total_* aggregates (calculated in frontend)

Updated components to use correct field names and calculate
aggregates where needed.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-09 10:56:47 -06:00
Trey t
eb127fda20 Add real-time log monitoring and system stats dashboard
Implements a comprehensive monitoring system for the admin interface:

Backend:
- New monitoring package with Redis ring buffer for log storage
- Zerolog MultiWriter to capture logs to Redis
- System stats collection (CPU, memory, disk, goroutines, GC)
- HTTP metrics middleware (request counts, latency, error rates)
- Asynq queue stats for worker process
- WebSocket endpoint for real-time log streaming
- Admin auth middleware now accepts token in query params (for WebSocket)

Frontend:
- New monitoring page with tabs (Overview, Logs, API Stats, Worker Stats)
- Real-time log viewer with level filtering and search
- System stats cards showing CPU, memory, goroutines, uptime
- HTTP endpoint statistics table
- Asynq queue depth visualization
- Enable/disable monitoring toggle in settings

Memory safeguards:
- Max 200 unique endpoints tracked
- Hourly stats reset to prevent unbounded growth
- Max 1000 log entries in ring buffer
- Max 1000 latency samples for P95 calculation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-09 10:26:40 -06:00
Trey t
12eac24632 Remove remaining status_id references after in_progress migration
- Remove Preload("Status") from worker handler and repositories
- Update seeds to use in_progress boolean instead of status_id
- Remove task_taskstatus table creation from lookup seeds
- Update documentation to reflect in_progress boolean pattern

Fixes notification worker error:
"Status: unsupported relations for schema Task"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 22:43:53 -06:00
Trey t
c5b0225422 Replace status_id with in_progress boolean field
- Remove task_statuses lookup table and StatusID foreign key
- Add InProgress boolean field to Task model
- Add database migration (005_replace_status_with_in_progress)
- Update all handlers, services, and repositories
- Update admin frontend to display in_progress as checkbox/boolean
- Remove Task Statuses tab from admin lookups page
- Update tests to use InProgress instead of StatusID
- Task categorization now uses InProgress for kanban column assignment

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 20:48:16 -06:00
Trey t
cb250f108b Add next_due_date editing to admin task form
- Add NextDueDate field to UpdateTaskRequest DTO
- Add handler logic to process next_due_date updates
- Add next_due_date input field to task edit form
- Update TypeScript models with next_due_date field

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 17:23:30 -06:00
Trey t
5be18fa110 Add next_due_date to admin task views
Display next_due_date field in task list table and task detail page
so admins can see the effective date used for overdue calculations.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 17:14:21 -06:00
Trey t
1eec68ecf9 Include TotalSummary in kanban board task responses
Add summary field to KanbanBoardResponse so clients can update
dashboard stats without making a separate /summary API call.
This reduces network calls when refreshing task data.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 16:49:11 -06:00
Trey t
9761156597 Add onboarding email campaign system with post-verification welcome email
Implements automated onboarding emails to encourage user engagement:
- Post-verification welcome email with 5 tips (sent after email verification)
- "No Residence" email (2+ days after registration with no property)
- "No Tasks" email (5+ days after first residence with no tasks)

Key features:
- Each onboarding email type sent only once per user (enforced by unique constraint)
- Email open tracking via tracking pixel endpoint
- Daily scheduled job at 10:00 AM UTC to process eligible users
- Admin panel UI for viewing sent emails, stats, and manual sending
- Admin can send any email type to users from the user detail Testing section

New files:
- internal/models/onboarding_email.go - Database model with tracking
- internal/services/onboarding_email_service.go - Business logic and eligibility queries
- internal/handlers/tracking_handler.go - Email open tracking endpoint
- internal/admin/handlers/onboarding_handler.go - Admin API endpoints
- admin/src/app/(dashboard)/onboarding-emails/ - Admin UI pages

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 14:36:50 -06:00
Trey t
e152a6308a Add quick-complete endpoint for iOS widget task completion
- Add lightweight POST /api/tasks/:id/quick-complete/ endpoint
- Creates task completion with minimal processing for widget use
- Returns only 200 OK on success (no response body)
- Updates task status and next_due_date based on frequency
- Sends completion notification asynchronously

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 12:02:44 -06:00
Trey t
1a48fbfb20 Include TotalSummary in CRUD responses to eliminate redundant API calls
Backend changes:
- Add WithSummaryResponse wrappers for Task, TaskCompletion, and Residence CRUD
- Update services to return summary with all mutations (create, update, delete)
- Update handlers to pass through new response types
- Add getSummaryForUser helper for fetching summary in CRUD operations
- Wire ResidenceService into TaskService for summary access
- Add summary field to JoinResidenceResponse

This optimization eliminates the need for a separate getSummary() call after
every task/residence mutation, reducing network calls from 2 to 1.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 10:39:33 -06:00
Trey t
f88409cfb4 Add Daily Digest notification preferences with custom time support
- Add daily_digest boolean and daily_digest_hour fields to NotificationPreference model
- Update HandleDailyDigest to check user preferences and custom notification times
- Change Daily Digest scheduler to run hourly (supports per-user custom times)
- Update notification service DTOs for new fields
- Add Daily Digest toggle and custom time to admin notification prefs page
- Fix notification handlers to only notify users at their designated hour

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-07 22:48:18 -06:00
Trey t
0ea0c766ea Add admin CRUD for UserProfile, AppleSocialAuth, CompletionImage, DocumentImage
Complete admin interface coverage for all database models:
- New Go handlers with list, get, update, delete, bulk delete endpoints
- New Next.js pages with search, pagination, and bulk operations
- Updated sidebar navigation with new menu items

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-07 21:08:50 -06:00
Trey t
a348f31a9e Add per-residence overdue_count to API response
Adds overdueCount field to each residence in my-residences endpoint,
enabling the mobile app to show pulsing icons on individual residence
cards that have overdue tasks.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-07 12:19:11 -06:00
Trey t
cfb8a28870 Consolidate task logic into single source of truth (DRY refactor)
This refactor eliminates duplicate task logic across the codebase by
creating a centralized task package with three layers:

- predicates/: Pure Go functions defining task state logic (IsCompleted,
  IsOverdue, IsDueSoon, IsUpcoming, IsActive, IsInProgress, EffectiveDate)
- scopes/: GORM scope functions mirroring predicates for database queries
- categorization/: Chain of Responsibility pattern for kanban column assignment

Key fixes:
- Fixed PostgreSQL DATE vs TIMESTAMP comparison bug in scopes (added
  explicit ::timestamp casts) that caused summary/kanban count mismatches
- Fixed models/task.go IsOverdue() and IsDueSoon() to use EffectiveDate
  (NextDueDate ?? DueDate) instead of only DueDate
- Removed duplicate isTaskCompleted() helpers from task_repo.go and
  task_button_types.go

Files refactored to use consolidated logic:
- task_repo.go: Uses scopes for statistics, predicates for filtering
- task_button_types.go: Uses predicates instead of inline logic
- responses/task.go: Delegates to categorization package
- dashboard_handler.go: Uses scopes for task statistics
- residence_service.go: Uses predicates for report generation
- worker/jobs/handler.go: Documented SQL with predicate references

Added comprehensive tests:
- predicates_test.go: Unit tests for all predicate functions
- scopes_test.go: Integration tests verifying scopes match predicates
- consistency_test.go: Three-layer consistency tests ensuring predicates,
  scopes, and categorization all return identical results

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-07 11:48:03 -06:00
Trey t
f0c7b070d7 fix shit 2025-12-07 10:41:55 -06:00
Trey t
efc6118a98 Fix notification handlers to exclude completed tasks from kanban
Updated task reminder and overdue reminder queries to match the kanban
categorization logic. A task is now considered "completed" (excluded from
notifications) if it has NextDueDate IS NULL AND at least one completion
record, rather than checking if completion was after the due date.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-07 10:03:35 -06:00
Trey t
66c8fe9428 Fix PostgreSQL query parameter encoding for notification hour check
The WHERE clause with `? = ?` comparing two bound parameters caused
PostgreSQL to fail with "unable to encode into text format" error.
Fixed by moving the comparison to Go code and building the query
conditionally.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-07 09:14:41 -06:00
Trey t
dd16019ce2 Add per-user notification time preferences
Allow users to customize when they receive notification reminders:
- Add task_due_soon_hour, task_overdue_hour, warranty_expiring_hour fields
- Store times in UTC, clients convert to/from local timezone
- Worker runs hourly, queries only users scheduled for that hour
- Early exit optimization when no users need notifications
- Admin UI displays custom notification times

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-07 00:23:57 -06:00
Trey t
af87bd943e Add clear stuck jobs admin feature and simplify worker scheduling
- Add POST /api/admin/settings/clear-stuck-jobs endpoint to clear
  stuck/failed asynq worker jobs from Redis (retry queue, archived,
  orphaned task metadata)
- Add "Clear Stuck Jobs" button to admin settings UI
- Remove TASK_REMINDER_MINUTE config - all jobs now run at minute 0
- Simplify formatCron to only take hour parameter
- Update default notification times to CST-friendly hours

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-06 23:05:48 -06:00
Trey t
3b9e37d12b Add generate-share-package endpoint for residence sharing
- Add POST /api/residences/:id/generate-share-package/ endpoint
- Add SharePackageResponse DTO with share code and metadata
- Add GenerateSharePackage service method to create one-time share codes
- Update JoinWithCode to deactivate share code after successful use

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-06 18:55:48 -06:00
Trey t
83384db014 Improve admin dashboard task status overview
- Add all task statuses: Pending, In Progress, On Hold, Completed
- Add active, archived, cancelled, and new_30d task counts
- Fix completed query to filter non-archived/non-cancelled tasks
- Update dashboard UI with better layout showing all statuses
- Show cancelled and archived counts in footer row

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-06 12:09:27 -06:00
Trey t
3b448abcbd Fix ETag 304 Not Modified by stripping W/ prefix from client header
Reverse proxy adds W/ prefix to ETags, but cache stores them without it.
Strip the prefix from client's If-None-Match header before comparing.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-06 10:55:32 -06:00
Trey t
1308a89675 Set status to Completed for one-time tasks after completion
Previously, completing a one-time task only cleared the next_due_date
but left the status as Pending. Now sets status to Completed (ID=3)
so the task status accurately reflects its state.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-06 10:37:02 -06:00
Trey t
5a6bad3ec3 Remove Gorush, use direct APNs/FCM, fix worker queries
- Remove Gorush push server dependency (now using direct APNs/FCM)
- Update docker-compose.yml to remove gorush service
- Update config.go to remove GORUSH_URL
- Fix worker queries:
  - Use auth_user instead of user_user table
  - Use completed_at instead of completion_date column
- Add NotificationService to worker handler for actionable notifications
- Add docs/PUSH_NOTIFICATIONS.md with architecture documentation
- Update README.md, DOKKU_SETUP.md, and dev.sh

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-06 00:59:42 -06:00
Trey t
91a1f7ebed Add Redis caching for lookup data and admin cache management
- Add lookup-specific cache keys and methods to CacheService
- Add cache refresh on lookup CRUD operations in AdminLookupHandler
- Add Redis caching after seed-lookups in AdminSettingsHandler
- Add ETag generation for seeded data to support client-side caching
- Update task template handler with cache invalidation
- Fix route for clear-cache endpoint

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 22:35:09 -06:00
Trey t
1b06c0639c Add actionable push notifications and fix recurring task completion
Features:
- Add task action buttons to push notifications (complete, view, cancel, etc.)
- Add button types logic for different task states (overdue, in_progress, etc.)
- Implement Chain of Responsibility pattern for task categorization
- Add comprehensive kanban categorization documentation

Fixes:
- Reset recurring task status to Pending after completion so tasks appear
  in correct kanban column (was staying in "In Progress")
- Fix PostgreSQL EXTRACT function error in overdue notifications query
- Update seed data to properly set next_due_date for recurring tasks

Admin:
- Add tasks list to residence detail page
- Fix task edit page to properly handle all fields

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 14:23:14 -06:00
Trey t
bbf3999c79 Add task templates API and admin management
- Add TaskTemplate model with category and frequency support
- Add task template repository with CRUD and search operations
- Add task template service layer
- Add public API endpoints for templates (no auth required):
  - GET /api/tasks/templates/ - list all templates
  - GET /api/tasks/templates/grouped/ - templates grouped by category
  - GET /api/tasks/templates/search/?q= - search templates
  - GET /api/tasks/templates/by-category/:id/ - templates by category
  - GET /api/tasks/templates/:id/ - single template
- Add admin panel for task template management (CRUD)
- Add admin API endpoints for templates
- Add seed file with predefined task templates
- Add i18n translations for template errors

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 09:07:53 -06:00
Trey t
e824c90877 add prod key 2025-12-04 21:11:23 -06:00
Trey t
838685b793 Fix push notifications and hide action button on completed tasks
- Add push_certs directory to Dockerfile for APNs support
- Fix notification_id conversion using strconv.FormatUint instead of string(rune())
- Remove "view" from completed tasks button_types so action button is hidden

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 20:47:19 -06:00
Trey t
5a6fbe0a36 Add email notification preference for task completion
- Add EmailTaskCompleted field to NotificationPreference model
- Update notification repository to include email preference in queries
- Check email preference before sending task completion emails
- Add email preference toggle to admin panel notification-prefs page
- Update API types for email preference support

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 20:04:24 -06:00
Trey t
0825fd9a12 Rename MyCrib to Casera in admin test email footer
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 19:07:32 -06:00
Trey t
c7cfa9080f Fix dashboard task stats using wrong table name in JOINs
The Task model uses TableName() returning "task_task" but the dashboard
queries were using "tasks.status_id" (GORM's default pluralization).
This caused the pending, completed, and overdue task counts to fail.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 18:52:55 -06:00
Trey t
3d33a1f483 Fix clear all data - preserve superusers properly
Issues fixed:
1. Added missing user_applesocialauth deletion (Sign in with Apple)
2. Added missing residence_residencesharecode deletion
3. Simplified user deletion to always use WHERE is_superuser = false
   (GORM's Exec with IN clause and slice was unreliable)

The delete query now directly filters on is_superuser column instead of
using NOT IN with a precomputed list of IDs, which is both simpler and
guaranteed to preserve all superuser accounts.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 16:54:06 -06:00
Trey t
44990c9131 Make upgrade-triggers endpoint public for app initialization
Move /subscription/upgrade-triggers/ from authenticated routes to public
routes so the app can fetch upgrade trigger data at startup before user
login. This enables showing subscription benefits during onboarding.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 15:55:41 -06:00
Trey t
77c8c4fad8 Add lightweight summary endpoint for task statistics
- Add GET /api/residences/summary/ endpoint
- Returns task statistics without full residence data
- Enables efficient refresh of home screen summary counts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 09:52:37 -06:00
Trey t
61cba2519f Reorder kanban columns: move In Progress after Overdue
New order: Overdue, In Progress, Due Soon, Upcoming, Completed, Cancelled

This prioritizes tasks being actively worked on right after urgent overdue
items, making the workflow more intuitive.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 22:13:59 -06:00
Trey t
7dc85aa4cf Add comprehensive kanban board tests and fix test suite
- Add 13 tests for task kanban categorization and button types
- Fix i18n initialization in test setup (was causing nil pointer panics)
- Add TaskCompletionImage to test DB auto-migrate
- Update ListTasks tests to expect kanban board response instead of array

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 21:51:21 -06:00
Trey t
3419b66097 Add landing page, redesign emails, and return updated task on completion
- Integrate landing page into Go app (served at root /)
- Add STATIC_DIR config for static file serving
- Redesign all email templates with modern dark theme styling
- Add app icon to email headers
- Return updated task with kanban_column in completion response
- Update task DTO to include kanban column for client-side state updates

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 21:33:17 -06:00
Trey t
76579e8bf8 Add secure media access control with authenticated proxy endpoints
- Add MediaHandler with token-based proxy endpoints for serving media:
  - GET /api/media/document/:id
  - GET /api/media/document-image/:id
  - GET /api/media/completion-image/:id
- Add MediaURL fields to response DTOs for documents and task completions
- Add FindImageByID and FindCompletionImageByID repository methods
- Preload Completions.Images in all task queries for proper media URLs
- Remove public /uploads static file serving for security
- Verify residence access before serving any media files

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 19:47:39 -06:00
Trey t
ed21d9267d Add 5 new language translations: Chinese, Japanese, Korean, Italian, Dutch
Expand i18n support with professional translations for:
- Chinese (Simplified) - zh.json
- Japanese - ja.json
- Korean - ko.json
- Italian - it.json
- Dutch - nl.json

API now supports 10 languages: en, es, fr, de, pt, zh, ja, ko, it, nl

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 08:42:57 -06:00
Trey t
c17e85c14e Add comprehensive i18n localization support
- Add go-i18n package for internationalization
- Create i18n middleware to extract Accept-Language header
- Add translation files for en, es, fr, de, pt languages
- Localize all handler error messages and responses
- Add language context to all API handlers

Supported languages: English, Spanish, French, German, Portuguese

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 02:01:47 -06:00
Trey t
c72741fd5f Add contractors by residence endpoint and Bruno API collection
- Add GET /contractors/by-residence/:residence_id/ endpoint
- Create comprehensive Bruno API collection (89 endpoints)
- Collection covers all API endpoints with Local and Dev environments

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 20:38:57 -06:00