{"id":13553684,"url":"https://github.com/meganz/webclient","last_synced_at":"2025-05-14T13:09:45.209Z","repository":{"id":3565013,"uuid":"49989467","full_name":"meganz/webclient","owner":"meganz","description":"The mega.nz web client","archived":false,"fork":false,"pushed_at":"2025-05-09T03:41:23.000Z","size":602424,"stargazers_count":1087,"open_issues_count":66,"forks_count":309,"subscribers_count":68,"default_branch":"master","last_synced_at":"2025-05-09T04:28:03.030Z","etag":null,"topics":["cloud-storage","cryptographic","meganz","privacy","webclient"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/meganz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2016-01-19T23:06:11.000Z","updated_at":"2025-05-09T03:41:31.000Z","dependencies_parsed_at":"2023-02-18T03:45:45.286Z","dependency_job_id":"9209685f-7846-4c26-82a6-61c8cc3e8651","html_url":"https://github.com/meganz/webclient","commit_stats":{"total_commits":18285,"total_committers":61,"mean_commits":"299.75409836065575","dds":0.8218211648892535,"last_synced_commit":"5f31781549c37226bc74d35927ecd6efb981b1f1"},"previous_names":[],"tags_count":557,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meganz%2Fwebclient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meganz%2Fwebclient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meganz%2Fwebclient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meganz%2Fwebclient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meganz","download_url":"https://codeload.github.com/meganz/webclient/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254149977,"owners_count":22022852,"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":["cloud-storage","cryptographic","meganz","privacy","webclient"],"created_at":"2024-08-01T12:02:31.157Z","updated_at":"2025-05-14T13:09:40.198Z","avatar_url":"https://github.com/meganz.png","language":"JavaScript","readme":"MEGA Web Client\n===============\n\nMEGA provides robust cloud storage with convenient and powerful\nalways-on privacy. MEGA believes in your right to privacy and provides\nyou with the technology tools to protect it. We call it User\nControlled Encryption (UCE), and it happens automatically.\n\nSecure Boot\n-----------\n\n``secureboot.js`` loads all the resources from static content servers\nand verifies its authenticity by checking the cryptographic hash.\n\n**Note:** This is not the exact same ``secureboot.js`` as we have\n  online at ``https://mega.nz/secureboot.js``. We have an automatic\n  process that generates ``secureboot.js`` with its cryptographic\n  hashes and all the versioned resource files\n  (``file_X.js``/``file_X.html``) as needed based on this repository\n  before prior to updating the live site.\n\nDuring development it's essential that your set the following\n``localStorage`` parameters:\n\n```\n// Disables the cryptographic hash verification logic.\nlocalStorage.dd = 1;\n```\n\nThere are also various other ``localStorage`` parameters that are\nuseful during development:\n\n```\n// Enables vanilla console logging.\nlocalStorage.d = 1;\n// Enables full console logging via MegaLogger.\nlocalStorage.minLogLevel = 0;\n// Allows you to disable the context menu in the FM for element inspection.\nlocalStorage.contextmenu = 1;\n```\n\n\nLocal webclient setup instructions for Ubuntu (for MEGAchat see INSTALL.md)\n---------------------------------------------------------------------------\n\n1. Install Apache2:\n```\nsudo apt-get install apache2\n```\n\n2. Create a new virtual host configuration file and edit it:\n```\nsudo nano /etc/apache2/sites-available/webclient.conf\n```\n\n3. Add the following and save the file:\n\n```\n\u003cVirtualHost *:80\u003e\n    ServerName webclient.local\n    ServerAdmin webmaster@webclient.local\n    DocumentRoot /var/www/html/webclient.local\n    ErrorLog /var/log/apache2/webclient.local.error.log\n    CustomLog /var/log/apache2/webclient.local.access.log combined\n    LogLevel warn\n\n    \u003cDirectory \"/var/www/html/webclient.local\"\u003e\n        AllowOverride All\n    \u003c/Directory\u003e\n\u003c/VirtualHost\u003e\n```\n\n4. Enable the config, also the rewrite and headers modules:\n```\nsudo a2ensite webclient.conf\nsudo a2enmod rewrite\n```\n\n5. Edit the hosts file:\n```\nsudo nano /etc/hosts\n```\n\n6. Add the following and save the file:\n```\n127.0.0.1       webclient.local\n```\n\n7. Restart the web server:\n```\nsudo systemctl restart apache2\n```\n\n8. Clone the repository:\n```\ncd /var/www/html/\ngit clone git@code.developers.mega.co.nz:web/webclient.git webclient.local\n```\n\n9. Set permissions:\n```\nsudo chgrp -R www-data /var/www/html/\nsudo chown -R \u003cyour-username\u003e /var/www/html/\n```\n\n10. Pull language files:\n```\n/var/www/html/webclient.local/scripts/lang.sh\n```\n\n11. Visit http://webclient.local in your browser.\n\n\nDirectories\n-----------\n\n* ``js/`` -- contains all generic JavaScript files\n* ``html/`` -- contains all generic HTML files\n* ``js/html/`` contains all JavaScript files that belong to the\n  specific HTML file of the parent folder\n* ``js/vendor/`` -- contains all JavaScript files from external developers\n* ``cmaps/`` -- contains all Character mapping files for Pdf preview's Adobe font\n\n\nOur JavaScript Files\n--------------------\n\n* ``secureboot.js`` -- loads all the resources from static content\n  servers and verifies its authenticity by checking the cryptographic\n  hash\n* ``decrypter.js`` -- the decrypter which is used as a web worker to\n  decrypt data while downloading\n* ``encrypter.js`` -- the encrypter which is used as a web worker to\n  encrypt data while uploading\n* ``pdf.worker.js`` -- worker for PDF Reader in JavaScript, **this is a fork**, [compare the changes](https://github.com/mozilla/pdf.js/compare/master...meganz:master)\n* ``js/chat/sfuClient.js`` -- audio/video call client engine [MEGA SFU client](https://github.com/meganz/sfu-client/)\n* ``worker.sfuClient.bundle.js`` -- crypto worker of the MEGA SFU client\n* ``worker.recorder.bundle.js`` -- call recording engine worker of the MEGA SFU client. This bundle includes the [mp4-muxer](https://github.com/Vanilagy/mp4-muxer) opensource library\n* ``js/avatar.js`` -- is used for avatar selection, cropping \u0026 scaling\n  (all on the client side in the canvas)\n* ``js/cleartemp.js`` -- contains ``clearIt()`` which is used to purge\n  temp data from the ``FileSystem`` API (Chrome only)\n* ``js/countries.js`` -- contains all the country names (we should\n  translate these at some point)\n* ``js/crypto.js`` -- contains all the cryptographic functions \u0026 API\n  handlers\n* ``js/download.js`` -- contains all the download logic\n* ``js/filedrag.js`` -- event handlers for the upload buttons,\n  file\u0026folder-drag\u0026drop event handling for upload init.\n* ``js/filetypes.js`` -- contains all the supported file types based\n  on the file extension to match icons\n* ``js/fm.js`` -- file manager core file, contains mainly file manager\n  UI \u0026 dialog UI logic\n* ``js/functions.js`` -- contains some generic functions that are used\n  throughout the site\n* ``js/keygen.js`` -- for cryptographic public/private key pair\n  creation\n* ``js/mDB.js`` -- providers the local database abstraction layer for\n  caching of meta-data in ``IndexedDB``\n* ``js/mega.js`` -- ``MegaData`` class which does most of the data\n  handling (but also some FM UI interaction)\n* ``js/mouse.js`` -- captures mouse events for entropy collection\n* ``js/notify.js`` -- contains the notifications logic\n* ``js/thumbnail.js`` -- client side canvas based thumbnail creation\n  (because thumbnails are encrypted, too)\n* ``js/upload.js`` -- contains all the upload logic\n* ``js/account.js`` -- contains the user creation \u0026 login logic\n* ``js/zip.js`` -- JavaScript implementation to create ZIP archives of\n  multiple files on the client side\n\n\nVendor JavaScript Files\n-----------------------\n\n* ``aesasm.js`` -- general-purpose cryptographic library\n* ``rsaasm.js`` -- general-purpose cryptographic library\n* ``sjcl.js`` -- Stanford Javascript Crypto Library.\n  This is a modified version with some minor changes, see c211e4ce and de5c3dce\n\nSee [js/vendor/README.md](https://github.com/meganz/webclient/blob/master/js/vendor/README.md) for more.\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeganz%2Fwebclient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeganz%2Fwebclient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeganz%2Fwebclient/lists"}