Commit Graph

107 Commits

Author SHA1 Message Date
Claude e950abd805 Fix migration files excluded from Docker build and restore fonts
- Remove drizzle/*.sql and drizzle/*-journal from .dockerignore so
  migration files are included in the Docker build context
- Restore next/font/google imports (removed prematurely due to local
  IP being 403'd by Google Fonts; production builds should work fine)
- Update CSS font fallbacks to use proper system font stacks

https://claude.ai/code/session_012sqEgNQpx676isepeoX4Mi
2026-04-05 03:03:45 +00:00
Claude 4c0eae4b11 Fix build: resolve Turbopack client bundle and font issues
- Move EXPENSE_CATEGORIES to ~/lib/expense-categories.ts to break
  server router import chain from client component
- Use inline import() types in trpc/react.tsx to prevent Turbopack
  from including server modules (pg, db) in the client bundle
- Replace next/font/google with system font stacks to fix build
  failures in environments without Google Fonts access

https://claude.ai/code/session_012sqEgNQpx676isepeoX4Mi
2026-04-05 03:00:25 +00:00
Claude e6b79ce2c2 Add bulk actions, multi-currency, expenses, templates, and reports
Schema (migration 0001):
- clients: add currency column (default USD)
- invoices: add currency column (default USD)
- New expenses table: amount, currency, category, billable, reimbursable,
  client/invoice/business relations, notes
- New invoice_templates table: name, type (notes|terms), content, isDefault

API:
- invoices: add bulkUpdateStatus and bulkDelete procedures (ownership-safe)
- invoices: currency field threaded through create/update schemas
- clients: currency field added to create/update schemas
- New expenses router: full CRUD with authorization
- New invoiceTemplates router: full CRUD, isDefault management per type
- Root router: wire in expenses and invoiceTemplates

Currency (src/lib/currency.ts):
- Shared formatCurrency(amount, currency) utility replacing hardcoded USD
- SUPPORTED_CURRENCIES list (17 currencies)
- Invoice form: currency selector in Config card, auto-fills from client
- Client form: currency selector in Billing Information card

Bulk actions (invoices list):
- Checkbox column with select-all support
- Selection toolbar: Mark as Sent/Paid/Draft dropdown, Delete (N) button
- DataTable: new selectionActions prop renders toolbar when rows selected

Notes templates:
- Invoice form: Notes card with textarea in Details tab
- Template dropdown button appears when templates exist
- /dashboard/invoices/templates: full CRUD page for notes and terms templates

New pages:
- /dashboard/expenses: expense list with summary cards, add/edit dialog
- /dashboard/reports: KPI cards, 12-month revenue area chart, top clients
  bar chart, status breakdown, recent activity
- Navigation: Expenses and Reports added to Main section

https://claude.ai/code/session_012sqEgNQpx676isepeoX4Mi
2026-04-05 02:34:06 +00:00
Claude ba14526fc5 Set up proper DB migrations and fix remaining mobile responsive issues
Migrations:
- drizzle.config.ts: add out: './drizzle' so drizzle-kit generate writes
  SQL migration files instead of only supporting push
- drizzle/0000_glossy_magneto.sql: initial migration capturing all 9
  current tables (users, accounts, sessions, verification_tokens,
  sso_providers, clients, businesses, invoices, invoice_items)
- src/server/db/migrate.ts: programmatic runner using drizzle-orm's
  migrate() — tracks applied migrations in __drizzle_migrations,
  safe to run on every deploy
- package.json: db:migrate now runs the programmatic runner instead of
  drizzle-kit migrate (CLI requires devDeps at runtime)
- start.sh: replace drizzle-kit push with bun src/server/db/migrate.ts
- Dockerfile: copy drizzle/ folder into the runner image so migrations
  are available at container startup

Mobile fixes:
- data-table.tsx: pagination buttons grow from 32px to 40px on mobile
  (h-10 w-10 md:h-8 md:w-8) to meet 44px touch-target guidelines
- floating-action-bar.tsx: stack left-content + action buttons to column
  layout on narrow screens (flex-col sm:flex-row), reduce padding on
  mobile (p-3 sm:p-4)
- revenue-chart.tsx: responsive chart height (h-48 md:h-64) so the chart
  doesn't consume too much vertical space on small screens

https://claude.ai/code/session_012sqEgNQpx676isepeoX4Mi
2026-04-05 01:59:08 +00:00
Claude 563d77ba65 Update README and improve mobile responsiveness for invoicing UI
- README: fix auth (better-auth), database (PostgreSQL), env vars,
  Docker setup, and feature list to reflect actual implementation
- InvoicesDataTable: show status badge + amount inline on mobile
  (previously hidden behind sm: breakpoint, leaving mobile users
  with no financial or status info at a glance)
- InvoiceItemsTable: hide Date/Hours/Rate columns on mobile and
  fold that info into the Description cell as secondary text
- invoice-view.tsx header card: wrap to column layout on mobile
  so status/amount/button don't overflow narrow screens; also
  improve item rows to show date, hours, and rate as subtext

https://claude.ai/code/session_012sqEgNQpx676isepeoX4Mi
2026-04-05 01:53:15 +00:00
soconnor fb5ffc3195 upd: upgrade dependencies and improve invoice form layout 2026-04-04 21:09:24 -04:00
soconnor 1b6dfbb460 Fix invoice edit cache invalidation issue
- Add cache invalidation after invoice create/update mutations
- Properly invalidate both getById and getAll queries
- Prevents stale data from being displayed after saving
- Fixes flaky behavior where updates didn't appear immediately
2026-01-14 13:21:49 -05:00
soconnor 01f3b408e9 upd: change plugin for oidc 2026-01-14 03:30:15 -05:00
soconnor ea9dc35323 db: push sso changes 2026-01-14 03:24:30 -05:00
soconnor 1cf3dc4d6f feat: manual account linking 2026-01-14 03:20:31 -05:00
soconnor 0696e488e6 feat: add account linking 2026-01-14 03:17:54 -05:00
soconnor 0d5aae3f1b fix: adding explicit JWKS URI to bypass discovery issues 2026-01-14 03:14:55 -05:00
soconnor ee98bc6fcb fix: redundancy for redirect 2026-01-14 03:10:10 -05:00
soconnor 9aa0179d2e fix: change domain 2026-01-14 03:05:27 -05:00
soconnor cba39f80dc fix: testing 2026-01-14 03:04:04 -05:00
soconnor c8ac5710cf fix: add trusted origins 2026-01-14 02:59:52 -05:00
soconnor b90eb6d426 fix: add issuer env 2026-01-14 02:50:57 -05:00
soconnor 07d1dd6fc3 fix: remove proxy 2026-01-14 02:47:42 -05:00
soconnor d5f337df80 fix: hide mock in prod 2026-01-14 02:36:27 -05:00
soconnor d4df1a5104 lib: update next 2026-01-14 02:34:55 -05:00
soconnor 302f3cb3f5 feat: add oidc support with authentik 2026-01-14 02:33:20 -05:00
soconnor 180f14dfb0 feat: improve invoice calendar item display and date picker icon button styling 2025-12-14 22:02:04 -05:00
soconnor 32cffa34fa feat: Enhance DatePicker and NumberInput components, refactor invoice line item UI, sort invoice items by date, and remove Vercel configuration. 2025-12-14 21:13:18 -05:00
soconnor ed0dacb435 feat: Implement a new CountUp component and refactor calendar day details to use a Sheet instead of a Dialog. 2025-12-14 02:16:29 -05:00
soconnor 91d410cbce refactor: Remove env.example, optimize invoice calendar item selection with derived state, and enhance invoice form's default hourly rate initialization and save button loading state. 2025-12-14 02:16:21 -05:00
soconnor 75c4362d97 fix: resolve all remaining type safety errors
- Create types.ts with proper TypeScript interfaces for dashboard data
- Replace all 'any' types in dashboard/page.tsx with DashboardStats and RecentInvoice
- Fix type safety in invoice-form.tsx:
  - Replace 'any' in updateItem with proper union type
  - Add generic type parameter to updateField for type safety
  - Fix status type assertion (any -> proper union type)
  - Replace || with ?? for safer null handling
- All TypeScript compilation errors resolved
- Lint down to 1 warning (false positive for 'loading' variable)
2025-12-11 20:15:29 -05:00
soconnor cf4ef928b8 fix: resolve majority of lint errors across codebase
- Remove unused imports from page.tsx, clients/page.tsx, invoices/page.tsx
- Remove unused imports from invoice-form.tsx, invoice-workspace.tsx
- Move CustomTooltip outside component in revenue-chart.tsx (fixes react-hooks/static-components)
- Fix type safety in umami.ts (any -> unknown)
- Fix type safety in sidebar-provider.tsx (add type assertion)
- Add no-op comments to empty fallback functions in animation-preferences-provider.tsx
- Fix type safety in invoice-workspace.tsx (any[] -> typed array)

Note: dashboard/page.tsx still has ~55 type safety warnings related to 'any' types
in stats/invoice data. These are pre-existing and would require significant refactoring
of the dashboard data flow to properly type. TypeScript compilation passes.
2025-12-11 20:05:34 -05:00
soconnor 50735b74ea fix: resolve lint errors in modified files
- Remove unused imports from invoice-form.tsx, sidebar.tsx, dashboard-shell.tsx
- Remove unused imports from dashboard.ts and calendar.tsx
- Fix unused parameter in invoice-calendar-view.tsx with underscore prefix
- Fix type-only import for DayButton in calendar.tsx
- All typecheck errors resolved
- Remaining lint errors are in unmodified files (pre-existing)
2025-12-11 20:01:04 -05:00
soconnor 1a3c2e08ce refactor: improve invoice editor UX and fix visual issues
- Remove clock icons and hour text from calendar month view, show only activity bars
- Fix calendar week view mobile layout (2-column grid instead of vertical stack)
- Update invoice form skeleton to match actual layout structure
- Add client-side validation for empty invoice item descriptions with auto-scroll to error
- Fix hourly rate defaulting logic with proper type guards
- Update invoice details skeleton to match page structure with PageHeader
- Fix hydration error in sidebar (div inside button -> span)
- Improve dashboard chart color consistency (draft status now matches monthly metrics)
- Fix mobile header layout to prevent text squishing (vertical stack on mobile)
- Add IDs to invoice line items for scroll-into-view functionality
2025-12-11 19:57:54 -05:00
soconnor 39fdf16280 feat: Implement a new dashboard shell with animated background, refactor dashboard data fetching into a dedicated API route, and introduce new UI components.** 2025-12-10 03:16:36 -05:00
soconnor ca6484aea5 hotfix: update next/react to patch RCE exploit 2025-12-03 20:44:07 -05:00
soconnor 77498967ec chore: update Next.js to 16.0.6 and refresh bun lockfile 2025-11-30 19:33:03 -05:00
soconnor 10d7500ef3 feat: integrate Umami analytics for client-side and server-side event tracking 2025-11-30 19:28:25 -05:00
soconnor e27877c477 fix: Ensure color theme syncs correctly by updating useEffect dependencies, refactor email base URL assignment, and add baseline-browser-mapping dependency. 2025-11-29 03:16:46 -05:00
soconnor 03579bc625 feat: Implement database persistence and synchronization for user theme preferences 2025-11-29 03:08:10 -05:00
soconnor a1c7b9223f feat: Remove Vercel Analytics, generalize deployment instructions, and switch base URL configuration to NEXT_PUBLIC_APP_URL. 2025-11-29 02:52:10 -05:00
soconnor 2fc03566d1 feat: introduce BETTER_AUTH_URL and NEXT_PUBLIC_APP_URL environment variables and update password reset link. 2025-11-29 02:47:30 -05:00
soconnor 079d9b6282 chore: Set database connection SSL configuration to false. 2025-11-29 02:39:09 -05:00
soconnor 5723ca07a8 feat: add trusted origin to authentication configuration. 2025-11-29 02:32:58 -05:00
soconnor a452526cbb refactor: Switch clone-local.sh to use local pg_dump/psql and remove an old Drizzle migration file. 2025-11-29 02:29:30 -05:00
soconnor 3ebec7aa4a refactor: migrate authentication system and update Drizzle schema. 2025-11-29 02:26:26 -05:00
soconnor c88e5d9d82 feat: Implement dynamic accent color selection and refactor appearance settings 2025-11-29 00:49:24 -05:00
soconnor 10e1ca8396 feat: Add comprehensive theme management with mode and color selectors, alongside new fonts. 2025-11-27 23:31:10 -05:00
soconnor 0809f75673 Disable ESLint during Next.js builds 2025-11-25 02:05:00 -05:00
soconnor 35ca35c28a Clean up unused imports and refactor type definitions
- Remove unused `cn` import from theme-selector - Remove unused `Slot`
import from badge - Remove unused `X` icon import from switch - Replace
empty interface extends with type alias in input - Replace empty
interface extends with type alias in textarea - Add "secondary" variant
to button type props - Replace "brand" variant with "default" in
client-list and invoice cards
2025-11-25 02:01:16 -05:00
soconnor 75ce36cf9c Update Next.js to v15.5.6 and upgrade dependencies
Bump Next.js from 15.4.5 to 15.5.6 and update related dependencies.

Also upgrade other packages to latest compatible versions including: -
Radix UI components (all minor version updates) - Tiptap editor (3.0.7 →
3.11.0) - React and React DOM (19.1.1 → 19.2.0) - TanStack Query (5.84.0
→ 5.90.10) - TypeScript and ESLint ecosystem - Tailwind CSS (4.1.11 →
4.1.17) - Various other patch and minor updates

Additionally add theme support with next-themes and multiple color
schemes (light, dark, sunset, forest).
2025-11-25 01:54:23 -05:00
soconnor a69b8f029b Improve PDF export error handling and logging
Add detailed logging for file-saver failures and fallback download
attempts. Wrap fallback logic in try-catch to handle edge cases where
manual download also fails, providing better debugging and user-facing
error messages.
2025-11-25 00:37:49 -05:00
soconnor fd6b490de1 Remove debug logging and simplify error handling 2025-11-24 21:47:47 -05:00
soconnor 843f9ceed0 Add fallback download method with MIME type handling
Implement a downloadBlob utility function that provides browser
compatibility by falling back to manual blob download when file-saver
fails. Explicitly set MIME type to application/pdf and add debugging
logging throughout the PDF generation and download process.
2025-11-24 21:47:04 -05:00
soconnor 543c553786 Update Next.js to version 15.4.2 and refactor invoice pages
- Upgrade Next.js and related packages for improved performance and security
- Refactor invoice-related pages to streamline navigation and enhance user experience
- Consolidate invoice editing and viewing functionality into a single page
- Remove deprecated edit page and implement a new view page for invoices
- Update links and routing for consistency across the dashboard
2025-08-11 22:37:40 -04:00