💡 Inspiration In today's digital landscape, sensitive documents, source codes, private keys, and personal financial data are frequently stored in unencrypted cloud services or shared via unprotected links. Major data breaches and accidental leaks occur every day because users lack a simple, zero-knowledge tool to encrypt files locally and verify document contents before sharing. We were inspired to build ByteSphere File Vault—a secure, self-hosted platform that combines military-grade AES-256-GCM envelope encryption with Google Gemini AI to analyze document safety and catch sensitive data leaks before files ever leave your hands. 🔒 What it does Zero-Knowledge Envelope Encryption: Every uploaded file is encrypted with a unique, randomly generated 256-bit Data Encryption Key (DEK). The key is wrapped with the server Master Key (KEK) using AES-256-GCM authenticated encryption with 16-byte authentication tags. Raw files are never stored in plain text. AI Document Intelligence & Risk Scoring: Uses Google Gemini AI and an analytical heuristic scanner to inspect document snippets, summarize contents in plain English, detect leaked credentials (API keys, passwords, PII), and assign a safety risk score (0 to 100). Self-Destructing & Expiring Share Links: Allows users to generate secure download links with custom expiration windows (1 hour, 24 hours, 7 days), download limits (1-time download self-destruct), and optional access passcodes. Tamper-Evident Audit Logging: Real-time activity logs record every upload, download, deletion, and share creation with exact timestamps, IP addresses, and user-agent tracking. Zero-Config Database Failover: Connects to local MongoDB or seamlessly launches an embedded in-memory database if no local MongoDB instance is running, guaranteeing zero setup issues. 👥 How Our Team Divided the Work Laiba Khalid (Frontend & UI/UX Lead): Built the complete responsive web interface using React 18, Vite, and Tailwind CSS. Designed the interactive 3D CyberSphere canvas visualizer, user vault dashboard, drag-and-drop upload modals, and public share download portal. Kinza Khalid (Backend & Cloud AI Lead): Developed the RESTful API backend using Node.js, Express, and TypeScript. Integrated the Google Gemini 1.5 AI document analysis pipeline with a heuristic fallback engine, implemented streaming upload handlers (Multer), and built the in-memory database failover system. Shazeen Amjad (Security & Cryptography Lead): Engineered the bank-grade AES-256-GCM Envelope Encryption engine (DEK/KEK lifecycle) with SHA-256 data integrity checks. Designed the expiring share link security protocols and built the tamper-evident audit logging architecture. ⚙️ How we built it Frontend: React 18, TypeScript, Tailwind CSS, Lucide Icons, Vite, and Axios for JWT-authenticated API requests. Backend: Node.js, Express, TypeScript, Multer streaming file processor, and Winston logger. Cryptography: Node.js native crypto module implementing AES-256-GCM envelope encryption with 96-bit IVs and 128-bit authentication tags. AI & Intelligence: Google Generative AI SDK (Gemini 1.5 Flash/Pro) for automated document summarization and PII/credential leak scoring. Database & Auth: MongoDB with Mongoose ODM, MongoDB Memory Server for auto-failover, and JWT authentication with Bcrypt password hashing. 🚧 Challenges we ran into Streaming Large File Encryption: Encrypting large files without loading the entire binary into server RAM. We solved this by implementing Node.js cryptographic cipher streams that pipe data directly from upload to encrypted disk storage. AI Document Risk Analysis without Exposing Full Files: Sending sensitive files to an AI model poses privacy risks. We engineered a selective, safe text snippet extraction pipeline that scans for PII and regex credentials locally first before passing sanitized contextual previews to Gemini AI. Zero-Configuration Portability: Making the project run out-of-the-box on any computer without requiring manual MongoDB installation. We built an automatic detection failover that boots an in-memory MongoDB server if a connection is not found. 🏆 Accomplishments that we're proud of Successfully engineered true AES-256-GCM envelope encryption where files cannot be read even if the storage layer is compromised. Built a seamless Google Gemini AI integration that provides instant summaries and security grades in seconds. Designed an intuitive, modern UI with interactive 3D elements that make advanced cryptography easy and accessible to non-technical users. 📚 What we learned Deep practical knowledge of modern symmetric cryptography, IV uniqueness, and authentication tag validation in AES-GCM. Best practices for prompt engineering and structured JSON output parsing with Google Gemini 1.5. Building modular, full-stack monorepo architectures with TypeScript and Vite. 🔮 What's next for ByteSphere Adding client-side WebCrypto API encryption so keys never touch the backend server. Developing a Chrome Browser Extension to scan downloaded files and website privacy policies automatically. Cloud storage adapters for AWS S3 and Google Cloud Storage buckets with envelope encryption.

Built With

Share this project:

Updates