How ishaanman7898/sharesecure works
ShareSecure is an encrypted file-sharing product with website, self-hosted, desktop, and local-MCP modes. The main workflow is to choose a file and sharing rules, encrypt it in the browser or local client, upload it, and give a recipient a private link; recipients open or download the file before expiry. Other documented capabilities include username sends and requests, branching reshares, account access controls, and assistant integrations. The graph combines documented flows with source-index references; unsampled routes are grouped only where the tree supports their subsystem.
Main entry points: _turso.js Website API · index.js Self-host server · app.js Sharing interface · upload.js File upload
Components 26
Website sharing
- Sharing interface
public/app.js - File upload
functions/api/upload.js - Link delivery
functions/api/send/[shortId].js - Recipient viewer
public/viewer.js - Requests inbox
functions/api/inbox/index.js - Accounts and access
functions/_auth.js - Reshare and deletion
functions/api/reshare/[shortId].js - Website API
functions/_turso.js - Website database
functions/_turso.js
Privacy and keys
- File type rules
public/filetypes.js - File encryption
public/sealed.js - Key management
public/keys.js - Anonymous tokens
public/tokens.js
Self-hosted service
- Self-host server
server/index.js - Owner authentication
server/routes/auth.js - Username delivery
server/routes/cloud.js - Self-host inbox
server/routes/inbox.js - Local file routes
server/routes/files.js - Local database
server/db.js - Expiry and erasure
server/purge.js - Desktop app
desktop/main.js
Assistant integrations
- Local MCP tools
packages/sharesecure-mcp/src/tools.js - Local MCP server
packages/sharesecure-mcp/src/server.js - Hosted MCP tools
functions/_mcp.js
Other components
- Sender
- AI assistant
Connections 32
- Sender → Sharing interface: selects and configures
- Sharing interface → File encryption: encrypts file
public/app.js - Sharing interface → File upload: uploads sealed file
- File upload → Website API: stores upload metadata
functions/api/upload.js - Website API → Website database: reads and writes
functions/_turso.js - File upload → File type rules: checks file type
functions/api/upload.js - Sharing interface → Key management: uses keys
public/app.js - Sharing interface → Anonymous tokens: uses tokens
public/app.js - Link delivery → Website API: routes send requests
functions/api/send/[shortId].js - Link delivery → Requests inbox: delivers to inbox
- Recipient viewer → File encryption: decrypts file
public/viewer.js - Recipient viewer → Website API: requests shared file
- Accounts and access → Website API: authorizes account actions
functions/_auth.js - Reshare and deletion → Website API: updates share records
- Self-host server → Owner authentication: mounts auth routes
server/index.js - Self-host server → Local file routes: mounts file routes
server/index.js - Self-host server → Self-host inbox: mounts inbox routes
server/index.js - Self-host server → Username delivery: mounts cloud routes
server/index.js - Owner authentication → Local database: reads and writes
server/routes/auth.js - Local file routes → Local database: reads and writes
server/routes/files.js - Self-host inbox → Local database: reads and writes
server/routes/inbox.js - Local file routes → Expiry and erasure: purges shares
server/routes/files.js - Self-host server → Expiry and erasure: purges expired files
server/index.js - Username delivery → Website API: calls website API
server/routes/cloud.js - Desktop app → Self-host server: starts local service
desktop/main.js - AI assistant → Local MCP server: connects locally
- Local MCP server → Local MCP tools: dispatches tools
packages/sharesecure-mcp/src/server.js - Local MCP tools → File encryption: encrypts local files
- Local MCP tools → Website API: uploads and sends
- AI assistant → Hosted MCP tools: calls hosted MCP
- Hosted MCP tools → Website API: uses website API
functions/_mcp.js - Hosted MCP tools → Requests inbox: lists inbox
functions/_mcp.js