GhostVault is a secure ephemeral messaging platform rebuilt with a modern stack (React, TypeScript, Vite). It features client-side AES-256 encryption, creating self-destructing secrets that burn after being read once. The frontend handles all encryption/decryption locally β the server never sees your unencrypted data.
Zero-Knowledge Architecture: The server acts as a blind storage. All encryption/decryption happens in your browser using the user's key, which never travels to the network.
- JosΓ© Ferreira - GitHub Profile
- Cesar Vethencourt - GitHub Profile
- Javier Regnault - GitHub Profile
- π Client-Side AES-256 Encryption: Powered by
crypto-jsand React hooks. - π₯ Burn-on-Read: Secrets are deleted from the server immediately after retrieval.
- π‘οΈ Magic Token Validation: Robust integrity check to distinguish between incorrect passwords and corrupted data.
- π Encrypted File Attachments: Support for up to 3 files (10 MB each) with individual encryption for names and content.
- π¨ Modern UI: Glassmorphism design, dark mode, and smooth animations using Tailwind CSS.
- β‘ Lightning Fast: Powered by Vite for instant HMR and optimized builds.
- π§© Type Safety: Full TypeScript implementation for robust logic.
To run this project locally, you need:
- Node.js (v18+ recommended)
- npm (comes with Node.js)
- A backend API running (see GhostVault Backend)
git clone [https://github.com/JoseMiguelFN7/GhostVault-Front-React.git](https://github.com/JoseMiguelFN7/GhostVault-Front-React.git)
cd GhostVault-Front-Reactnpm installCreate a .env file in the project root:
cp .env.example .envEdit .env and configure your API credentials. Note: Variables must start with VITE_ to be exposed to the client.
# .env
VITE_API_DOMAIN=http://localhost:8000
VITE_API_KEY=your_api_key_here
VITE_APP_ENV=development
VITE_APP_DEBUG=truenpm run devThe application will be available at http://localhost:5173 (or the port shown in your terminal).
| Script | Description |
|---|---|
npm run dev |
Starts the development server with HMR. |
npm run build |
Compiles TypeScript and builds the app for production. |
npm run preview |
Locally preview the production build. |
npm run lint |
Runs ESLint to check for code quality issues. |
GhostVault-Front-React/
βββ .env # Environment variables (gitignored)
βββ .env.example # Template for environment variables
βββ index.html # Entry HTML file
βββ package.json # Project dependencies and scripts
βββ tailwind.config.js # Tailwind CSS configuration
βββ tsconfig.json # TypeScript configuration
βββ vite.config.ts # Vite configuration
βββ src/
βββ assets/ # Static assets (Logos, images)
β βββ GhostVault.svg
βββ components/ # Reusable UI components
β βββ CreateSecretForm.tsx # Main form logic for creating secrets
β βββ ErrorTooltip.tsx # Custom floating error feedback
β βββ FeedbackOverlays.tsx # Modals (Success, Error, Loading)
β βββ ReceptionVisuals.tsx # Components for the secret view (Badge, Password)
βββ config/ # Configuration files
β βββ api.ts # Centralized environment variables
βββ pages/ # Main Application Views
β βββ Home.tsx # Landing page (Create Secret)
β βββ SecretView.tsx # Reception page (Decrypt Secret)
βββ services/ # Business Logic & API
β βββ api.ts # Axios instance and API methods
β βββ encryption.ts # AES-256 implementation & Magic Token logic
βββ utils/ # Helper functions
β βββ fileHelper.ts # File to Base64 converter
βββ App.tsx # Router configuration
βββ index.css # Global styles & Tailwind imports
βββ main.tsx # Application entry point
To ensure data integrity and distinguish between an incorrect password and an empty message, we append a signature before encryption:
"Message" + "||GV-VALID||" -> Encrypt -> Payload
Upon decryption, the client checks for this token. If missing, it confirms the encryption key was incorrect, preventing ambiguity with empty strings or corrupted data.
- Input: User enters text and optionally drops files.
- Key Gen:
- Manual: User provides a password.
- Auto: A secure random 16-char key is generated locally.
- Encryption:
- The message (with the Magic Token) is encrypted using AES-256.
- Files are converted to Base64 and encrypted individually (both name and content).
- Transport: The encrypted blob (JSON containing message + files) is sent to the API via HTTPS.
- Link Generation: The app constructs a URL containing the
UUID(returned by server) and theKey(in the URL hash#), ensuring the key is never sent to the server.
- Parsing: The app extracts the
UUIDfrom the path and theKeyfrom the URL hash. - Fetching: The encrypted payload is retrieved from the API.
- Decryption:
- Auto-Decrypt: If the URL hash is present, the app attempts to decrypt immediately.
- Manual: If
requires_passwordis true (or hash is missing), a modal prompts the user for the password.
- Verification: The "Magic Token" is validated. If valid, the content is displayed; otherwise, an error is shown.
- Destruction: The server automatically deletes the secret immediately after it is fetched.
- Framework: React 18 - Component-based UI library
- Language: TypeScript - Statically typed JavaScript for robust code
- Build Tool: Vite - Next Generation Frontend Tooling for instant HMR
- CSS Framework: Tailwind CSS - Utility-first CSS framework
- Icons: Lucide React - Lightweight, consistent icon set
- Visuals: Custom Glassmorphism effects and CSS animations (Gradient Shifts, Glows)
- Cryptography: Crypto-JS - Industry standard AES-256 implementation
- HTTP Client: Axios - Promise-based HTTP client for API communication
- Routing: React Router DOM - Declarative routing for Single Page Applications
This project is licensed under the MIT License - see the LICENSE file for details.
- GhostVault Backend - Laravel API