Giter VIP home page Giter VIP logo

storz's Introduction


Project Banner

Storz

Winner of Decentralized Storage Infrastructure & Community Choice Award of Web3 Infinity Hackathon 2022 organized by Protocol Labs, Filecoin Foundation & Force Web3 Community.


Logo Hacktoberfest 2022

For Hacktoberfest contribution please read the CONTRIBUTING.md and join our Discord server.

πŸ’ About The Project

Project Banner

IPFS React Express.js NodeJS MongoDB

Storz is a fully-decentralized, open source, usable-design-focused, storage application that is built to replace current storage providers in the market.

Features of our application:

  • Store unlimited files

  • Share your files to anyone

  • Ability to make the file public or private

  • All the files are encrypted using AES-256 Algorithm

  • Files are stored in IPFS , a high performance distributed server network protocol

  • Passwordless Authentication

  • Complete ownership of the data

  • User friendly interface

  • Fast, Reliable and Secure

  • Built on Modern and Well-used Technologies like React, IPFS, MongoDB & NodeJS

(back to top)

πŸ“Έ Screenshots

Here is a sneak peek of the application and it's visuals 😍:

Dashboard Page

Landing Page


Login


Home Page


My Files


File Description


Features

(back to top)

βœ… Quick Start Guide

To get started with having your own instance of Storz, follow the steps described in the following section

πŸ’― Prerequisites ( Important )

You will need these to be already installed:

And that's it

πŸ’Ύ Installation

Follow these steps to get started

Installation

# Clone the repository
git clone https://github.com/anomic30/Storz.git
# Enter into the frontend directory
cd Storz/client
# Install the dependencies
npm install
# Enter into the server directory
cd Storz/server
# Install the dependencies
npm install

⚠️ Important!

In order to get the API keys check out client/README.md & server/README.md

Starting the application

# To run the frontend OR backend
npm start
# To build the frontend
npm run build

(back to top)

πŸ“ How it works

Here's a diagram explaining exactly how everything fits into place

(back to top)

🀝🏻 Contributing

Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

⚠️ Also, refer to CONTRIBUTING.md

(back to top)

πŸ§‘πŸ½β€πŸ’» Maintainers

(back to top)

πŸ›‘οΈ License

Distributed under the MIT License. See LICENSE.md for more information.

(back to top)

πŸ₯° Endnote

Just one last thing, if you have reached this far, why not consider giving a star to the repo. This keeps us going, and we love to see that people like our projects, and motivates us to make more of these. With that, thank you loads 😊πŸ₯°

~ Storz team

storz's People

Contributors

anomic30 avatar arnav-kr avatar bhtibrewal avatar biswajitsahoo-tech avatar chaaals avatar detronetdip avatar developer-diganta avatar ezehlivinus avatar gismo1337 avatar its-puneet avatar kit-p avatar lofty-brambles avatar mani-rsg avatar nujovich avatar pwill12 avatar sneakad avatar sorikairox avatar soumi-igtm avatar spykelionel avatar sumeli avatar zugzwang03 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

storz's Issues

πŸ› [BUG] - 2 files with same name

Description

when uploading files, if you are uploading a file (same one or an other one) with the same name, it'll be stored.
The user must be advertised and specify his intention

Reproduction URL

https://github.com/ThomasSed/Storz

Reproduction steps

1. Go to "home"
2. Click on "upload"
3. upload a file
4. do the 3 first steps a second time, with the same file (for example) 
5. go to your repository, you must see 2 files with same name

Screenshots

![DESCRIPTION](LINK.png)

Logs

No response

Browsers

No response

OS

No response

Add a filtering feature

Add a filtering feature to the My Files page.

For example :

  • Filter by File types ( .pdf/.png/.jpeg etc )
  • Filter by File status ( public/private )

[Enhancement] - Console Logging

Setup a basic console/terminal messages/logs to show when HTTP requests are made and when the app is running. This way it helps with debugging especially during development.

When a request is sent: The request methods, endpoint and status code would be logged to the console. The standard logger would be used instead of console.log().

adding a back to top button at the bottom of the webpage

Start Date

No response

Implementation PR

No response

Reference Issues

No response

Summary

having a back to top function button at the bottom of the webpage to allow users to get back to top quickly

Basic Example

button that will return to top when clicked

Drawbacks

where to place it

Unresolved questions

No response

[ENHANCEMENT] - Improve Delete Alert UI

image

Do you need to update this alert for more good UX? I will update the button component below the text and give contrast only for delete button.

Inspiration:
image

πŸ› [BUG] - Add margin for containers in Files section (width < 875px)

Description

Currently, the application has set a width equal to 100%, even for mobile devices, which leads to content too attached to the margin of the page.

