{"id":28690599,"url":"https://github.com/thunderbird/send-suite","last_synced_at":"2025-06-14T06:05:37.406Z","repository":{"id":284621791,"uuid":"645101386","full_name":"thunderbird/send-suite","owner":"thunderbird","description":"Send and share large files effortlessly with Thunderbird Send.","archived":false,"fork":false,"pushed_at":"2025-04-29T13:32:28.000Z","size":13356,"stargazers_count":101,"open_issues_count":103,"forks_count":2,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-06-08T21:11:34.372Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://send.tb.pro","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thunderbird.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-05-24T23:41:59.000Z","updated_at":"2025-06-07T07:53:42.000Z","dependencies_parsed_at":"2025-03-26T20:43:34.066Z","dependency_job_id":"080ba9f4-c471-4b8c-935d-7e607ca7f8c3","html_url":"https://github.com/thunderbird/send-suite","commit_stats":null,"previous_names":["thunderbird/send-suite"],"tags_count":73,"template":false,"template_full_name":null,"purl":"pkg:github/thunderbird/send-suite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thunderbird%2Fsend-suite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thunderbird%2Fsend-suite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thunderbird%2Fsend-suite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thunderbird%2Fsend-suite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thunderbird","download_url":"https://codeload.github.com/thunderbird/send-suite/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thunderbird%2Fsend-suite/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259768605,"owners_count":22908229,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-14T06:05:35.437Z","updated_at":"2025-06-14T06:05:37.399Z","avatar_url":"https://github.com/thunderbird.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# Thunderbird Send\n\nThunderbird Send is an end-to-end encrypted file sharing solution, allowing you to safely encrypt, password-protect and send files through our [website](https://send.tb.pro/) or as an [add-on](https://addons.thunderbird.net/en-US/thunderbird/addon/tb_send/?src=search) for your Thunderbird Desktop application.\n\nCurrently, we are in a closed alpha state. Meanwhile, please join our [waitlist](https://tb.pro/) to try it out during our beta period, or feel free to follow the guide below to run a local or self-hosted version for yourself!\n\n## Getting started\n\nWe have a detailed getting started guide in [our wiki](https://github.com/thunderbird/send-suite/wiki)\n\n## Prerequisites\n\nMake sure you install [docker](https://www.docker.com/get-started/) for local development.\n\nIf you're developing changes to the our account workflow, you'll need the following to run the server and use the client:\n\n- An account on the FXA staging server\n- The client id and secret for the FXA staging server (in 1Password, in the Services vault)\n\n## Setting up the apps\n\nClone this repo\n\n```sh\ngit clone git@github.com:thunderbird/send-suite.git\ncd send-suite\n```\n\nand install the package managers we use\n\n```sh\nnpm install -g bun\nnpm install -g pnpm\n```\n\nOr alternatively\n\n```sh\ncurl -fsSL https://bun.sh/install | bash\ncurl -fsSL https://get.pnpm.io/install.sh | sh -\n```\n\nFinally, install the dependencies (this command will install both frontend and backend)\n\n```sh\npnpm install\n```\n\n### Creating your environment\n\nYou can run the setup automatically with\n\n```sh\nlerna run setup:local --scope=send-suite\n```\n\nOr, if you wish to run this against staging FXA (requires client id and secret) do the following:\n\n```sh\nlerna run setup --scope=send-suite\n```\n\nThen edit the `packages/send/backend/.env` file to supply values for the FXA_CLIENT_ID and FXA_CLIENT_SECRET vars\n\nFinally, run the full stack (you can use this command anytime you want to run the application back again):\n\n```sh\nlerna run dev --scope=send-suite\n```\n\nCongrats! Now you should be able to see the app on `http://localhost:5173/` and the backend running on `https://localhost:8088/`\n\nIn order to login, you must create a new account. Click the \"Or register\" link and follow the prompts to create an account, which will then log you in to your local instance of Send.\n\n### Using the webapp\n\n- Visit `https://localhost:8088/` and accept the self-signed certificate\n  - In Firefox, you'll want to add an exception for this certificate\n- Then, you can open `http://localhost:5173/`\n- Click the `Profile` link in the sidebar and click `Log into Moz Acct`\n- After logging in, go to `My Files` in the sidebar\n\nFrom here, you can do things like create folders, upload files to folders, and create share links. (Note that the share links will only be valid on your machines, since they'll have `localhost` addresses.)\n\n## TB Extension\n\n### Building the TB Extension for development\n\nIf this is the first time you're building the extension, you'll need to install the tooling on the host:\n\n```sh\n# Install frontend dependencies\npnpm i --filter send-frontend\n```\n\nBuild the extension:\n\n```sh\nlerna run build:dev --scope=send-frontend\n```\n\nThis outputs an xpi file at `packages/send`, you should see something like `send-suite-0.1.22.xpi`.\n\n### Loading the TB Extension\n\nMake sure you add your localhost certificate. We have an\n[In depth guide](https://github.com/thunderbird/send-suite/issues/190).\n\nTo load this in Thunderbird:\n\n- Go to Settings and click `Add-ons and Themes` in the lower left-hand corner\n- In the \"Manage your Extensions\" window, click the gear icon in the upper right and choose `Debug Add-ons`\n- On the \"Mozilla Thunderbird\" page that appears, click the `Load Temporary Add-on...` button in the upper-right.\n- Navigate to the root directory and choose the xpi you generated earlier.\n\n### Using the Extension\n\n- After loading the extension, go to Settings and click `Composition` in the left-hand menu.\n- Scroll down to \"Attachments\" and click the `Add Thunderbird Send` button\n- In the Thunderbird Send configuration panel, click the `Log into Mozilla Account` button\n- In the popup, follow the Mozilla Account login flow\n- After you successfully log in, the popup should close (or you can manually close it)\n\nYou can now right-click attachments in emails and choose \"Convert to Thunderbird Send\". You'll be prompted for an optional password to protect the attachment.\n\nSuccessful conversion results in a \"beautiful\" link being added to your message body.\n\nNote: the link will only work on your local machine, as the URL is a `localhost` one. (But you should be able to open it in a browser and see that the file downloads and can be viewed).\n\n### Submitting .xpi to ATN\n\nMake sure you have a file named `.env.production` inside the frontend directory that contains the environment variables for production. Otherwise this will fail.\n\nRun\n\n```sh\nlerna run build-and-submit --scope=send-frontend\n```\n\nThis will create `frontend-source.zip` use it to upload to ATN when asked for source code.\nIt will also move your `.xpi` to the `packages/send` directory.\n\n## Pre-commit hooks\n\nWe use `lint-staged` + `husky` to run prettier and eslint on staged files.\n\nThe shell script lives on [.husky/pre-commit](./.husky/pre-commit)\n\n### Testing hooks\n\nAdd this line to the end of [.husky/pre-commit](./.husky/pre-commit)\n\n`exit 1`\n\nMake sure you commit a file you want to run `lint-staged` on\n\nRun this command:\n\n```\ngit commit -m \"testing pre-commit code\"\n# A commit will not be created\n```\n\nYou should see the output of the hook as if you actually commited your files.\n\n### Skipping hooks\n\nIf for some reason you're confident on a change and would like to skip pre-commit hooks. Add `--no-verify` at the end of your commit command.\n\n### More about hooks\n\nSee the `docs/` folder for a draft of the detailed documentation.\n\n[Here](https://typicode.github.io/husky/how-to.html#testing-hooks-without-committing) you can read more.\n\n### Authentication\n\nWe're using jwt tokens to authenticate users. Once they go through the login flow, they get a jwt token that is stored as a secure cookie. This is passed on every request to the backend automatically. We use this token to know who is making the request and by decoding it we get user data such as userId and email. We can set how many days the token is valid for and once it expires, the user has to log in again.\n\n### Public login\n\n(without FXA)\n\nIf you want to use the application without an FXA account, you can set these environment variables.\n\n`packages/send/backend/.env` to `ALLOW_PUBLIC_LOGIN=true`\n\n`packages/send/frontend/.env` to `VITE_ALLOW_PUBLIC_LOGIN=true`\n\n## Sentry\n\nMake sure you ask the team for `VITE_SENTRY_AUTH_TOKEN`\n\n## Debugging\n\n### VSCode debugger for the backend\n\nYou can use VSCode's debugger for the backend.\n\n1. Add this to your `.vscode/launch.json`\n\n```\n{\n  \"version\": \"0.2.0\",\n  \"configurations\": [\n    {\n      \"type\": \"node\",\n      \"request\": \"attach\",\n      \"port\": 9229,\n      \"restart\": true,\n      \"localRoot\": \"${workspaceFolder}/backend\",\n      \"name\": \"Docker: Attach to Node\",\n      \"remoteRoot\": \"/app\"\n    },\n  ]\n}\n\n```\n\n3. From the root, run `pnpm dev`\n\n4. Run your debug session. If you have multiple configs, make sure you run the one called `Docker: Attach to Node`\n\n### VSCode debugger for the frontend\n\n1. Run this command `code frontend` to open a session on the frontend package.\n\n2. Add this to your `.vscode/launch.json` file:\n\n```\n{\n  \"version\": \"0.2.0\",\n  \"configurations\": [\n    {\n      \"name\": \"Launch\",\n      \"type\": \"chrome\",\n      \"request\": \"launch\",\n      \"url\": \"http://localhost:5173/send\",\n      \"skipFiles\": [\n        \"\u003cnode_internals\u003e/**\",\n        \"${workspaceFolder}/node_modules/**/*.js\"\n      ],\n      \"enableContentValidation\": false,\n      \"webRoot\": \"${workspaceFolder}/src\",\n      \"pathMapping\": { \"url\": \"/src/\", \"path\": \"${webRoot}/\" }\n    }\n  ]\n}\n\n```\n\n3. Start a new debugging session. This will open a new chrome window that is connected to your VSCode session. Now you can add breakpoints and do all sorts of magic.\n\n## Testing\n\n### E2E testing\n\n### Setting up\n\n1. In order for the tests to run locally, you have to set up your `.env` files to match the default. This will overwrite your `.env` files. If you need to back up your keys before that you can run.\n\n```sh\ncd packages/send\ncd frontend\ncp .env .env.backup\ncd ../backend\ncp .env .env.backup\n```\n\n2. Set your environment variables by running `lerna run setup:local`\n\n3. Make sure you install playwright's dependencies by running:\n\n```sh\npnpm --filter=send-suite exec playwright install\n```\n\n#### UI mode\n\nYou can run the test suite on UI Mode. UI Mode lets you explore, run, and debug tests with a time travel experience complete with a watch mode. All test files are displayed in the testing sidebar, allowing you to expand each file and describe block to individually run, view, watch, and debug each test.\n\n1. Run `lerna run dev:detach --scope=send-suite`\n2. Run `lerna run test:e2e:ui --scope=send-suite`\n\n### Headless mode\n\nIf you want to run the tests just as they run on CI (headless mode), do the following.\n\n```sh\nlerna run dev:detach --scope=send-suite\nlerna run test:e2e:ci --scope=send-suite\n```\n\n#### CI mode\n\nOur CI/CD pipeline runs the test suite on headless mode. To reproduce this locally run `pnpm test:e2e:ci`\n\n## Releasing\n\nIn order to keep track of our releases, we need to set our versions on either the `frontend` or `backend` package.json. To bump the version, move to the directory and run `pnpm version patch` (you can use minor or major depending on your needs). This will bump the version number on package.json and the related files that need updating. The backend requires `config.stage.yaml` to match the version number, whereas the frontend requires `manifest.json` to match. This is done automatically as long as you handle the version via `pnpm version`\n\n## Storage\n\nWe're using Backblaze for our storage buckets.\n\nWe're uploading/downloading directly to the bucket using signed urls. In order for us to avoid CORS issues, we have to configure the buckets correctly.\n\nUsing the `b2` CLI, run the authorization command:\n\n`b2 account authorize`\n\nThis will prompt for your credentials. Make sure you use the master key and not a specific bucket key as it won't work.\n\nTo confirm that it worked, list the buckets from the account.\n`b2 ls`\n\nMove to the b2 rules directory\n`cd packages/send/backend/b2`\n\nUpdate the rules\n`b2 bucket update {YOUR_BUCKET_NAME} --cors-rules \"$(\u003c./rules.json)\"`\n\nUpdating retention rules\n`b2 bucket update {YOUR_BUCKET_NAME} --lifecycle-rule \"$(\u003c./retention.json)\"`\n\n### Troubleshooting Send\n\nSometimes npm packages get screwed you come back to the project after a while. You can have a clean run by running.\n\n```sh\nlerna clean\ncd packages/send\ndocker compose down\ndocker system prune -a --volumes\npnpm i\npnpm dev\n```\n\nIf you're having any issues with docker (ex: no memory left, or volumes do not contain expected files), prune docker and rebuild containers from scratch:\n\n```sh\ncd packages/send\ndocker compose down\ndocker system prune -a --volumes\ndocker-compose build --no-cache\n```\n\nThen run\n\n```sh\n# from packages/send\ndocker compose up -d\n```\n\nEverything should run well now\n\nWhen you're done with the project, you can run:\n\n```sh\n# from packages/send\ndocker compose down\n```\n\nThis stops containers and removes containers, networks, volumes, and images created by `dev`.\n\nNote: All named volumes are persisted. You can see these expressed as `volumes` on the `compose.yml` file.\n\n## Monorepo\n\n## Project management\n\nEach project inside the `packages` folder, contains a `package.json` where the `name` is used as the reference for command execution (we'll call this the package name). Each package is declared inside the `pnpm-workspace.yaml` and `lerna.json` files.\n\n## Install all dependencies\n\nIf you run `pnpm install` from the root. This command will install **all the dependencies** for all the packages inside the workspace.\n\n## Install partial dependencies\n\nIf you want to install only the dependencies for the projects you need, you can run the filter command and pass a glob pattern matching the ones you want. For example. If you want to install all dependencies for `send`, you can run\n\n`pnpm install --filter \"send-*\"`\n\nThis will only install the dependencies where the package name starts with `send-`.\n\n## Running commands\n\n_Note: Make sure you install the dependencies you need before running your commands._\n\nYou can run any package's commands by calling.\n\n`lerna run \u003cyour-command\u003e --scope=\u003cpackage-name\u003e`\n\nFor example, If I want to run e2e tests on send, I can run\n\n`lerna run test:e2e:ci --scope=send-suite`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthunderbird%2Fsend-suite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthunderbird%2Fsend-suite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthunderbird%2Fsend-suite/lists"}