Commit Graph

57 Commits

Author SHA1 Message Date
Cameron a6cc64ece0 Bump to version 0.5.2 2026-01-26 20:05:42 -05:00
Cameron Cordes 85e6567674 Bump to 0.5.1 2026-01-18 19:17:53 -05:00
Cameron b2cc617bc2 Pass image as additional Insight context 2026-01-10 11:30:01 -05:00
Cameron d86b2c3746 Add Google Takeout data import infrastructure
Implements Phase 1 & 2 of Google Takeout RAG integration:
- Database migrations for calendar_events, location_history, search_history
- DAO implementations with hybrid time + semantic search
- Parsers for .ics, JSON, and HTML Google Takeout formats
- Import utilities with batch insert optimization

Features:
- CalendarEventDao: Hybrid time-range + semantic search for events
- LocationHistoryDao: GPS proximity with Haversine distance calculation
- SearchHistoryDao: Semantic-first search (queries are embedding-rich)
- Batch inserts for performance (1M+ records in minutes vs hours)
- OpenTelemetry tracing for all database operations

Import utilities:
- import_calendar: Parse .ics with optional embedding generation
- import_location_history: High-volume GPS data with batch inserts
- import_search_history: Always generates embeddings for semantic search

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-05 14:50:49 -05:00
Cameron 11e725c443 Enhanced Insights with daily summary embeddings
Bump to 0.5.0. Added daily summary generation job
2026-01-05 09:13:16 -05:00
Cameron 43b7c2b8ec Remove dialoguer dependency 2026-01-03 20:32:00 -05:00
Cameron 1171f19845 Create Insight Generation Feature
Added integration with Messages API and Ollama
2026-01-03 10:30:37 -05:00
Cameron 2d915518e2 Bump to 0.4.1 2025-12-29 19:51:21 -05:00
Cameron 2c52cffd65 Implement critical security improvements for authentication
This commit addresses several security vulnerabilities in the authentication
and authorization system:

1. JWT Encoding Panic Fix (Critical)
   - Replace .unwrap() with proper error handling in JWT token generation
   - Prevents server crashes from encoding failures
   - Returns HTTP 500 with error logging instead of panicking

2. Rate Limiting for Login Endpoint (Critical)
   - Add actix-governor dependency (v0.5)
   - Configure rate limiter: 2 requests/sec with burst of 5
   - Protects against brute-force authentication attacks

3. Strengthen Password Requirements
   - Minimum length increased from 6 to 12 characters
   - Require uppercase, lowercase, numeric, and special characters
   - Add comprehensive validation with clear error messages

4. Fix Token Parsing Vulnerability
   - Replace unsafe split().last().unwrap_or() pattern
   - Use strip_prefix() for proper Bearer token validation
   - Return InvalidToken error for malformed Authorization headers

5. Improve Authentication Logging
   - Sanitize error messages to avoid leaking user existence
   - Change from "User not found or incorrect password" to "Failed login attempt"