image

Reproduction URL

https://storz.pages.dev/app/myFiles/desc

Reproduction steps

1. Go to 'https://storz.pages.dev' (width < 975px)
2. Click on 'Sign in'
3. Enter a valid email
4. Go to Files section
5. Click on file name
6. Containers have no margin set

Screenshots

image

Logs

No response

Browsers

Chrome

OS

Windows

πŸ› [BUG] - Manage special characters in file names with Unicode

Description

Currently, the application doesn't manage special characters like 'Γ³', 'Γ‘', 'Γ©', 'Γ­', 'ΓΊ' in an effective way.

SpecialChars

Reproduction URL

https://storz.pages.dev/app/myFiles/desc

Reproduction steps

1. Go to 'https://storz.pages.dev' (width < 975px)
2. Click on 'Sign in'
3. Enter a valid email
4. Once logged in, upload a file with special chars in the name
5. See that once uploaded, the conversion is not being managed in an effective way

Screenshots

No response

Logs

No response

Browsers

No response

OS

No response

Lint: enforce coding standards

Description

The project needs to be linted. It can use the Eslint linter and the AirBnB JavaScript standard guide.
To make sure that contributors use the same style and some best practices, lining the project is necessary.

Example

ESlint can enforce one to use const keyword when the variable is not meant to be reassigned and let, if otherwise.

πŸ› Sign-in/log-in bug

Description

Pressing enter on sign-in/log-in doesn't do anything. After looking briefly on the sign-in/login-in modal, I think the problem is that it's not using a form. I think this is bad for overall user experience.

Reproduction URL

https://github.com/chaaals/Storz

Reproduction steps

1. Go to sign-in/log-in page
2. Simply type in your information
3. Upon clicking enter~
4. It doesn't do any action

Screenshots

No response

Logs

No response

Browsers

No response

OS

No response

πŸ› [BUG] - Bad responsiveness on file's tab.

Description

The files tab has a very squished look on a phone. Some margins and separations might be added to keep it clean.
Here's what it currently looks like.
image

Reproduction URL

https://storz.pages.dev/app/myFiles

Reproduction steps

1. Go to 'https://storz.pages.dev/app/myFiles'
2. Switch to a smaller screen in devtools
4. See the issue

Screenshots

![DESCRIPTION](LINK.png)

Logs

No response

Browsers

Firefox, Chrome, Safari, Microsoft Edge

OS

Windows, Linux

πŸ’‘ Make a login button

Start Date

No response

Implementation PR

No response

Reference Issues

No response

Summary

Adding a login button instead of use now because it is more intuitive and the website becomes easy to use. Please assign me this issue. #hacktoberfest

Basic Example

Screenshot (1515)

Drawbacks

We have to remove the use Now button

Unresolved questions

No response

Secure Token Storage

Current code base is using local storage for storing the DID token, however it is not a good practice as it can be accessed by browser's JavaScript. Instead of that we can use httpOnly cookies to store them.

Base Route and Middleware

Given that the routes have grown and will be growing in the future. It is necessary to have

  1. a single file where all the routes are used.
  2. a single middleware file where all the middleware and the route middleware are used/registered

This way route and middleware are separated from the index file, thereby making it smaller, and cleaner.

Example:

-middleware/
--error.middleware.js
--another.middleware.js
--index.middleware.js // import all middleware and use them and export an instance of all the used middleware

Same for routes.

πŸ’‘ [REQUEST] - About page for app

Start Date

No response

Implementation PR

No response

Reference Issues

No response

Summary

Can we add about page for this I need to discuss content for about page

Basic Example

we can add about app what does app do team photos in about

Drawbacks

Need for content help

Unresolved questions

No response

πŸ’‘ [REQUEST] - Decoupling services

Start Date

No response

Implementation PR

No response

Reference Issues

No response

Summary

Create new files where we insert business logic from routes. I mean, pull that blocks of code where it's used mongoose's models out and put it in services files. If you agree with this request, I'd appreciate you can assign me this task.

Basic Example

A common example is when a User is created, that logic which we used, encapsulates in a function from service, then call it in the routes/services. In that way, we are just concerned about calling the function and not how it works.

Example:

Before

const user = new User({
            magic_id: magic_id,
            email: email,
            user_name: user_name,
            encryption_key: encryption_key,
            files: []
        })
        await user.save();

After

const user = UserService.create(magic_id, email, user_name, encryption_key, files);

Drawbacks

Decoupling services are essential for the app, in that way we can become the code more scalable and easier for testing, if the controller handled the whole application's logic and the request-handling logic, it would start to become really hard to test. Furthermore if at some point we want to migrate our database just we would have to create a new file and write the logic with the new database.

