r/reactjs • • Jan 02 '21

Show /r/reactjs Open Source online file storage I created - MyDrive (similar to Google Drive) (Node.js, React, Typescript, MongoDB, Amazon S3)

581 Upvotes

41 comments sorted by

30

u/subnub99 Jan 02 '21

Hello everyone. I am excited to accounce the 3rd major update to myDrive. This update brings a bunch of new features, such as a brand new modern UI, email verification support, access/refresh tokens, Google Drive support, and much more.

What is myDrive? MyDrive is an Open Source online file storage server, similar to Google Drive. You host myDrive on a server or trusted platform and then you can access myDrive through your web browser.

Features:

- Upload/Download files

- Modern and colorful UI

- Multiple DB support (S3, Filesystem, mongoDB)

- Docker Support

- Image/video viewer

- Public files or one time links

- Image thumbnails

- Google Drive support

- Personal S3 support per account

- Mobile support (including uploading)

- Access/Refresh tokens stored in httpOnly and secure cookies

- Search/filter options

MyDrive main website: https://mydrive-storage.com/

MyDrive github page: https://github.com/subnub/myDrive

MyDrive demo: https://mydrive-3.herokuapp.com/

MyDrive featured video: https://www.youtube.com/watch?v=_bcADP6hDDI&feature=youtu.be

About myDrive and myself: https://mydrive-storage.com/about

35

u/[deleted] Jan 02 '21

Hey, I've read about your motivation behind starting the project (to learn Reactjs and nodejs), but how did you manag to build such a huge project as your learning/initial project, great start, all the best.

Whenever I see such Devs, I feel bad about myself 😂. I'd love to hear how did you start and progressed throughout the journey.

36

u/epenance Jan 02 '21

I can't speak for OP, but what I've noticed for myself is that while I have a ton of business ideas for projects, I quickly burn out on those when trying to implement them, but if I find an idea for a tool that I would use myself I can push way more hours without feeling burned out and use extra effort on learning new tools a long the way.

I think its mainly about finding something that you would be passionate about building and then including 1-2 new things in those projects.

5

u/IJustWannaBeKing Jan 02 '21

When I was first got out of college, I worked this awful job doing data entry. The hours were brutal, I was exhausted every single day. I had no time or energy to write lines of code. I thought of an idea of a writing a userscript in the browser that could double my speed in terms of entering data at work and despite being tired every day I made sure to work on the script. Whenever I had two seconds to myself I would work on the code. Now we just need to find a way to become passionate about the work we are not passionate about and we will be fine.

3

u/foundry41 Jan 03 '21

For me it's having the roadmap.... it's easy to be like "okay whats next" and get burnt out and quit. If you have a huge todo list of features defined, it's easier to just hunker down and move on to building the next thing.

3

u/danstansrevolution Jan 02 '21

This might be dumb, but what is an S3 ID/Key, i'm guessing bucket is the URL, but I actually have no idea what to put for those values.

2

u/[deleted] Jan 02 '21

Most likely a reference to Amazon S3 Cloud Storage

0

u/danstansrevolution Jan 02 '21

Yeah.. i'm aware of that.. i've used s3 before, but I have no idea what an s3 ID/Key are.

1

u/[deleted] Jan 02 '21

Ah.. Pulling straws but this might be what your looking for: https://aws.amazon.com/blogs/security/wheres-my-secret-access-key/

2

u/danstansrevolution Jan 02 '21

Yeah I've been playing around with this for a bit, and there isn't enough feedback to get this figured out. I have tried access key and secret key as well as many variations on the bucket. I'm able to host it, I just don't have any functionality currently.

0

u/Mank15 Jan 02 '21

Do a YouTube tutorial on how you create this (maybe not your project per se but something alike o maybe another one involving the technology you use). That would be awesome!

12

u/gmawji Jan 02 '21

This is very cool. I literally was thinking the other day if I should make something to host private data rather than using public cloud for personal use. Will def check this out. It looks awesome!

6

u/aveon1 Jan 02 '21

Your project looks amazing IMO, the design and feel is similar to OneDrive/Google Drive
but I wanted to ask you the thought process of how do you decide the architecture and stuffs before-hand, do you ask people? You research? Are you already working on a job and this is your side project which you do to practice and sharpen your skills?

Might look into your code and try to understand some react stuffs as I'm also learning React for a year but never did such major projects.

6

u/krehwell Jan 02 '21

