Commit Graph

1753 Commits

Author SHA1 Message Date
fe77dbdcdd add encryption & decryption for the sensitive identity & mnemonic in SQL DB 2025-05-26 22:42:20 -06:00
Matthew Raymer
4d35760a65 fix: move lexical declarations outside case blocks
fix: missing logger import
Move variable declarations outside switch statement in AbsurdSqlDatabaseService
to fix 'no-case-declarations' linter errors.
2025-05-27 03:21:55 +00:00
Matthew Raymer
dac7705003 fix: move lexical declarations outside case blocks in AbsurdSqlDatabaseService
- Move queryResult and allResult declarations outside switch statement
- Change const declarations to let since they're now in outer scope
- Remove const declarations from inside case blocks

This fixes the 'no-case-declarations' linter errors by ensuring variables
are declared in a scope that encompasses all case blocks, preventing
potential scoping issues.

Note: Type definition errors for external modules remain and should be
addressed separately.
2025-05-27 03:14:02 +00:00
7cc35803c9 remove debugging console statements 2025-05-26 20:43:06 -06:00
84cc501951 start adding the SQL approach to files, also using the Dexie approach if desired 2025-05-26 20:26:28 -06:00
3f46e3817a add encryption for the two SQL columns, replace basic DB utils, add USE_DEXIE_DB flag, and start adding SQL everywhere 2025-05-26 19:03:20 -06:00
6e005de65a remove unused redirect to start page (now that we're creating an ID up front) 2025-05-26 16:29:10 -06:00
611fa232da add queueing to the DB service so that requests get processed in order 2025-05-26 16:28:33 -06:00
8fb49f5279 remove possibility of failing a migration script and then succeeding on later ones 2025-05-26 15:50:37 -06:00
c1d730f586 fix console error about "window" unavailable due to service worker 2025-05-26 15:49:44 -06:00
f0c947ba07 rename the absurd-sql-specific items for clarity 2025-05-26 14:52:39 -06:00
0e10847cba adjust so DB calls go to the factory 2025-05-26 13:59:34 -06:00
bb0d8942b8 fix migrations logging error 2025-05-25 21:52:27 -06:00
Matt Raymer
8b734e4ffb Merge remote-tracking branch 'refs/remotes/origin/sql-absurd-sql' into sql-absurd-sql 2025-05-25 23:37:43 -04:00
Matt Raymer
152499a34f refactor: improve type safety and browser compatibility - Replace any types with SqlValue[] in migration system - Add browser-compatible implementations of Node.js modules (crypto, fs, path) - Update Vite config to handle Node.js module polyfills - Remove outdated migration documentation files 2025-05-25 23:37:08 -04:00
4500ab5038 fix BUILDING instructions 2025-05-25 21:29:57 -06:00
Matt Raymer
9492018fd6 refactor(db): improve type safety in migration system
- Replace any[] with SqlValue[] type for SQL parameters in runMigrations
- Update import to use QueryExecResult from interfaces/database
- Add proper typing for SQL parameter values (string | number | null | Uint8Array)

This change improves type safety and helps catch potential SQL parameter
type mismatches at compile time, reducing the risk of runtime errors
or data corruption.
2025-05-25 23:09:53 -04:00
Matt Raymer
fe1e198992 chore: update migration documents and move to new home 2025-05-25 22:50:32 -04:00
Matt Raymer
dda1e763d1 Merge remote-tracking branch 'refs/remotes/origin/sql-absurd-sql' into sql-absurd-sql 2025-05-25 22:47:36 -04:00
17727a3ff7 add to build instructions for electron on mac 2025-05-25 20:48:51 -06:00
26fba66bba fix linting 2025-05-25 20:48:33 -06:00
d6f9567777 don't always apply the camera-implementation cursor rules 2025-05-25 20:37:16 -06:00
28b24f6c5d add a input area for arbitrary SQL on the test page 2025-05-25 20:27:06 -06:00
Matt Raymer
1f82a5b328 Merge branch 'new-storage' into sql-absurd-sql 2025-05-25 22:25:56 -04:00
bea5f78171 fix problems with race conditions and multiple DatabaseService instances 2025-05-25 19:46:15 -06:00
d4b01e0cbf fix problem with initialization & refactor types 2025-05-25 18:32:41 -06:00
60be32e120 add more to the inital migration, and refactor the locations of types 2025-05-25 17:55:04 -06:00
b597b17eec remove unused setting 2025-05-25 15:49:36 -06:00
c14c2d173e add DB setup with migrations 2025-05-25 11:06:30 -06:00
a48a122224 fix error loading WASM file 2025-05-25 07:45:07 -06:00
Matt Raymer
a903a6d664 feat(db): Implement SQLite database layer with migration support
Add SQLite database implementation with comprehensive features:

- Core database functionality:
  - Connection management and pooling
  - Schema creation and validation
  - Transaction support with rollback
  - Backup and restore capabilities
  - Health checks and integrity verification

- Data migration:
  - Migration utilities from Dexie to SQLite
  - Data transformation and validation
  - Migration verification and rollback
  - Backup before migration

- CRUD operations for all entities:
  - Accounts, contacts, and contact methods
  - Settings and secrets
  - Logging and audit trails

- Type safety and error handling:
  - Full TypeScript type definitions
  - Runtime data validation
  - Comprehensive error handling
  - Transaction safety

Note: Requires @wa-sqlite/sql.js package to be installed
2025-05-25 04:52:16 -04:00
5ae3eca773 add the other pieces for the previous commit 2025-05-25 01:18:58 -06:00
Matt Raymer
861ed9dd2d docs: add comprehensive migration guide for Dexie to wa-sqlite
- Add detailed migration process documentation including preparation, data migration, and rollback strategies\n- Include TypeScript implementation examples for MigrationService, DataMigration, and RollbackService\n- Add Vue component for migration progress tracking with error handling\n- Document testing strategy with unit and integration test examples\n- Define clear success criteria and timeline for migration\n- Include platform-specific considerations and prerequisites\n- Add post-migration verification and monitoring guidelines
2025-05-25 03:18:12 -04:00
Matt Raymer
f45095cb43 docs: enhance secure storage implementation documentation
- Add comprehensive platform-specific implementations for web and native platforms

- Include detailed error handling and recovery strategies

- Add complete testing strategy with platform-specific tests

- Add practical before/after usage examples

- Add appendix with schema, error codes, and platform capabilities

- Improve documentation structure and readability

- Add migration strategy for web platform

- Include platform-specific security features and optimizations
2025-05-25 03:16:12 -04:00
3650b55e81 try absurd-sql, which fails in browser with: SyntaxError: Cannot use import statement outside a module (at registerSQLWorker.js... 2025-05-25 01:06:31 -06:00
Matt Raymer
1e1e46c869 docs: enhance secure storage implementation documentation
Add detailed platform implementations, usage examples, and error handling: - Add comprehensive platform-specific implementations for Web (Dexie) and Capacitor (SQLite) - Include detailed database initialization and security features - Add practical usage examples for account and settings management - Document error handling strategies and edge cases - Add concurrency management and data integrity checks - Include platform transition handling

This update provides a complete reference for implementing secure storage across different platforms while maintaining backward compatibility.
2025-05-24 23:37:09 -04:00
6677a0fef2 tweak messages & commentary 2025-05-24 20:55:54 -06:00
0c356454e8 add documentation for some new work: storage 2025-05-24 18:22:05 -06:00
4722cde404 adjust privacy notice with the name 2025-05-23 13:07:56 -06:00
55302f44c9 adjust the messaging for setting one's name 2025-05-23 13:04:49 -06:00
9b9e263ab1 remove duplicate prompt to get registered 2025-05-23 12:59:57 -06:00
df5a719a24 add more error handling and messaging when there are bad DB errors 2025-05-23 12:35:16 -06:00
e356fd826c show an error if the import goes badly 2025-05-23 11:09:22 -06:00
e49ddffd54 don't export 0s for undefined values! 2025-05-23 11:06:37 -06:00
Jose Olarte III
feede3a2a8 Fix: mirror camera view
- Always when using a desktop browser
- NEEDS TESTING: Conditionally in mobile
2025-05-23 19:21:20 +08:00
Jose Olarte III
40f0c163ee Fix: limit image crop stage height
- Addresses issue when extra-tall portrait images are uploaded for cropping
2025-05-23 17:25:22 +08:00
aadd223248 various instructions (and their timeouts) 2025-05-22 12:27:37 -06:00
Jose Olarte III
b8f69ba4e7 Revert iOS app ID 2025-05-22 22:36:16 +08:00
Jose Olarte III
e2787e3afa De-coupled web and mobile QR scanner views
- Separate scanner views for web and mobile platforms: different libraries, similar layouts
- Mobile: QR code overlaid on top of full-screen camera view
- Mobile: added framing box + instruction text
- Mobile: increased debounce time to compensate for behavior of MLkit scanner
- Web: removed Capacitor-related code and platform-specific conditions
- Web: adjusted max-size of QR code and camera view to better fit newer iOS device screens
- Web + mobile: camera view remains active when a QR scan is triggered
2025-05-22 19:46:19 +08:00
Matt Raymer
10df60316a Remove ContactScanView and rename ContactQRScanView to ContactQRScanFullView
- Deleted ContactScanView.vue and its route from the router.
- Renamed ContactQRScanView.vue to ContactQRScanFullView.vue.
- Updated all router paths, names, and references for consistency.
- Fixed related links and imports to use the new view/component name.
2025-05-21 05:17:25 -04:00