All changes tested and verified with existing test suite (65/65 tests passing).

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-26 23:53:54 -05:00
Cameron f0d482af12 Optimize release build times with thin LTO
Switch from fat LTO to thin LTO for faster release builds while maintaining similar performance characteristics.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-24 10:21:47 -05:00
Cameron 47d3ad7222 Add polling-based file watching
Remove notify and update otel creates
2025-12-22 22:54:19 -05:00
Cameron aaf9cc64be Add Cleanup binary for fixing broken DB/file relations 2025-12-18 16:02:15 -05:00
Cameron 52e1ced2a2 Improved image caching and CORS handling 2025-12-17 22:36:03 -05:00
Cameron 445b82b21a Bump to 0.4.0 2025-12-17 22:17:54 -05:00
Cameron 4082f1fdb8 Add Exif storing and update to Metadata endpoint 2025-12-17 16:55:48 -05:00
Cameron f02a858368 Bump to 0.3.1 and format/clippy 2025-12-01 13:04:55 -05:00
Cameron 273b877e16 Update to Rust 2024 edition
Formatted code.
2025-09-01 13:36:27 -04:00
Cameron 544256f658 Bump to 0.3.0 2025-08-15 23:22:05 -04:00
Cameron 8114204485 Update Otel 2025-08-15 23:18:53 -04:00
Cameron 85093ff0c7 Add parsing date from filename for memories 2025-08-12 20:55:22 -04:00
Cameron e5afdd909b Serve video gifs when requested 2025-07-02 15:48:49 -04:00
Cameron 24d2123fc2 Fix recursive-any tag counting
This is bad security wise so it'll need another pass.
2025-05-18 19:57:16 -04:00
Cameron d6451ee782 Add Simple OpenTelemetry setup 2025-05-06 20:15:03 -04:00
Cameron 04a7cb417f Bump app version to 0.2.0 2024-12-05 20:30:45 -05:00
Cameron 18ba5796b0 Update to rust 2021
Fix tests
2024-12-05 20:27:01 -05:00
Cameron 0419aa2323 Scan and generate Video HLS playlists on startup
Refactored and improved video path state. Bumped versions of some dependencies.
2024-12-05 20:19:03 -05:00
Cameron 6986540295 Add sorting shuffle, and name asc/desc 2024-11-23 19:13:25 -05:00
Cameron 287a61ae3f Update dependencies, improve startup logging 2024-11-23 12:14:12 -05:00
Cameron Cordes 17012fc447 Merge branch 'master' into feature/include-tag-counts 2024-01-17 22:47:46 -05:00
Cameron Cordes 5bbc775d3a Update to Watcher 6
Improve upload performance by relying on the file watcher instead of
synchronously creating thumbnails before responding to the client.
2024-01-17 22:25:18 -05:00
Cameron Cordes 7e11448ada Update dependencies 2023-12-02 14:23:51 -05:00
Cameron Cordes 68bfcbf85f Update and Migrate Diesel to 2.0
Almost have tag support working, still figuring out how to get photo
tags.
2023-03-18 14:43:41 -04:00
Cameron Cordes c8cae28c9f Merge branch 'master' into feature/tagging 2022-03-17 21:53:17 -04:00
Cameron Cordes 69fe307516 Update to Actix 4
Core Repos/ImageApi/pipeline/pr-master There was a failure building this commit
2022-03-01 20:38:41 -05:00
Cameron Cordes 2d6db6d059 Update dependencies 2021-10-11 21:52:06 -04:00
Cameron Cordes 2c50b4ae2f Add anyhow, Improve Auth token code
Moved test helper code to its own module.
2021-10-07 20:32:36 -04:00
Cameron Cordes 0e972509aa Update dependencies
Core Repos/ImageApi/pipeline/pr-master This commit looks good
2021-07-08 16:53:50 -04:00
Cameron Cordes a79179c5c3 Add Image and Video total gauges 2021-04-30 23:53:10 -04:00
Cameron Cordes 6abc99d9b6 Add PrometheusMetrics 2021-04-05 20:14:34 -04:00
Cameron Cordes 1b2aad0f08 Revert back to actix 0.10
Core Repos/ImageApi/pipeline/head Something is wrong with the build of this commit
Core Repos/ImageApi/pipeline/pr-master This commit looks good
Until Actix Web 4, we need to use an older version of actix so that the
runtime's match up to version 1.
2021-03-29 14:59:42 -04:00
Cameron Cordes 7474c4d310 Update dependencies
Core Repos/ImageApi/pipeline/head Something is wrong with the build of this commit
Core Repos/ImageApi/pipeline/pr-master This commit looks good
Update dependencies and remove some features from the image crate that
are unused.
2021-03-27 17:25:52 -04:00
Cameron Cordes 1c7e54d355 Make playlist generation async
This should allow other requests to be answered while we wait for ffmpeg
to do its thing.
2021-02-27 11:53:29 -05:00
Cameron Cordes 72e41b99a1 Remove Actix CORS dependency 2021-02-25 14:42:23 -05:00
Cameron Cordes 45aa260d7b Merge branch 'master' into feature/update-dependencies
Core Repos/ImageApi/pipeline/head Something is wrong with the build of this commit
Core Repos/ImageApi/pipeline/pr-master This commit looks good
2021-02-25 10:44:28 -05:00
Cameron Cordes f9983240df Use log crate for logging instead of println
Core Repos/ImageApi/pipeline/head This commit looks good
Core Repos/ImageApi/pipeline/pr-master This commit looks good
2021-02-24 21:26:11 -05:00
Cameron Cordes b0a9cd6327 Update Actix, tokio and hashing libraries
Core Repos/ImageApi/pipeline/head This commit looks good
2021-02-15 20:39:14 -05:00
Cameron Cordes 11d1e9600a Use an Actor for the Stream watching
Core Repos/ImageApi/pipeline/pr-master This commit looks good
2021-02-11 20:39:07 -05:00
Cameron Cordes f20a8a5842 Update dependencies, disable registration and improve path handling 2021-02-02 13:57:51 -05:00
Cameron Cordes eccb45ced0 Use Absolutize for files that do not exist
Canonicalize relies on the file existing to resolve the potential
traversal, which won't work for file upload in case the file name has a
traversal inside it.
2020-10-17 19:22:55 -04:00
Cameron Cordes 2343351a4d Add file watcher to re-generate thumbnails
Previously files added while the server is running would not have
thumbnails until after the server was restarted. Now we watch the
BASE_PATH for added/renamed files in order to re-gen the thumbnail.
2020-09-13 21:36:34 -04:00