hey, who deleted the contents of my homework folder?

btw very cool you done there...

2

u/mcjob Jan 02 '21

Probably the dog again!

5

u/donnlee Jan 02 '21

Users can choose between sharing the file until the user removes public access, or a one-time link that will automatically expire once the file is downloaded one time.

Nice! just what i need. will install on a vps

3

u/zachpelkey Jan 02 '21

This is really cool! Any plans to integrate distributed file storage providers such as IPFS/filecoin? would love to even see support for pinning files via the infura or pinata gateways.

3

u/theShetofthedog Jan 02 '21

It looks cool, but i personally hate gdrive UI. It makes me dificult to find something by unnecesarilly oversizing elements and the amount of white space kills it for me. Any other storage interface like MEGA is far more clear.

Again, my only argument is about the UI you tried to mimic.

3

u/Bigtbedz Jan 03 '21

How much does it end up costing to host a project like this? I assume that the more users/storage used the more it costs but I'm just wondering a reasonable assumption for cost.

2

u/[deleted] Jan 02 '21

This is Incredible

1

u/Smaktat Jan 02 '21

What happens to the data?

1

u/HaelC Jan 03 '21 edited Jan 03 '21

I was going to star the repo, but I just find that I have starred it sometime ago.

1

u/ThroGM Jan 03 '21

How long it took you to build it ? Impressed 👍

1

u/[deleted] Jan 02 '21

This is awesome , I've read your source code and found that you've written test cases. I'm noob in case of testing can you please recommend from do you learn testing from ground up.

-1

u/wisdom_power_courage Jan 02 '21

You needed MongoDB and Amazon s3 together? I thought they were both databases? Would you mind clarifying these services please?

14

u/subnub99 Jan 02 '21

So Amazon S3 is where you store the file chunks. While In mongoDB it stores file object and metadata, such as the owner of the file, filename, size, ect. You can choose to just use mongoDB if you choose too, this will use a library called gridfs to store the file chunks in mongoDB. Although, this is not recommended since it puts more strain on the CPU, plus mongoDB storage is expensive if you are using a service such as atlas.

The reason you cannot use just Amazon S3 is that it is not really suitable for storing the a file object that you query, delete, and modify.

1

u/mcjob Jan 02 '21

Wondering about your thoughts of using mongo over dynamo?

1

u/AnonyMustardGas34 Jan 02 '21

Why not using Cassandra instead of MongoDB? Or will that be added in the future?

9

u/princeofthesix Jan 02 '21

MongoDB is a database. S3 is file storage.

3

u/wisdom_power_courage Jan 02 '21

Perfectly understood. Thank you!

-7

u/honestduane Jan 02 '21

I would never trust this because MongoDB is known for being architected in the the worst possible way and so your data will corrupt itself at load. Since Mondo DB uses a queue to write stream, there is no way to detect or repair that corrupted data.

0

u/lucbtc Jan 03 '21

Bruh, it uses Amazon to store the files. Complete bullshit what you are saying here

-4

u/honestduane Jan 03 '21 edited Jan 03 '21

Clearly you’re not listening or not reading because it says that he supports multiple backup systems so yes AWS is a complete and legit solution for this used by thousands of other people for various other things but you’re not listening because I said mongo DB not Amazon. MongoDB is not Amazon. Now fix that down vote because you’ve downloaded me for no reason.

1

u/lucbtc Jan 03 '21

What do you exactly mean with ‘data’ then?

1

u/twigboy Jan 03 '21 edited Dec 09 '23

In publishing and graphic design, Lorem ipsum is a placeholder text commonly used to demonstrate the visual form of a document or a typeface without relying on meaningful content. Lorem ipsum may be used as a placeholder before final copy is available. Wikipedia1wkt2pbze1z4000000000000000000000000000000000000000000000000000000000000

2

u/honestduane Jan 03 '21

Yes, Mongo is the issue. He doesn't seem to understand the difference between MongoDB and AWS. And Mongo corrupts data at scale no matter how its configured in my experience. It just a bad tool that was created as marketing gimmick using bad and non-customer focused design and engineering.

0

u/[deleted] Jan 02 '21

[deleted]

1

u/subnub99 Jan 02 '21

You can choose the filesystem.

52

u/[deleted] Jan 02 '21

[removed] — view removed comment

11

u/AnonyMustardGas34 Jan 02 '21

Open source so yes