Blaze is a file sharing progressive web app(PWA) that allows users to transfer files between multiple devices. It works similar to SHAREit or the Files app by Google but uses web technologies to eliminate the process of installing native apps for different devices and operating systems. It also supports instant file sharing with multiple devices at once which many file sharing apps lack.
Blaze primarily uses WebTorrent and WebSockets protocol (as a fallback) to transfer files between multiple devices. Files shared via WebTorrent are peer-to-peer(as they use WebRTC internally) which means there is direct transfer between the sender and receiver without any intermediate server. Do note that tracker servers in WebTorrent are used which carry metadata and facilitate the file transfer but do not get the complete file in any form.
Read more about how Blaze works at a basic level in this Medium article.
Read more on Deploying on your own server
Blaze is sponsored by:
preact.config.js
file.
Following environment variables can be set in the build process:
| variable | description | default |
|----------------------|-----------------------------------------------------------------------|---------------------------------------------------|
| **client** | Variables for **client** should be set as build args if using Docker. | |
| `WS_HOST` | URL to the server that is running the Blaze WebSockets server. | 'ws://\
Blaze can be easily deployed on your own server using Docker and docker-compose
. The frontend and the backend is completely decoupled from each other.
Following Docker images are available:
Blaze Server: This is the backend Node.js server that is used for WebSockets communication. The environment variables listed for the server in previous section can be passed to the container. It exposes port 3030
.
Blaze Client: This is the frontend progressive web app of Blaze used by clients for sharing files. Nginx is used as a web server for this statically generated frontend. The environment variables listed above must be passed as ARGS while building the image. The frontend container exposes port 80
.
Blaze: This is a higher level image that includes both Blaze Server and Blaze Client images above. It must be used when docker-compose is not available in the environment, or there is a limit to run only a single container. docker-compose must be used to run Blaze in other cases which is explained in next section.
docker run -p 8080:80 -p 3030:3030 -e PORT=80 akashhamirwasia/blaze:latest
NOTE: The PORT
environment variable and the container port should be the same.(In the above example, it is set as 80
).
A docker-compose.yml
file is present at the root of this project which runs both the server and client containers and sets up a proxy for WebSocket connections on the frontend in Nginx configuration. To run using docker-compose:
git clone https://github.com/blenderskool/blaze
cd blaze
docker-compose up -d
Building the frontend
npm run build:fe
The frontend built code would be located in the client/build
directory.
Starting the server and frontend app
npm start
Blaze app can now be accessed at port 8080
:tada:
Documentation on contributing can be found in CONTRIBUTING.md
Blaze is MIT Licensed