This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
ClipVault is a web application that allows you to securely share files and text using a simple 4-digit code. It's designed for quick, secure, and temporary sharing of sensitive information.
- Project Overview
- Key Features
- Installation
- Usage
- Tech Stack
- API Endpoints
- Environment Variables
- Contributing
- License & Credits
ClipVault enables users to easily share files and text snippets with a unique 4-digit code. This code is used by the recipient to access the shared content. You can configure receiver limits and set an expiry for the shared data.
- Secure Sharing: Utilizes a 4-digit code system for secure content access.
- File & Text Support: Share both files and text snippets.
- Configurable Receivers: Limit the number of times the content can be accessed.
- Expiration: Set an expiry time for the shared content to ensure it's only available for a limited time.
- Simple Interface: User-friendly interface built with Tailwind CSS.
To get ClipVault up and running locally, follow these steps:
Make sure you have the following installed:
-
Clone the repository:
bash npm install
- Open the ClipVault web application in your browser.
-
Enter the text or upload the file you want to share.
-
Configure the receiver limit and expiry time as needed.
-
Click the "Share" button.
-
A unique 4-digit code will be generated. Share this code with the intended recipient.
- The recipient enters the 4-digit code in the "Receive" section of the ClipVault web application.
- If the code is valid and the receiver limit has not been reached, the content (file or text) will be displayed or available for download.
- Once the expiry time has passed or the receiver limit has been reached, the content will no longer be accessible.
- Node.js: JavaScript runtime environment for the backend.
- Express.js: Web application framework for Node.js, used for building the API.
- MongoDB GridFS: Used for efficient storage of files in MongoDB.
- Tailwind CSS: A utility-first CSS framework for styling the user interface.
- Multer: Node.js middleware for handling
multipart/form-data, which is primarily used for uploading files.
POST /api/send: Uploads files and/or text content. Acceptsmultipart/form-datafor files andtextfield for text content.GET /api/receive/:code: Retrieves shared content based on the provided 4-digit code.GET /api/file/:id: Downloads a specific file from GridFS based on its ID.
Create a .env file in the root directory of the project. Add the following variables:
PORT=3000 MONGODB_URI=<your_mongodb_connection_string> BASE_URL=http://localhost:3000 # URL of your application
Replace
<your_mongodb_connection_string>with your actual MongoDB connection string. AdjustBASE_URLif your application is hosted on a different domain or port. ThePORTvariable determines the port on which the server will listen.
We welcome contributions to ClipVault! If you'd like to contribute:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and commit them with clear, concise messages.
- Submit a pull request.
Please ensure your code follows the project's coding standards and includes appropriate tests.
ClipVault is licensed under the MIT License.
This project utilizes the following dependencies: