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.
- Node JS (version 12.x.x)
- Redis
- MongoDB
- Express
- User authentication via token
- File listing
- File upload
- Permission management
- File viewing
- Image thumbnail generation
To use the Files Manager application, follow these steps:
- Install Node.js (version 12.x.x) if it is not already installed.
- Install Redis and MongoDB on your system.
- Clone the repository:
git clone <repository-url>
- Navigate to the project directory:
cd alx-files_manager
- Install the project dependencies:
npm install
- Set up the necessary environment variables, such as
DB_HOST
,DB_PORT
, andDB_DATABASE
. - Start the server:
npm start
- Access the application in your browser at
http://<DB_HOST>:<DB_PORT>
.
.
├── 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. |
- 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
This project was completed as part of the curriculum at ALX SWE program.
_______ ______ ____ __ ___________ ____________ ___ |___ / __ |/ / __ ___/__ | / /___ ____/ __ /| |__ / __ / _____ \ __ | /| / / __ __/ _ ___ |_ /____ | ____/ / __ |/ |/ / _ /___ /_/ |_|/_____//_/|_| /____/ ____/|__/ /_____/