GithubHelp home page GithubHelp logo

arijit6258 / storage-drive-for-enterprises Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 340 KB

An enterPrise storage drive web app for storing files in cloud. The storage drive is storage and database agnostic unlike most of the currently available solutions in the market.

JavaScript 54.82% CSS 17.99% Handlebars 27.19%
webdevelopment html-css-javascript full-stack mongodb nos

storage-drive-for-enterprises's Introduction

MyDrive

Storage Drive for digital assets which can be adopted by enterprises and integrated with their other systems. Features include:

  • Upload file.
  • View all files.
  • Download file.
  • Rename file.
  • Delete file.
  • Add to favorites.
  • Trash storage.
  • Share file with a url for certain expiry time.
  • Recent files by modified time.
  • Error handling for all routes.
  • Authentication for users to login.
  • Created and updated time of file.
  • Search files

SETUP INSTRUCTIONS

Node.js version 14+ and npm must be installed on your machine. MongoDb must be installed and runing on port:27017. In terminal type the following commands to run the api server:

git clone https://github.com/Crio-Winter-of-Doing-2021/VICARA-T3
cd backend
touch dev.env
vim dev.env
sudo npm install
npm run dev

Insert the following lines in dev.env, replacing all <content> with your own information:

PORT=3000
MONGODB_URL=<mongodb connection string>
JWT_SECRET=<unique key of your choice to generate JSON web tokens>
ACCESS_KEY_ID=<aws s3 access key>
SECRET_ACCESS_KEY=<aws s3 secret access key>
BUCKET_NAME=<aws s3 bucket name>

In another terminal to run the application

cd frontend
touch dev.env
vim dev.env
sudo npm install
npm run dev

Insert the following lines in dev.env, replacing all <content> with your own information:

PORT=8000

Server

The server is made on nodejs (v14.15.4)

Express.js is used as the server framework

NPM Library

  • cors - to provide a Connect/Express middleware that can be used to enable CORS .

  • env-cmd - to use env variables.

  • mongoose - MongoDB library for JS.

  • hbs - to render hbs files.

  • aws-sdk - to use aws s3 bucket.

  • jsonwebtoken - to create authentication token..

  • bcryptjs - to encrypt plain password.

  • validator - to validate and sanitize string.

API

  • The various requests and endpoints are:-

    • POST /signup - to create user.

    • POST /login - to login.

    • POST /logout - to logout.

    • POST /logoutAll - to logout all sessions.

    • GET /me - to get user profile.

    • PATCH /me - to update user information.

    • DELETE /me - to delete user profile.

    • POST /upload - to upload a file.

    • POST /share - to share a file.

    • GET /download/:file_id - to download a file.

    • GET /files - to view all files.

    • GET /trash - to view all trash files.

    • GET /files/fav - to view all favorite files.

    • PATCH /rename/:file_id - to rename a file.

    • PATCH /trash/:file_id - to update trash status of a file.

    • PATCH /fav/:file_id&:fav - to update favorite status of a file.

    • DELETE /files/:file_id - to delete a file.

  • Use POSTMAN to fire off the requests to the endpoints.

storage-drive-for-enterprises's People

Contributors

arijit6258 avatar paranjaysaxena avatar som-crio-do avatar

Stargazers

 avatar

Watchers

 avatar

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.