{"id":23920603,"url":"https://github.com/simplito/privmx-bridge","last_synced_at":"2025-04-19T01:47:48.861Z","repository":{"id":263438534,"uuid":"879690431","full_name":"simplito/privmx-bridge","owner":"simplito","description":"Zero-knowledge server for secure storage and transfer of E2E encrypted data.","archived":false,"fork":false,"pushed_at":"2025-02-21T16:49:01.000Z","size":1698,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-29T06:42:53.445Z","etag":null,"topics":["chat","communication","cryptography","data-transfer","decryption","e2ee","end-to-end-encryption","files","messages","messaging","privacy","privacy-protection","private","privmx","secure","security","simplito","storage","thread","zero-knowledge"],"latest_commit_sha":null,"homepage":"https://privmx.dev","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simplito.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","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}},"created_at":"2024-10-28T11:32:37.000Z","updated_at":"2025-03-06T08:37:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"5fc1ec6a-cc7e-47b6-a7fe-c138eb386765","html_url":"https://github.com/simplito/privmx-bridge","commit_stats":null,"previous_names":["simplito/privmx-bridge"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplito%2Fprivmx-bridge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplito%2Fprivmx-bridge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplito%2Fprivmx-bridge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplito%2Fprivmx-bridge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simplito","download_url":"https://codeload.github.com/simplito/privmx-bridge/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249587276,"owners_count":21295537,"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":["chat","communication","cryptography","data-transfer","decryption","e2ee","end-to-end-encryption","files","messages","messaging","privacy","privacy-protection","private","privmx","secure","security","simplito","storage","thread","zero-knowledge"],"created_at":"2025-01-05T15:50:07.816Z","updated_at":"2025-04-19T01:47:48.834Z","avatar_url":"https://github.com/simplito.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PrivMX Bridge\n\nPrivMX Bridge is a secure, zero-knowledge server for encrypted data storage and communication.\nIt allows users to communicate and exchange data in a fully encrypted environment, ensuring end-to-end encryption and protecting data privacy at every step.\nClient software for PrivMX Bridge is [PrivMX Endpoint](https://github.com/simplito/privmx-endpoint), which handles the encryption.\nLearn more about how PrivMX works with our [docs](https://docs.privmx.dev/).\n\n**NOTE:** If you only want to run PrivMX Bridge without developing it, go to the [PrivMX Bridge Docker](https://github.com/simplito/privmx-bridge-docker) project.\n\n## Prerequisites\n\n### Mongo\n\nPrivMX Bridge requires a connection to MongoDB with a replica set enabled. If you don't have one, you can set it up using the script below (Docker-based):\n\n```\n./scripts/mongo.sh\n```\n\n### Nodejs\n\nThe project is written in TypeScript, so it requires a Node.js environment to run (version 22).\n\n## Run\n\nInstall dependencies, compile the code, and run it:\n\n```\nnpm install\nnpm run compile\nnpm start\n```\n\n## Create api key\n\nTo use management API, you need an API key. You can create one by running:\n\n```\nnpm run create-api-key\n```\n\n## Develop\n\nFirst, run the compilation in watch mode (it will recompile the project whenever any changes are made):\n\n```\nnpm run watch\n```\n\nThen, in a separate console, run the server (it will restart whenever any changes are made):\n\n```\nnpm start\n```\n\n## Documentation\n\n### Build Documentation\n\nTo build the documentation, run:\n\n```\n./scripts/build-docs.sh\n```\n\n### Visit Documentation\n\nIf your server runs on port 3000, the documentation will be available at [http://localhost:3000/docs](http://localhost:3000/docs).\n\n### Develop Documentation\n\nPrivMX uses [Slate](https://github.com/slatedocs/slate) for the Bridge documentation. First, run it in watch mode:\n\n```\n./scripts/develop-docs.sh\n```\n\nNavigate to [http://127.0.0.1:4567](http://127.0.0.1:4567). Whenever you make any changes, run the script below to generate markdowns for Slate and then refresh the page:\n\n```\nnpm run gen-docs\n```\n\n## Panel\n\nTo use the bridge web panel, you need to clone the Git submodules:\n\n```\ngit submodule update --init --recursive\n```\n\nThen, run:\n\n```\n./scripts/build-panel.sh\n```\n\n## Testing\n\nUnit test:\n\n```\nnpm t\n```\n\nE2E test:\n\n```\nnpm run e2e-tests\n```\n\n## Build Docker Image\n\nIt will produce a Docker image with the `privmx-bridge` tag:\n\n```\n./scripts/build-docker.sh\n```\n\n**NOTE:** You need to initialize submodules for build-docker to succeed.\n\n## Configuration Options\n\nThe table below outlines the primary configuration options available for this application. Each option can be set using environment variables to override default values. You can use this as a reference to customize server behavior and optimize resource usage. \n\n| Option                           | Environment Variable               | Default Value                          | Description |\n|----------------------------------|------------------------------------|----------------------------------------|-------------|\n| server.port                      | PRIVMX_PORT                        | 3000                                   | Server's port |\n| server.hostname                  | PRIVMX_HOSTNAME                    | \"0.0.0.0\"                              | The interface on which server will listen |\n| server.workers                   | PRIVMX_WORKERS                     | Number of cpu cores (threads)          | Number of threads that will process requests |\n| server.cors.enabled              | PRIVMX_CORS_ENABLED                | false                                  | Enable CORS |\n| server.ssl.enabled               | PRIVMX_SSL_ENABLED                 | false                                  | Enables SSL for the server |\n| server.ssl.port                  | PRIVMX_SSL_PORT                    | 3443                                   | SSL port number |\n| server.ssl.privKeyPath           | PRIVMX_SSL_PRIV_KEY_PATH           | \"privkey.pem\"                          | Path to SSL private key file |\n| db.mongo.url                     | PRIVMX_MONGO_URL                   | \"mongodb://localhost:27017/\"           | MongoDB connection URL |\n| db.storageProviderName           | PRIVMX_STORAGE_PROVIDER_NAME       | \"fs\"                                   | Name of the storage provider |\n| metrics.enabled                  | PRIVMX_METRICS_ENABLED             | false                                  | Enables metrics |\n| metrics.username                 | PRIVMX_METRICS_USER                | \"admin\"                                | Username for metrics endpoint |\n| metrics.password                 | PRIVMX_METRICS_PASSWORD            | \"password\"                             | Password for metrics endpoint |\n| request.chunkSize                | PRIVMX_REQUEST_CHUNK_SIZE          | 5242880 (5MiB)                         | Request chunk size in bytes |\n| loggerEscapeNewLine              | PRIVMX_LOGGER_ESCAPE_NEW_LINE      | true                                   | Escapes newlines in logs |\n| apiRateLimit.enabled             | PMX_LIMITER_ENABLED                | false                                  | Enables API rate limiter |\n| apiRateLimit.initialCredit       | PMX_LIMITER_INITIAL_CREDIT         | 1000                                   | Initial credit for client IP address |\n| apiRateLimit.maxCredit           | PMX_LIMITER_MAX_CREDIT             | 1200                                   | Maximum credit for client IP address |\n| apiRateLimit.creditAddon         | PMX_LIMITER_CREDIT_ADDON           | 100                                    | Credits added per interval for client |\n| apiRateLimit.addonInterval       | PMX_LIMITER_CREDIT_ADDON_INTERVAL  | 1000                                   | Interval (ms) for credit addition |\n| apiRateLimit.requestCost         | PMX_LIMITER_REQUEST_COST           | 10                                     | Cost of a single request in credits |\n| apiRateLimit.inactiveTime        | PMX_LIMITER_INACTIVE_TIME          | 120000                                 | Inactive time (ms) before client is removed |\n| apiRateLimit.whitelist           | PMX_LIMITER_WHITELIST              | []                                     | List of IPs exempt from rate limiting |\n\nDefault config file path in project is ```\u003cPROJECT_MAIN_DIRECTORY\u003e/conf/config.json```. Directory conf has to be created first.\n\nexample of config file:\n```json\n{\n    \"apiRateLimit\": {\n        \"enabled\": true\n    }\n}\n```\n\nThe configuration values specified in the configuration file take precedence over those set through environment variables. If a value is defined in both the configuration file and an environment variable, the configuration file value will be used.\n\n## License\n\nPrivMX Free License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplito%2Fprivmx-bridge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimplito%2Fprivmx-bridge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplito%2Fprivmx-bridge/lists"}