Commit Graph

314 Commits

Author SHA1 Message Date
Christomatt 8ea7fb75eb fix: type error - storageEndpoint null to undefined 2026-02-01 02:58:29 +01:00
Christomatt 1f171e127f fix: remove duplicate owner variable in botManager 2026-02-01 02:55:48 +01:00
Christomatt f55dec9a60 feat: user-owned S3-compatible storage with credential verification 2026-02-01 02:51:52 +01:00
Christomatt a8252a1809 Fix docker-compose healthcheck: use 127.0.0.1 instead of localhost 2026-01-31 07:44:43 +01:00
Christomatt e75cbf3724 Move ALL dependencies to production deps, remove devDependencies entirely 2026-01-31 07:42:26 +01:00
Christomatt 15a837ac82 Fix Docker: copy node_modules to runner stage for migrations 2026-01-31 07:41:21 +01:00
Christomatt 526ba8bed3 Move dotenv to dependencies (needed for drizzle.config.ts) 2026-01-31 07:40:34 +01:00
Christomatt 7228edb995 Fix Docker: move drizzle-kit to dependencies, fix healthcheck IPv6 issue 2026-01-31 07:21:51 +01:00
Christomatt 99da98f811 Fix: install drizzle-kit locally (not just globally) 2026-01-31 06:58:51 +01:00
Christomatt 82f8d77abe Fix migrations - include schema.ts and use npm run db:push 2026-01-31 06:52:05 +01:00
Christomatt c512ecea80 Fix Docker migrations - install pg driver and improve entrypoint 2026-01-31 06:27:36 +01:00
Christomatt bf9f0a3335 Fix Docker image to include drizzle-kit and auto-run migrations on startup 2026-01-31 05:00:59 +01:00
Christomatt fd9687be78 Add database migration service to docker-compose 2026-01-31 04:58:49 +01:00
Christomatt c69a968889 Change to manual Docker builds - workflow_dispatch only 2026-01-31 04:42:47 +01:00
Christomatt e44aa7532d Remove SBOM generation - fixes build failure 2026-01-31 04:40:12 +01:00
Christomatt cb5177ba04 Re-enable ARM64 support now that billing is resolved 2026-01-31 04:25:16 +01:00
Christomatt 0ad5f96e92 Fix Docker workflow - simplify to amd64 only for faster builds 2026-01-31 04:19:11 +01:00
Christomatt 05d2b71747 Resolve merge - use local Docker workflow 2026-01-31 04:14:15 +01:00
Christomatt e31990fdfd Add GitHub Actions workflow for Docker image builds
- Build and push to GHCR on every push to main
- Multi-platform support (amd64, arm64)
- Root-level docker-compose.yml using pre-built image
- Users can now deploy without cloning repo
2026-01-31 04:13:50 +01:00
Christomatt 2a9c91d623 feat: Add GitHub Container Registry (GHCR) support with automated builds
- Add GitHub Actions workflow to build and push Docker images to GHCR
- Create root-level docker-compose.yml using pre-built ghcr.io/cyph3rasi/synapsis:latest image
- Update docker/README.md with new simplified installation instructions
- Update main README.md with quick start Docker instructions
- Users can now deploy without cloning: just download compose file + Caddyfile + .env
- Supports automatic tagging: latest, semver, sha, branch names
- Multi-platform builds: linux/amd64, linux/arm64
- Includes SBOM generation for security tracking
2026-01-31 04:11:14 +01:00
Christomatt df5b61f42a Add Docker deployment setup with health check endpoint
- Add multi-stage Dockerfile with standalone Next.js output
- Add docker-compose.yml with Caddy reverse proxy
- Add nginx configs for local and SSL setups
- Add Caddyfile for automatic HTTPS
- Add docker-entrypoint.sh for runtime config
- Add .env.example and .dockerignore
- Add comprehensive Docker README
- Add /api/health endpoint for container health checks
- Configure next.config.ts for standalone output
2026-01-31 03:53:19 +01:00
Clawd Deploy Bot 50355b740a Security fixes: swarm signature verification and error handling 2026-01-30 16:50:49 +01:00
Christomatt 495a037eb1 feat: Add optional publicKey field to interaction type. 2026-01-30 08:47:26 +01:00
Christomatt 374bfadc74 feat: Add public key to user profiles in API responses and update user caching logic to store and manage it. 2026-01-30 05:16:49 +01:00
Christomatt 10a54a0ea9 feat: Implement identity lock screen for sensitive user actions and introduce avatar generation. 2026-01-30 04:44:57 +01:00
Christomatt 4c9afa42fe feat: Improve user resolution for chat conversations by handling local domain suffixes and pre-fetching message sender details. 2026-01-29 12:15:13 +01:00
Christomatt 705e7cd23f feat: Add debug logging and enhance error messages for remote chat delivery failures. 2026-01-29 11:17:26 +01:00
Christomatt 1f115d569f feat: Use X-Swarm-Source-Domain header to identify the sender's node domain in chat messages. 2026-01-29 06:58:17 +01:00
Christomatt 645e9a6670 fixed build error 2026-01-29 01:03:03 +01:00
Christomatt 9710a16f83 feat: Implement remote user profile caching and enhance chat conversation list display with updated styling. 2026-01-29 01:00:22 +01:00
Christomatt 491eb07fea fix: Validate user object before accessing DID and clarify error message for missing identity. 2026-01-29 00:08:29 +01:00
Christomatt c47b0141f5 feat: Remove chat key management and debug endpoints, simplify chat message handling, and enhance migration page with DM and bot export capabilities. 2026-01-29 00:04:22 +01:00
Christopher 9cd23081ed fixed modal 2026-01-28 13:18:26 -08:00
Christomatt aebc3a81fc package.json. 2026-01-28 22:14:40 +01:00
Christomatt 605f6d8422 feat: Introduce a dedicated development environment setup with .env.dev and a dev:dev script. 2026-01-28 22:06:41 +01:00
Christopher ceae76d58f Refactor chat system to remove E2EE and simplify messaging
Removed all E2EE chat endpoints, crypto logic, and related API routes, transitioning chat to plain text storage and transport. Updated chat send/receive endpoints to use signed actions and enforce DM privacy settings. Cleaned up Swarm chat inbox, key management, and related debug endpoints. Updated user profile to support DM privacy, improved search for handle queries, and refactored conversation/message logic to support the new model. Migrated bot settings and privacy settings to new locations.
2026-01-28 13:05:34 -08:00
Christopher b52b3f9804 Remove lastSeenAt from handle update in chat API
The lastSeenAt field is no longer set when updating the handle in the chat receive API route. This may be due to a change in how user activity is tracked or to simplify the update payload.
2026-01-28 07:55:38 -08:00
Christopher ced2b958ed Upsert sender into HandleRegistry on message receive
Adds logic to upsert the sender's handle, DID, and node domain into the HandleRegistry when a chat message is received. This ensures the sender's information is available for future replies or key retrieval.
2026-01-28 07:53:23 -08:00
Christopher 558c1aecdf Ensure chat key fetches bypass cache
Added `{ cache: 'no-store' }` to fetch requests for chat keys in both the chat page and useSodiumChat hook to prevent stale key data. Also updated the chat key query to order by `lastSeenAt` descending, ensuring the most recent bundle is retrieved.
2026-01-28 07:48:10 -08:00
Christopher 28f561f689 Sync chat public key to users table and fix handle formatting
The chat public key is now also updated in the users table during key publishing for profile discovery. Additionally, sender handles in chat receive are now fully qualified with domain when necessary to ensure consistency in conversation and message storage.
2026-01-28 07:43:05 -08:00
Christopher 93a587f185 Refactor chat page useEffect organization and improve compose intent handling
Reorganizes useEffect hooks in chat/page.tsx to follow a helper-functions-first structure, improving readability and maintainability. Adds error handling and user feedback for compose intent, preventing UI flash while processing. In send/route.ts, ensures remote user handles are fully qualified and adds debug logging. Temporarily disables key caching in keys/route.ts to address development key mismatches.
2026-01-28 07:37:27 -08:00
Christopher a21af87144 Implement federated chat message sending and receiving
Adds /api/chat/receive endpoint to accept federated chat messages from remote nodes and store them for local users. Updates /api/chat/send to support sending messages to remote nodes by resolving recipient domains, posting to their /api/chat/receive endpoint, and storing a local copy of the sent message. Enables basic cross-node chat federation.
2026-01-28 07:27:44 -08:00
Christopher 70b86244a7 Refactor Base64 variant handling in tryDecodeBase64
Simplifies and clarifies the logic for selecting Base64 variants by using a Set to ensure uniqueness and order. This change improves maintainability and robustness when decoding Base64 strings with different variants.
2026-01-28 07:22:11 -08:00
Christopher f678f1f87e Refactor handle registry updates and improve key decoding
Removed 'healing' logic and authoritative update propagation from handle registry and gossip code, simplifying handle upserts to only update on strictly newer timestamps. Enhanced sodium-chat key handling with robust base64 decoding and key repair logic. Added scripts for key inspection and crypto testing. Deleted unused healing module.
2026-01-28 07:16:15 -08:00
Christopher 36f653d500 Improve handle registry healing and gossip propagation
Added healing utilities to update the handle registry when a user profile is found at a new node domain. Enhanced upsertHandleEntries to accept a sourceDomain parameter, allowing authoritative updates from the owning node. Updated gossip logic to pass sender/target domains for proper trust handling during handle propagation. Integrated healing logic into chat key lookup to keep the registry accurate.
2026-01-28 06:55:13 -08:00
Christopher 213dcc8095 Enhance chat key lookup with remote and cache fallback
The GET /api/chat/keys endpoint now checks a remote identity cache and, if necessary, fetches keys from remote nodes or Swarm user profiles when a local key is not found. Results from remote lookups are cached for 24 hours to improve performance and reliability.
2026-01-28 06:45:28 -08:00
Christopher 4ab464bcaa Fix crypto_generichash usage in useUserIdentity
Adds the missing third argument (null) to sodium.crypto_generichash to ensure correct hashing behavior when generating the salt for storage key derivation.
2026-01-28 06:16:35 -08:00
Christopher 015d4ecbd8 Add check for user DID before key verification
Throws an error if the user DID is not available before attempting to verify the key on the server, preventing potential runtime errors.
2026-01-28 06:12:51 -08:00
Christopher a87977241c Refactor chat encryption to use sodium, update API
Replaces legacy chat encryption modules with new sodium-based implementation. Adds and updates API routes for chat key management and debugging, introduces new hooks and scripts for sodium chat, and updates related database schema and configuration. Removes old crypto modules and updates dependencies accordingly.
2026-01-28 06:07:03 -08:00
Christopher 222f1c6d8a Add sender DID resolution and self-decryption for chat messages
The messages API now resolves and includes sender DIDs for received messages, enabling proper decryption in the chat UI. The chat page adds logic to decrypt self-encrypted messages for sent items and improves V2 envelope handling, while useChatEncryption now serializes ratchet state before storage.
2026-01-27 22:06:47 -08:00