Skip to content
/ vaultly Public

Secure message storage with end-to-end encryption, auto-expiration, and one-time access. Built with Fastify, PostgreSQL, and deployed on Netlify.

License

Notifications You must be signed in to change notification settings

xcfio/vaultly

Repository files navigation

Vaultly 🔐

Code Test Node.js Version License Fastify TypeScript Package Manager Support on Patreon Time

Secure Message Storage & Retrieval System

A modern, encrypted messaging service that allows users to securely store and share sensitive information with advanced security features.

🌐 Live Demo

https://vaultly-xcfio.vercel.app/

✨ Features

  • 🔒 End-to-End Encryption - Messages are encrypted with user-defined keys
  • ⏰ Expiration Control - Set automatic message expiration dates
  • 🔥 One-Time Access - Self-destructing messages after single retrieval
  • 🌙 Dark/Light Theme - Beautiful UI with theme switching
  • 📱 Responsive Design - Works seamlessly across all devices
  • 🎨 Modern Interface - Animated background with Comfortaa typography

🚀 Quick Start

  1. Create Message: Enter your encryption key and message content
  2. Set Options: Configure expiration time and one-time access
  3. Share ID: Send the generated message ID to your recipient
  4. Retrieve: Recipient uses ID and decryption key to access the message

🛠️ Tech Stack

  • Frontend: HTML5, CSS3, JavaScript (ES6+)
  • Backend: Fastify.js with Netlify Functions
  • Database: PostgreSQL with Drizzle ORM
  • Deployment: Netlify
  • Styling: Custom CSS with animations and gradients
  • Typography: Comfortaa font family
  • Security: Client-side encryption with custom key management

📦 Dependencies

  • @fastify/rate-limit - Provides rate limiting functionality to prevent API abuse and protect against spam
  • @netlify/functions - Enables deployment of serverless functions on Netlify platform
  • drizzle-orm - Type-safe database toolkit with SQL-like syntax for PostgreSQL operations
  • fastify - High-performance web framework for building REST APIs with excellent TypeScript support
  • postgres - Lightweight PostgreSQL client with modern async/await support
  • serverless-http - Wrapper that allows Express/Fastify apps to run as serverless functions
  • uuid - Generates unique identifiers for message storage and retrieval
  • @types/node - TypeScript type definitions for Node.js built-in modules
  • @types/uuid - TypeScript type definitions for UUID library
  • drizzle-kit - CLI tool for database schema migrations and code generation

📄 File Explanations

Core Application Files

  • netlify/functions/ - Serverless functions directory for Netlify deployment
  • database/index.ts - Database schema definition using Drizzle ORM, handles PostgreSQL connection
  • routes/index.ts - Main API route handler that processes HTTP requests
  • post-message.ts - API endpoint for storing new encrypted messages with expiration settings
  • put-message.ts - API endpoint for retrieving messages, handles one-time access logic
  • crypto.ts - Client-side encryption utilities for message security
  • html.ts - HTML template generation for the web interface

Configuration Files

  • drizzle.config.ts - Database ORM configuration for schema management
  • netlify.toml - Netlify deployment settings and build configuration
  • tsconfig.json - TypeScript compiler configuration
  • package.json - Project metadata, dependencies, and npm scripts

Development Files

  • .github/workflows/test.yml - Automated testing and deployment pipeline
  • .prettierrc - Code formatting rules for consistent styling
  • .gitignore - Specifies files to exclude from version control
  • env.example - Template for required environment variables

Documentation

  • README.md - Comprehensive project documentation (this file)
  • LICENSE - MIT license for open-source usage

🔧 Installation & Setup

  1. Clone the repository

    git clone https://github.com/xcfio/vaultly.git
    cd vaultly
  2. Install dependencies

    pnpm install
  3. Set up environment variables

    cp env.example .env
    # Edit .env with your database credentials
  4. Start development server

    node --run dev

🎯 Use Cases

  • Sharing passwords and API keys
  • Sending confidential business information
  • Temporary secure communication
  • One-time sensitive data transmission

🚀 Deployment

This project is configured for automatic deployment on Netlify. Simply connect your GitHub repository to Netlify, and it will automatically deploy on every push to the main branch.

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Secure message storage with end-to-end encryption, auto-expiration, and one-time access. Built with Fastify, PostgreSQL, and deployed on Netlify.

Resources

License

Stars

Watchers

Forks

Sponsor this project

Contributors 2

  •  
  •