Skip to content

BinyamMamo/alx-files_manager

Repository files navigation

Files Manager 🗃️

Project Overview

This project is a files manager built using back-end technologies such as JavaScript ES6, NoSQL MongoDB, Redis, NodeJS, and ExpressJS. The purpose of the project is to create a simple platform for uploading and viewing files, with features like user authentication, file listing, file uploading, changing file permissions, file viewing, and generating thumbnails for images.

Requirements and Dependencies

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

Features

  • User authentication via token
  • File listing
  • File upload
  • Permission management
  • File viewing
  • Image thumbnail generation

How to Use

To use the Files Manager application, follow these steps:

  1. Install Node.js (version 12.x.x) if it is not already installed.
  2. Install Redis and MongoDB on your system.
  3. Clone the repository:
git clone <repository-url>
  1. Navigate to the project directory:
cd alx-files_manager
  1. Install the project dependencies:
npm install
  1. Set up the necessary environment variables, such as DB_HOST, DB_PORT, and DB_DATABASE.
  2. Start the server:
npm start
  1. Access the application in your browser at http://<DB_HOST>:<DB_PORT>.

Project Structure

.
├── package.json
├── .eslintrc.js
├── babel.config.js
├── utils/
│   ├── redis.js
│   └── db.js
├── server.js
├── routes/
│   └── index.js
└── controllers/
    └── AppController.js

Here are the important files used in this project:

File Description
redis.js Contains the implementation of the RedisClient class for Redis connection and operations.
db.js Contains the implementation of the DBClient class for MongoDB connection and operations.
server.js Creates the Express server and loads the routes.
index.js Defines the API endpoints for the application.
AppController.js Contains the implementation of the API endpoints for getting the status and statistics.
package.json Defines the project's dependencies and scripts.
.eslintrc.js Configures ESLint for code linting.
babel.config.js Configures Babel for transpiling JavaScript code.

🎓 Key Takeaways

  • Creating an API with Express.js
  • User authentication and authorization
  • Storing data in MongoDB
  • Working with Redis for temporary data storage
  • Setting up and using a background worker
  • Handling file upload and permission management
  • Generating image thumbnails

Acknowledgements

This project was completed as part of the curriculum at ALX SWE program.

_______ ______ ____  __       ___________       ____________
___    |___  / __  |/ /       __  ___/__ |     / /___  ____/
__  /| |__  /  __    /        _____ \ __ | /| / / __  __/   
_  ___ |_  /____    |         ____/ / __ |/ |/ /  _  /___   
/_/  |_|/_____//_/|_|         /____/  ____/|__/   /_____/   
                                                            

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published