Unresolved questions

No response

There is no button to go back from signin page

Start Date

No response

Implementation PR

πŸ› There is no button to go back from signin page , assign this task to me

Reference Issues

No response

Summary

add go back option

Basic Example

it would be better to have go back option

Drawbacks

user will not be able to go back one's he/she go to that signin page, yes there is option to go back using system functions , but it would be better to have go back option

Unresolved questions

No response

Add a function

A function that should be able to create to catch errors and show appropriate messages.

πŸ’‘ [REQUEST] - Add middleware to do data sanitization against NOSQL query injection and XSS and Implement a global error handling controller

Start Date

09/04/2022

Implementation PR

No response

Reference Issues

No response

Summary

  • Want to add some middleware that will prevent cross-site scripting and NoSQL query injection.

  • Also want to implement a global error handler, which means after catching errors all over the application we send the error to a global error handler which will decide what to do with it.

Basic Example

Let on user.js we get an error which will go to catch section

e,g

try{
   //......
  }catch( err) {
      next( err) // calling the global err handler
  }

And in index.js we have the global error handler which will be called

index.js

app.use( (err, req, res, next) => {
          res.status( err.statuscode) . json( {
          data: err.message
          })
});

Drawbacks

There is no drawback of adding above features

Unresolved questions

No response

[feat] - Make NavBar sticky

Description

Having the navBar sticky, especially on the login and after the login page (upload part) will help users navigate easier and look cleaner.
Screenshot 2022-10-12 130942

Reproduction steps

1. Go to 'https://storz.pages.dev/'
2. Scroll down
4. See the navBar is gone and there is no option to sign in or upload.

Screenshots

No response

Logs

No response

Browsers

Chrome

OS

Windows

Decoupling the controller from the data repository

Start Date

No response

Implementation PR

No response

Reference Issues

No response

Summary

The current structure of the API routes has the controller functions and its data accesing tightly coupled together. This development design will not allow further easy integration to any other database that is not mongodb/mongoose without changing the entire API route functions. Suggestion:
[] A separate folder for all the controllers
[] A separate folder as the data repository (where different databases data query/ mutaions functions are define)

Basic Example

For example
The route that login in the user first queries the data dabase using the mongoose findOne method on the User Object... this direct calling of mongoose method within the route controllers had directly coupled the sytem to mongodb/mongoose as the defualt database. The challenge to this is that in the nearest future if other other databases are to be integrated into the system, the change will not only be done on the database connecttion config file but also across the entire routes controllers thereby making such integration a diffult one. But having a separate repository that is resposing for the direct communication of the database method before being used by the controller will enable easy inegration.

Drawbacks

This development design will not allow further easy integration to any other database that is not mongodb/mongoose without changing the

Unresolved questions

No response

Rename .env.example file

In this issue I just want to include a small detail in the readme of the project

  • Rename the env.example file
  • Rename the file in both client and server folder

I raised this issue as i faced an error which got resolved after renaming the files. So either we can rename the files or inform the contributor in readme about renaming the file.

[ENHANCEMENT]- Enhance navigation on Files section when file name is too big

Description

Currently the Files section actives the horizontal scrolling when a file name is too big

image

Reproduction URL

https://storz.pages.dev/app/myFiles

Reproduction steps

1. Go to the Storz app https://storz.pages.dev/
2. Login
3. Add a new file with a large name
4. See behavior

Screenshots

