A comprehensive file storage and management platform built with Node.js.
This project is a file storage and management platform that combines various backend technologies to create a robust file management system. It implements user authentication, file upload/download capabilities, image processing, and background job processing.
- User authentication and management
- File upload and storage
- File permission management (public/private)
- Image thumbnail generation
- Background job processing
- Email notifications
- API-first design
- Redis caching
- MongoDB storage
- Runtime: Node.js
- Framework: Express.js
- Database: MongoDB
- Caching: Redis
- Job Queue: Bull
- Testing: Mocha
- Development: Nodemon
- Image Processing: Sharp (for thumbnails)
- Email: NodeMailer
POST /users- Create new userGET /users/me- Get current user infoGET /connect- Sign in userGET /disconnect- Sign out user
POST /files- Upload new fileGET /files/:id- Get file by IDGET /files- List all filesPUT /files/:id/publish- Make file publicPUT /files/:id/unpublish- Make file privateGET /files/:id/data- Get file content
-
Clone the repository:
git clone https://github.com/yourusername/alx-files_manager.git cd alx-files_manager -
Install dependencies:
npm install
-
Configure environment variables:
cp .env.example .env # Edit .env with your configuration -
Start required services:
# Start MongoDB mongod # Start Redis redis-server
-
Run the application:
npm start
- Run in development mode:
npm run dev - Run tests:
npm test - Lint code:
npm run lint
PORT: API port (default: 5000)DB_HOST: MongoDB hostDB_PORT: MongoDB portDB_DATABASE: MongoDB database nameREDIS_HOST: Redis hostREDIS_PORT: Redis portFOLDER_PATH: Local storage folder path
The project includes comprehensive tests using Mocha:
npm test- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- ALX Software Engineering Program
- All contributors and reviewers