Giter VIP home page Giter VIP logo

steve2700 / alx-files_manager Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 33.81 MB

This project is a summary of this back-end trimester: authentication, NodeJS, MongoDB, Redis, pagination and background processing.

JavaScript 0.19% Makefile 0.59% C 77.40% CMake 0.08% C++ 0.19% Shell 0.40% Perl 1.41% M4 0.80% XSLT 0.01% Python 0.41% HTML 2.21% Roff 0.06% CSS 0.01% Batchfile 0.01% Lua 0.09% Ruby 0.18% Tcl 15.95% Smarty 0.01%

alx-files_manager's Introduction

alx-files_manager

This project is a summary of this back-end trimester: authentication, NodeJS, MongoDB, Redis, pagination and background processing.

Awesome File Management Service

This project is a comprehensive back-end solution for a file management service, covering authentication, NodeJS, MongoDB, Redis, pagination, and background processing.

Project Overview

The goal is to build a robust platform for uploading and viewing files with a focus on simplicity and learning.

Table of Contents

Features

  • User Authentication via Token: Secure your platform with user authentication using tokens.
  • List All Files: Display a comprehensive list of all files available in the system.
  • Upload a New File: Allow users to upload new files easily.
  • Change Permission of a File: Grant users the ability to modify file permissions.
  • View a File: Provide users with the capability to view files directly within the platform.
  • Generate Thumbnails for Images: Automatically generate thumbnails for image files.

Getting Started

Prerequisites

Make sure you have the following tools installed:

  • Node (version 12.x.x)
  • MongoDB
  • Redis

Installation

  1. Clone the repository:

    git clone https://github.com/steve2700/alx-files_manager.git
    cd alx-files_manager

Install dependencies:

  1. npm install
    

Start the application:

npm start

## Project Structure
The project is organized into various components and functionalities:

-**Authentication**: Token-based authentication for securing user access.
-**MongoDB**: Integration for persistent storage of user data and files.
-**Redis**: Utilized for temporary data storage and caching.
-**Background Processing with Bull**: Asynchronous task handling for operations like thumbnail generation.
**File Operations**: Efficiently managing file-related operations.
Usage
Authentication
The platform utilizes token-based authentication. Users need to obtain a token for accessing protected routes. Include the token in the request headers.

## MongoDB
User and file data are stored in MongoDB. MongoDB models and schemas ensure proper data organization.

## Redis
Temporary data is stored in Redis. Redis serves as a fast and efficient solution for caching and temporary storage.

### Background Processing
Bull is employed for background processing. It manages tasks asynchronously, providing efficiency in operations such as generating thumbnails for images.

File Operations
List All Files:

## Endpoint: /api/files
Method: GET
Upload a New File:

## Endpoint: /api/files/upload
Method: POST
Change Permission of a File:

## Endpoint: /api/files/:id/permissions
Method: PUT
View a File:

## Endpoint: /api/files/:id
Method: GET
Testing
Ensure your code adheres to best practices and is consistently styled by running:

```bash
npm test






alx-files_manager's People

Contributors

imuaz avatar steve2700 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.