Coder Social home page Coder Social logo

ethersphere / gateway-ui Goto Github PK

View Code? Open in Web Editor NEW
10.0 6.0 10.0 3.98 MB

Swarm Gateway website

Home Page: https://gateway.ethswarm.org

License: BSD 3-Clause "New" or "Revised" License

HTML 2.21% TypeScript 97.09% CSS 0.50% JavaScript 0.19%
decentralized gateway swarm ethereum sharing

gateway-ui's Introduction

Bee Gateway

standard-readme compliant js-standard-style FOSSA Status

Swarm Gateway website.

Warning: This project is in alpha state. There might (and most probably will) be changes in the future to its API and working. Also, no guarantees can be made about its stability, efficiency, and security at this stage.

This project is intended to be used with Bee version 1.5.0-dda5606e. Using it with older or newer Bee versions is not recommended and may not work. Stay up to date by joining the official Discord and by keeping an eye on the releases tab.

Table of Contents

Development

git clone [email protected]:ethersphere/gateway.git

cd  gateway

npm start

The Gateway runs in development mode on http://localhost:3030/.

:warn: Don't forget to provide postage stamp via environment variable or edit directly the postageStamp constant in .src/constants.ts..

Environment variables

  • REACT_APP_BEE_HOSTS - comma separated bee API URLs through which the gateway uploads and downloads. The api to upload is selected at random while on download the gateway checks all the hosts (defaults to [http://localhost:1633])
  • REACT_APP_BZZ_LINK_DOMAIN - specifies what domain of Bzz Link should be used (defaults to bzz.link)
  • REACT_APP_POSTAGE_STAMP - Postage stamp batch ID to be used for uploading (defaults to 00000...00000
  • REACT_APP_GATEWAY_URL - URL on which the gateway is hosted (defaults to current window location)
  • REACT_APP_DIRECT_DOWNLOAD_URL - URL for a direct download of asset, used for redirecting ENS requests (defaults to https://api.gateway.ethswarm.org/bzz/)

Contribute

There are some ways you can make this module better:

  • Consult our open issues and take on one of them
  • Help our tests reach 100% coverage!
  • Join us in our Discord chat in the #develop-on-swarm channel if you have questions or want to give feedback

Maintainers

See what "Maintainer" means here.

License

BSD-3-Clause

FOSSA Status

gateway-ui's People

Contributors

agazso avatar auhau avatar bee-worker avatar dependabot[bot] avatar fossabot avatar github-actions[bot] avatar significance avatar vojtechsimetka avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

gateway-ui's Issues

Rewrite postage stamps on ngingx

Alel files will be uploaded with postage stamp 0000...0000. This is in a header swarm-postage-batch-id and should be swapped for a real postage stamp on the nginx.

download: info page before downloading

  • minimum is a blank page with a download button
  • display metadata about the content to be downloaded
    • size?
    • filename?
    • file type?
    • custom message/note by uploader?
    • could be just in the URL itself?

error handling

  • upload fail
  • download fail (link expired)
  • technical handling (endpoint returns 4xx/5xx) and other errors
  • UX explaining to users why this happened and what can that mean

Browser alerts ?

Inform the user when trying to leave/close a tab when upload is not done or if I didn't copy the link, etc.

link generation & share: QR code

Generate QR code that points to the gateway + content hash.

Additional feature: show QR code fullscreen (for QR code for instance on mobile)

After uploading a file we should stick to the done page

After the uploading is done, now it jumps directly to the share page, that's a bit too fast/confusing IMO. I don't have time to see the confirmation that the upload is done. I would like to stick to the preview page with the green done button at the bottom, Only after tapping done I would go to share

mobile features

  • accessing camera
  • handling downloading/saving and uploading of files

Backend script to swap postage stamps

Because there is no top up, we need to periodically remove unusable postage stamps and add new ones.

  1. get list of active postage stamps
  2. check which are usable
  3. if non (or not enough) are usable, buy new postage stamp(s)
  4. write the usable and new postage stamps somehow to nginx

add progress on upload

Right now it is indeterminate action. How much has been uploaded to the gateway can be measured and therefore we should use progressbar.

upload: text information

  • what kind of files can be uploaded, examples?
  • explain limitations (file size, per IP, ...)
  • clarify the “no warranties”
    • we can’t say how long the content will be available
    • we can’t guarantee that the link will work
    • can’t undo (remove content)

i18n Support

As this tool is targeting broad audience, we should include internationalization / translations in the app sooner rather than later.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.