All Projects → blenderskool → Blaze

blenderskool / Blaze

Licence: mit
⚡ File sharing progressive web app built using WebTorrent and WebSockets

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Blaze

Live Torrent
Torrent Web Client
Stars: ✭ 546 (-44.9%)
Mutual labels:  webtorrent, backend, frontend
Webtorrent Desktop
❤️ Streaming torrent app for Mac, Windows, and Linux
Stars: ✭ 8,587 (+766.5%)
Mutual labels:  hacktoberfest, webrtc, webtorrent
Wt Tracker
High-performance WebTorrent tracker
Stars: ✭ 144 (-85.47%)
Mutual labels:  webrtc, websockets, webtorrent
Kalm.js
The socket manager
Stars: ✭ 155 (-84.36%)
Mutual labels:  hacktoberfest, webrtc, websockets
Udash Core
Scala framework for building beautiful and maintainable web applications.
Stars: ✭ 405 (-59.13%)
Mutual labels:  hacktoberfest, backend, frontend
Resources
This repo is a one stop destination to find resources for learning various domains. You can find the roadmap for any domain here.
Stars: ✭ 198 (-80.02%)
Mutual labels:  hacktoberfest, backend, frontend
Dev Practice
Practice your skills with these ideas.
Stars: ✭ 1,127 (+13.72%)
Mutual labels:  hacktoberfest, backend, frontend
Free Courses
Free IT courses
Stars: ✭ 522 (-47.33%)
Mutual labels:  hacktoberfest, backend, frontend
Webtorrent
⚡️ Streaming torrent client for the web
Stars: ✭ 25,554 (+2478.61%)
Mutual labels:  hacktoberfest, webrtc, webtorrent
Programming Challenges
Algorithmic, Data Structures, Frontend and Pentest - Programming challenges and competitions to improve knowledge.
Stars: ✭ 592 (-40.26%)
Mutual labels:  backend, frontend
Jsxc
💬 Real-time xmpp chat application with video calls, file transfer and encrypted communication.
Stars: ✭ 604 (-39.05%)
Mutual labels:  webrtc, file-transfer
Nerv
A blazing fast React alternative, compatible with IE8 and React 16.
Stars: ✭ 5,409 (+445.81%)
Mutual labels:  frontend, preact
Full Stack Fastapi Postgresql
Full stack, modern web application generator. Using FastAPI, PostgreSQL as database, Docker, automatic HTTPS and more.
Stars: ✭ 7,635 (+670.43%)
Mutual labels:  backend, frontend
Webpacker
Use Webpack to manage app-like JavaScript modules in Rails
Stars: ✭ 5,282 (+433%)
Mutual labels:  hacktoberfest, frontend
Osu Web
the browser-facing portion of osu!
Stars: ✭ 610 (-38.45%)
Mutual labels:  backend, frontend
Cockpit
Add content management functionality to any site - plug & play / headless / api-first CMS
Stars: ✭ 5,173 (+422%)
Mutual labels:  hacktoberfest, backend
Aws Boilerplate
Opinionated full stack web app's boilerplate, ready to be deployed to AWS platform.
Stars: ✭ 682 (-31.18%)
Mutual labels:  backend, frontend
Repractise
RePractise
Stars: ✭ 695 (-29.87%)
Mutual labels:  backend, frontend
Ethql
A GraphQL interface to Ethereum 🔥
Stars: ✭ 547 (-44.8%)
Mutual labels:  backend, frontend
Webtorrent Cli
WebTorrent, the streaming torrent client. For the command line.
Stars: ✭ 633 (-36.13%)
Mutual labels:  webrtc, webtorrent

Blaze - Fast peer to peer file sharing web app ⚡ | Product Hunt Embed Digital Ocean

Blaze - A file sharing web app ⚡

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.

Try it out!

  • Go to a deployed client of Blaze - https://blaze.now.sh
  • Set a basic nickname(this is not stored on any server)
  • Create a new room. Room is where peers must join to share files among each other.
  • On another device, follow the above steps and join the same room. (Make sure to give a different nickname)
  • Both your devices should show up. Now start sharing some files!

Read more about how Blaze works at a basic level in this Medium article.

Deploy your own instance of Blaze

Deploy Try in PWD

Read more on Deploying on your own server

Table of Contents

Sponsors

Blaze is sponsored by:

Project structure

The project is structured into following directories - backend, frontend, common and nginx.

Backend

All the backend(or server) related source code resides under the server directory. It is built on Node.js with express for HTTP server and ws library for WebSockets. Thin wrappers have been created for easier interfacing with sockets.

Frontend

The frontend source code is in the client directory. The dependencies of the frontend has been kept to a minimum to keep bundle sizes low. Once the frontend is built for production, all the built files are stored in build directory which can be deployed as a static app.

  • Preact is being used on the frontend(previously used Svelte).
  • Sass is used for CSS pre-processing and maintaing consistent themeing across the frontend.
  • /app route is a PWA, single-page app. Rest of the routes are pre-rendered during build time.
  • Feather icons is used for icons.

Sub-directories

  • assets - used to store the static assets such as images.
  • components - contains all the UI components of Blaze.
  • hooks - custom Preact hooks
  • routes - components related to different routes of Blaze and router configuration.
    • App - subroutes of the single-page app under /app route.
    • Pages - rest of the routes that need to be pre-rendered.
  • scss - theme level scss. (Note: component specific scss goes within the corresponding component directory)
  • utils - javascript utility functions

Common

The common directory contains javascript modules that are shared by both frontend and backend. These include constants in constants.js file and utility functions in utils sub-directory.

Nginx

The nginx directory contains configuration files for nginx to be used in Docker containers. These usually don't change much.

  • compose-nginx.conf - Used when the project is run using docker-compose.
  • image-nginx.template - Used when the project is run on a single container from higher level Docker image.

Build process

The build process for the frontend internally setup with webpack via preact-cli. Overrides can be made in preact.config.js file. Following environment variables can be set in the build process:

variable description default
client
WS_HOST URL to the server that is running the Blaze WebSockets server. 'ws://<your-local-ip>:3030'
SERVER_HOST URL to the server that running the Blaze HTTP server. 'http://<your-local-ip>:3030'
WS_SIZE_LIMIT Max file size limit when transferring files over WebSockets in bytes. 100000000 (100 MBs)
TORRENT_SIZE_LIMIT Max file size limit when transferring files over WebTorrent in bytes. 700000000 (700 MBs)
server
ORIGIN Array of string URLs to allow CORS. *
PORT Port for the server to run 3030
WS_SIZE_LIMIT Max file size limit when transferring files over WebSockets in bytes 100000000 (100 MBs)

Deploying on your own server

Blaze can be easily deployed on your own server using Docker. 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. The environment variables listed for the server above 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 can 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.

Using docker-compose

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

Contributing

Documentation on contributing can be found in CONTRIBUTING.md

Running Blaze in production

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 🎉

Privacy and Analytics

  • Blaze server does not track or record the files that are being shared both by WebSockets and WebTorrent.
  • Any user related data like nickname, room names are always stored on device, and are only shared with the server when the user joins a room for file sharing.
  • Blaze client uses Google Analytics to record the following:

License

Blaze is MIT Licensed

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].