Skip to content

The Secure File Sharing Platform's back-end manages file uploads, encryption, downloads, and auto-deletion. Built with Node.js and Express, it ensures secure, scalable, and efficient handling of temporary anonymous file sharing, adaptable for various front-end integrations.

License

Notifications You must be signed in to change notification settings

ivanscorral/secure-file-sharing-backend

Repository files navigation

Secure File Sharing System Backend Implementation

A web-based platform for anonymous and secure file sharing. This project has recently been refactored to TypeScript and now uses AES encryption for file security and MongoDB for data storage. Files can be configured to expire either based on time or download count.

🌟 Features

  • Anonymous File Sharing: Enables file sharing without requiring user authentication or registration.
  • AES Encryption: Employs Advanced Encryption Standard (AES) for secure file storage.
  • File Expiration: Allows setting file expiration based on time or download count.
  • TypeScript: Recently refactored to TypeScript for better type safety and maintainability.
  • Database: Utilizes MongoDB for metadata storage and other operational data.

🛠️ Tech Stack & Tools

  • Backend Framework: Node.js with Express, refactored for TypeScript support to enhance code maintainability and type safety.
  • Database Engine: MongoDB for NoSQL storage, optimized for high volume data and JSON-like documents.
  • Encryption Standard: Utilizes Advanced Encryption Standard (AES) for robust file security.
  • Package Management: Supports both npm and pnpm for dependency management.
  • Code Quality: ESLint configured for TypeScript to enforce code quality and style guidelines.
  • Version Control System: Git for source code management, including branching and versioning.
  • Server Environment: Designed for Node.js 20, ensuring compatibility with the latest ECMAScript features.

🚀 Installation

Prerequisites

  • Node.js (v20.0.0 or higher)
  • MongoDB (v7.0 or higher)
  • Typescript (ts-node)

Steps

  1. Clone the Repository

     git clone https://github.com/ivanscorral/secure-file-sharing-backend.git
  2. Navigate to Project Directory

    cd secure-file-sharing-backend
  3. Install Dependencies

    npm install
  4. Configure Environment Variables

    • Copy .env.example to .env.
    • Update .env with your MongoDB URL, secret keys, or any other required variables.
    cp .env.example .env
  5. Start the Server

    npm start

    This will compile TypeScript and start the Express server.

📚 Usage

npm scripts

  • npm start: Runs the node command on the compilation folder.
  • npm prestart:
  • npm lint: Calls eslint to enforce the rules on all the project based on the .eslintrc.js configuration.
  • npm lint:fix: Calls eslint with the --fixparameter. This will automatically fix all auto-fixable errors with the linting. Warnings will be ignored.

Refer to the updated API documentation for a complete guide on available endpoints and usage instructions.

👥 Contributing

Contributions are highly encouraged! For guidelines on how to contribute, please read CONTRIBUTING.md.

📖 Documentation

  • File Upload Flow: Updated in-depth guide covering the file upload process, including client-server interactions and encryption.

❓ FAQ

  • How do I report a bug?

    • Use the GitHub Issues for reporting bugs.
  • Is it possible to extend the file expiration time?

    • No, once the file is uploaded, the expiration time cannot be changed.
  • How secure is the file encryption?

    • Files are encrypted using AES, which is a secure and widely used encryption standard.

📄 License

This project is under the MIT License. See LICENSE file for more details.

Reporting issues or feedback

For inquiries, issues, or feedback, please open an issue. Make sure to read the contributing section of this README before opening an issue.


Made with ❤️ by Iván Sánchez Corral, 2023.

About

The Secure File Sharing Platform's back-end manages file uploads, encryption, downloads, and auto-deletion. Built with Node.js and Express, it ensures secure, scalable, and efficient handling of temporary anonymous file sharing, adaptable for various front-end integrations.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published