Crypt- It

Empowering secure and seamless file management with Node.js, Express.js, and MongoDB, featuring AES-256-CBC encryption and effortless sharing via a dynamic EJS-powered interface.

Try Crypt-It Live App

Overview

Crypt-It is a robust Node.js application designed for secure file sharing and management. It provides users with seamless registration, authentication, and file handling capabilities while prioritizing data security through advanced encryption techniques. Whether you're uploading sensitive documents or collaborating on confidential projects, Crypt-It ensures that your information remains private and protected at every step.

Technology Stack

Backend

  • Node.js: Server-side runtime environment.
  • Express.js: Web application framework for Node.js.
  • Mongoose: ODM for MongoDB to handle data models and queries.

Database

  • MongoDB: NoSQL database for storing user and file data.

Frontend

  • HTML/CSS: For structuring and styling the web pages.
  • JavaScript: For client-side scripting.
  • EJS: Templating engine for generating HTML with embedded JavaScript.

Security

  • AES-256-CBC: Encryption algorithm used for encrypting file contents.
  • BCrypt: For hashing user passwords.
  • Sessions: For managing user sessions securely.

Detailed Features and Flow

User Authentication

  • Signup: Users register with their email and a secure password.
  • Login: Users log in with their registered email and password, starting a session.
  • Logout: Ends the user session securely.

File Upload and Encryption

  • Upload Form: Users upload .txt files through a form, providing an encryption key.
  • Encryption: The file content is encrypted on the client-side before being sent to the server.
  • Storage: Encrypted files are stored in the database along with metadata and the initialization vector (IV).

Dashboard and File Management

  • File List: Displays a list of user's files and files shared with the user.
  • Actions: Users can view, share, and delete files through action buttons.

File Viewing and Decryption

  • View Modal: A modal where users can enter their decryption key to view file contents.
  • Decryption: The server decrypts the file content and sends it back to the client.

File Sharing

  • Share Modal: A modal where users enter the email of the user they want to share the file with.
  • Validation: The system checks if the email is valid and registered before sharing the file.
  • Shared List: Displays users who have access to the file.

File Deletion

  • Owner Deletion: Owners can delete files they have uploaded.
  • Shared User Removal: Shared users can remove their access to the shared file.

Account Deletion

  • Confirmation: Users are prompted to confirm account deletion.
  • Cascade Deletion: Deletes all user files and removes shared access.

User Interface

Responsive Design

  • The application features a responsive design ensuring usability across various devices.

User-friendly Interface

  • Clean and intuitive interface for easy navigation and file management.

GitHub Repository