privacy-first

Sponsor Me Help me build faster, more secure libraries for the community

🔐 Privacy‑First Encrypted Message Demo

Monetize insights without exposing raw data. Privacy-first by design.

License
Node.js


Our Mission

Enable data-driven value extraction while preserving end-to-end confidentiality through cryptographic guarantees rather than trust assumptions.

What it does

This demo shows how a browser can encrypt a message with a recipient’s public key, send the ciphertext to a server, and have the server decrypt it with its private key—all without ever transmitting the plaintext. It uses libsodium‑wrappers, the modern, audited NaCl implementation, keeping the cryptography solid while the code stays short.

How It Works

Traditional Model Indos Model
Raw data shared with buyers Insights derived locally, only aggregated results transmitted
PII exposure risk Zero-knowledge architecture—plaintext never leaves owner’s control
Compliance overhead Built-in GDPR/CCPA alignment via design
Manual privacy reviews Automated privacy controls via sealed-box encryption

Use Cases


Features


Prerequisites


Installation

# 1. Clone the repository
git clone https://github.com/indoscient/privacy-first.git
cd privacy-first

# 2. Install client dependencies
cd client && npm install

# 3. Install server dependencies
cd ../server && npm install

# 4. Generate server key pair (run once)
npm run gen:keypair

# 5. Copy outputs to .env files
# server/.env: PRIVATE_KEY, API_KEY, ALLOWED_ORIGINS
# client/.env: VITE_SERVER_PUBLIC_KEY, VITE_API_KEY, VITE_API_URL

Configuration

Create .env files before starting:

server/.env:

PRIVATE_KEY=<from gen:keypair output>
API_KEY=<random 32-byte hex string>
ALLOWED_ORIGINS=http://localhost:5173,http://localhost:3000
PORT=4000

client/.env:

VITE_SERVER_PUBLIC_KEY=<from gen:keypair output>
VITE_API_URL=http://localhost:4000/decrypt
VITE_API_KEY=<same value as server/API_KEY>

Usage

  1. Terminal 1 – start the API:
    cd server && npm run dev
    
  2. Terminal 2 – start the React dev server:
    cd client && npm run dev
    

Documentation

Resource Description
Client README Front-end setup, scripts, and usage
Server README Back-end endpoints, security controls
Privacy Design Decisions Privacy-by-design controls and data flow

Contributing

Please read our CONTRIBUTING.md for guidelines on how to propose changes, run tests, and submit pull requests.


License

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


Built with ❤️ by the Indos Team — Privacy First, Always.