![image](https://user-images.githubusercontent.com/48018975/193726016-74c69263-7c1f-4f13-8045-83a1b36d005f.png)

Logs

No response

Browsers

Chrome

OS

Windows

Create scroll back to top button

Start Date

No response

Implementation PR

No response

Reference Issues

No response

Summary

I want to create a scroll back to top button for this website, as it is of multiple pages.
I want to make this contribution under hacktoberfest'22.

Basic Example

My feature will help in returning back to the landing page, once the button gets clicked.

Drawbacks

My feature will help in returning back to the landing page, once the button gets clicked.

Unresolved questions

No response

πŸ’‘ Email-password authentication system

Start Date

02-10-2022

Implementation PR

No response

Reference Issues

Every time i logout for logging in again i have to click on the magic link there might a a need to have a simple user password system along with the magic link which might be useful for regular users to not have to go and click on the magic link everytime they need to login

Summary

implementing a email password verification system along with the magic link system

Basic Example

a seperate page and seperate routes and controllers to for loggin in with email and password instead of magic link

Drawbacks

a lot of small changes might have to be made throughout the project as a new authentication system is being added

Unresolved questions

No response

πŸ› [BUG] - File not uploading

Description

Each and every time I am uploading a file it is showing me the below image. what that x sign mean and there were no error message as well.

Reproduction URL

no

Reproduction steps

1. Go to the website
2. Click on upload files
4. See error

Screenshots

Screenshot from 2022-09-24 21-41-30

Logs

No response

Browsers

Chrome

OS

Linux

πŸ› [BUG] - Bad responsiveness on the file information

Description

The files information page has a bad responsive design and on smaller screens/devices, the website will start to break. I believe that the root cause of this is that at smaller screens, the buttons will run out of room and start invading the padding and margin of its parent div. Allowing the button to wrap at a smaller size, it can provide it with more room and space to work with on a new line.

Here is what it looks like currently

At 420px width
image

At 320px width
image

This is my proposed design:

image

Reproduction URL

https://storz.pages.dev/app/myFiles/desc

Reproduction steps

1. Go to https://storz.pages.dev/app/home
2. Upload a file to the IPFS network
3. Go to https://storz.pages.dev/app/myFiles and open the file
4. Open devtool and adjust width to less than 420px
4. See the issue

Screenshots

See in description

Logs

No response

Browsers

No response

OS

No response

Login page appearing bug

Description

Whenever the app reloads it goes to the login page and stays for 2-3 seconds before redirecting to the target page.

Reproduction URL

https://storz.pages.dev/

Reproduction steps

1. Login 
2. Go to my files and reload the page.

Screenshots

No response

Logs

No response

Browsers

No response

OS

No response

πŸ’‘ [REQUEST] - Refactoring the server/ dir to MVC model

Start Date

09/04/2022

Implementation PR

No response

Reference Issues

No response

Summary

Below are some of my proposed changes

Controller

  1. Create a Controller folder, which contains controller files
  2. There is a controller file for each route
    e,g -
    route/user.js <-- controller/userController.js
    route/upload.js <-- controller/uploadController.js
  3. Each controller file contains the route handler function specific to its corresponding route endpoint

Misc

  1. Merge the auth.js route to the user.js route, keeping all the authMiddleware still working. Reason for that these two route share the same API endpoint, /api/user/
    e,g - auth --> /api/user/login
    user --> /api/user/files

Basic Example

File Structure after refactoring into MVC would look like this -

controller/
    userController.js
    uploadController.js
    downloadController.js
    
model/
   
routes/
    user.js
    download.js
    upload.js
    test.js

index.js
package.json

Drawbacks

Doing Refactoring to MVC only increases the require() lines and increases the number of files. Except that there is no other problem

Unresolved questions

No response

πŸ’‘ [REQUEST] - Add rate limiter to backend

Start Date

No response

Implementation PR

No response

Reference Issues

No response

Summary

A rate limiter can be added to the backend to avoid slowloris attacks.

Basic Example

This would avoid unnecessary open requests to server

Drawbacks

It would limit requests per second from same ip (value can be changed though)

Unresolved questions

No response

Add containarization

What if we add Docker to this project so that anyone can spin up the entire project without any hustle. Please let me know your thoughts on this.

Creating custom encryption & decryption function

Currently, we are using a custom npm package for the encryption/decryption of the files. This package doesn't have proper asynchronous methods. So we would like to create our own custom functions which are asynchronous and error-free. These functions should be able to catch errors and show the appropriate message properly.

Popup Modal for Logout

  • Want to add a popup modal which appears when the user clicks on the Logout button.

ISSUE

  • Currently User logsout Immeadiately the button is clicked.
  • If done by mistake . This leads the user to login again via confirmation through his gmail account.

Improvements

  • When user clicks the logout button . A popup must appear asking the user if he wants to logout?
  • This way prevents the user to logout by mistake.
  • Improves user experience .

Add a sorting feature

Add a sorting feature to the My Files page.

For example:

  • Sort by Upload date ( ascending or descending )
  • Sort by File names ( alphabetically )
  • Sort by File size ( smaller or larger )

Fix Error Handlers and handling

The error handler and how errors are handled need to be fixed.

  • The global error handler has an issue. To reproduce the error, once the server is running visit a route that does not exist, and the request will hang on until the server timeout. Example: visit: http://localhost:8080/api/user or http://localhost:8080/this-does-not-exist
  • Asynchronous errors need to be handled: currently on the route try ... catch were used to hand asynchronous errors. We can get rid of it and make the code more cleaner and maintainable. This way once can 'throw new Error' and it would be handled, also an unhandled exception would be captured. This will help us remove multiple try...catch in all the route handlers.

Lint: Add pre-commit hook

The project needs a pre-hook commit that will run to lint and format the change to the project before it gets committed to git.

Given that linting and formatting have been configured for the project, setting up a pre-commit hook will help lint and format changes on committing.

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.