A production-ready secure message storage platform powered by Nillion Network with end-to-end encryption, cryptographic verification, and nilChain blockchain anchoring.
π Try it now: https://nillionvault-frontend.onrender.com/
- β Store Messages with end-to-end encryption
- β Verify & Decrypt using proof hashes
- β Manage Messages with search, filter, and export
- β Blockchain Anchoring for immutable proof
Backend API: https://nillionvault-backend.onrender.com
Health Check: https://nillionvault-backend.onrender.com/health
- π Secure Message Storage: Store text messages with end-to-end encryption on Nillion SecretVaults
- π¦ Bulk Upload: Upload multiple messages at once (up to 50 messages)
- π Cryptographic Verification: SHA-256 hash generation for message authenticity
- π Message Management:
- View all stored messages (metadata only - privacy-first)
- Search and filter messages by filename and hash
- Sort by date, name, or size
- Export messages (all or selected) as JSON
- Delete messages
- View message statistics
- Privacy-First: Message content only accessible via verification hash
- π Blockchain Anchoring: Automatic anchoring to nilChain for immutable proof of existence
- π― Clean UI: Modern, professional interface focused on usability
- β‘ Real-time Processing: Instant feedback on storage and verification
βββββββββββββββββββ
β User Browser β
ββββββββββ¬βββββββββ
β
βΌ
βββββββββββββββββββ
β Frontend β HTML/CSS/JavaScript (Port 3000)
β (Pure HTML) β
ββββββββββ¬βββββββββ
β REST API
βΌ
βββββββββββββββββββ
β Backend API β Node.js/Express (Port 3001)
β (Express) β
ββββββββββ¬βββββββββ
β
ββββββ΄βββββ
β β
βΌ βΌ
βββββββββββ ββββββββββββββββ
β Nillion β β nilChain β
βSecretDB β β (Anchoring) β
βββββββββββ ββββββββββββββββ
Technology Stack:
- Frontend: Pure HTML5/CSS3/JavaScript (Port 3000) - No frameworks
- Backend: Node.js/Express API (Port 3001)
- Storage: Nillion SecretVaults (testnet) - Encrypted distributed storage
- Blockchain: nilChain testnet - Immutable proof anchoring
- Architecture: Nillion-only (no external databases)
NillionVault/
βββ π backend/ # Node.js API server
β βββ π routes/ # API endpoints
β β βββ credentials.js # Upload, verify, list, delete
β β βββ verification.js # Hash computation utilities
β βββ π services/ # Business logic
β β βββ nillion.js # Nillion SecretVaults integration
β β βββ anchor.js # nilChain blockchain anchoring
β β βββ queue.js # Job queue (Nillion-only mode)
β βββ π middleware/ # Express middleware
β β βββ errorHandler.js # Error handling & logging
β βββ π utils/ # Utility functions
β β βββ envValidator.js # Environment validation
β βββ π server.js # Main server file
β βββ π package.json # Backend dependencies
β βββ π env.example # Environment template
βββ π frontend/ # HTML frontend
β βββ π public/ # Static files
β β βββ π index.html # Main application
β β βββ π server.js # Simple HTTP server
β βββ π package.json # Frontend dependencies
βββ π deploy/ # Deployment configurations
β βββ π docker-compose.yml # Docker setup
β βββ π render.yaml # Render deployment config
β βββ π DEPLOYMENT.md # Deployment guide
βββ π docs/ # Documentation
β βββ π architecture.md # System architecture
βββ π collection-schema.json # Nillion collection schema
βββ π .gitignore # Git ignore rules
βββ π README.md # This file
βββ π LICENSE # MIT License
- Node.js 18+ and npm
- Nillion testnet account with nilDB subscription
git clone https://github.com/hitman298/NillionVault.git
cd NillionVault
# Install backend dependencies
cd backend && npm install && cd ..
# Install frontend dependencies
cd frontend && npm install && cd ..# Copy environment template
cp backend/env.example backend/.env
# Edit backend/.env with your Nillion credentials- Get your Nillion testnet private key from Nillion UI
- Fund your testnet account with NIL tokens from the faucet
- Subscribe to nilDB service (28 NIL/month)
- Add your private key to
backend/.env:BUILDER_PRIVATE_KEY=your_64_character_hex_private_key_here
# Terminal 1 - Backend (Port 3001)
cd backend && npm start
# Terminal 2 - Frontend (Port 3000)
cd frontend/public && node server.js- Frontend: http://localhost:3000
- Backend API: http://localhost:3001
- Health Check: http://localhost:3001/health
# Nillion Configuration (Testnet)
BUILDER_PRIVATE_KEY=your_64_character_hex_private_key
NILCHAIN_URL=http://rpc.testnet.nilchain-rpc-proxy.nilogy.xyz
NILAUTH_URL=https://nilauth.sandbox.app-cluster.sandbox.nilogy.xyz
NILDB_NODES=https://nildb-stg-n1.nillion.network,https://nildb-stg-n2.nillion.network,https://nildb-stg-n3.nillion.network
NILLION_NETWORK=testnet
# Server Configuration
PORT=3001
NODE_ENV=development
FRONTEND_URL=http://localhost:3000| Method | Endpoint | Description |
|---|---|---|
POST |
/api/credentials/upload |
Store a text message |
POST |
/api/credentials/verify |
Verify and retrieve message by proof hash |
GET |
/api/credentials/list |
List all stored messages |
DELETE |
/api/credentials/:recordId |
Delete a message |
POST |
/api/verification/compute-hash |
Compute proof hash for data |
POST |
/api/verification/verify-proof |
Verify a proof hash |
GET |
/health |
Health check endpoint |
// Store a message
const response = await fetch('/api/credentials/upload', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
textMessage: 'My secret message',
fileName: 'message.txt'
})
});
const data = await response.json();
console.log('Proof Hash:', data.proofHash);
console.log('Credential ID:', data.credentialId);
// Verify a message
const verifyResponse = await fetch('/api/credentials/verify', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
proofHash: 'your_proof_hash_here'
})
});
const verifyData = await verifyResponse.json();
console.log('Retrieved Message:', verifyData.credential.content);- β End-to-End Encryption: All messages encrypted using Nillion SecretVaults
- β SHA-256 Hashing: Cryptographically secure proof hash for verification
- β Distributed Storage: Data replicated across multiple Nillion nodes
- β Blockchain Anchoring: Immutable proof on nilChain blockchain
- β Privacy-First: Message content not exposed in list view - requires verification hash
- β Verification-Only Access: Content only decryptable with proof hash
- β Input Validation: Comprehensive validation and sanitization
- β CORS Protection: Configured for production security
- β Error Handling: Graceful error handling with detailed logging
- β HTTPS Ready: SSL/TLS encryption support
Nillion SecretVaults stores all data with:
- Encrypted Content: Message content stored in
%allotfield (encrypted) - Plaintext Metadata: File name, type, size, timestamp (for indexing)
- Proof Hash: SHA-256 hash for verification (64-character hex string)
- Anchoring: Optional nilChain blockchain anchoring for immutable proof
- No External Databases: 100% Nillion-native storage
{
"_id": "unique-record-id",
"credential_id": "credential-uuid",
"proof_hash": "sha256-hash",
"file_name": "message.txt",
"file_type": "text/plain",
"size_bytes": 123,
"stored_at": "2025-10-31T12:00:00.000Z",
"document_content": {
"%allot": "encrypted-message-content"
}
}- Secure Notes: Store private notes and thoughts securely
- Password Management: Securely store important credentials
- Secret Sharing: Share encrypted secrets with proof of existence
- Document Verification: Verify message authenticity using proof hashes
- Personal Vault: Private encrypted storage for sensitive information
- Compliance: Immutable records with blockchain anchoring
- Single message storage with instant feedback
- Automatic proof hash generation
- nilChain anchoring (async, non-blocking)
- Upload up to 50 messages at once
- One message per line
- Progress tracking and summary
- Retrieve messages using proof hash
- Decrypt and display message content
- Verify blockchain anchoring status
- List all stored messages (metadata only)
- Privacy-First Design: No content previews - only accessible via verification
- Quick actions: Copy Hash, Verify & Decrypt, Delete
- Search by filename and hash
- Real-time search by filename and hash (content requires verification)
- Filter by date range
- Sort by: Newest First, Oldest First, Name (A-Z), Size (Largest)
- Export all messages as JSON
- Export selected messages only
- Includes metadata and proof hashes
- Total message count
- Total storage size
- Filtered results count
- Storage Speed: ~2-3 seconds per message
- Hash Generation: ~50ms per message
- Verification: ~1-2 seconds (including decryption)
- List Retrieval: ~1.5 seconds for 100 messages
- Concurrent Storage: Supports multiple simultaneous uploads
- Message Size Limit: 4KB per message (4096 bytes)
Backend (Render)
# Connect GitHub repo to Render
# Build Command: cd backend && npm install
# Start Command: cd backend && npm start
# Add environment variables in dashboardFrontend (Static Hosting)
- Deploy
frontend/publicfolder to any static host - Update
FRONTEND_URLin backend.env
docker-compose -f deploy/docker-compose.yml up --buildπ Detailed deployment guide: deploy/DEPLOYMENT.md
We welcome contributions! Please see our Contributing Guide.
- π§ Nillion SecretVaults SDK integration improvements
- π Performance optimizations
- π¨ UI/UX enhancements
- π± Mobile responsiveness
- π Additional security features
- π Advanced analytics
- π Architecture Overview - System design and diagrams
- π Deployment Guide - Production deployment
- π§ API Reference - Complete API documentation
Anchoring creates an immutable cryptographic proof that a message existed at a specific time:
- Message Hashing: Your message is processed through SHA-256 to create a unique
proof_hash - Storage: This hash is stored in NillionDB (encrypted)
- Blockchain Proof: The hash is anchored to nilChain blockchain for permanent verification
- Verification: Anyone can verify the message existed by checking the hash on the blockchain
Even if the original message is lost, the proof hash on the blockchain proves it existed at that time.
This project is licensed under the MIT License - see the LICENSE file for details.
- π GitHub Issues - Bug reports
- π‘ GitHub Discussions - Feature requests
- π Documentation - Complete guides
- π Nillion Community - Nillion ecosystem support
This project is production-ready and fully deployed:
β Complete Features:
- Secure message storage with Nillion SecretVaults encryption
- Bulk message upload (up to 50 messages)
- Message verification and decryption via proof hash
- Message list with metadata (privacy-first, no content previews)
- Search and filter functionality
- Export messages (JSON format)
- Delete messages
- Message statistics dashboard
- Blockchain anchoring to nilChain
- Clean, professional UI
β Deployment:
- Frontend: Live on Render
- Backend: Live on Render
- All features tested and working
β Security:
- End-to-end encryption via Nillion
- Privacy-first design (no content exposure)
- Verification-required access
- Blockchain anchoring for immutable proof
π NillionVault - Secure message storage powered by Nillion Network
π Live Demo | β Star this repo | π Report Bug | π‘ Request Feature
Built with β€οΈ for the Nillion ecosystem