Skip to content

About

Indos enables insight monetization with zero-knowledge privacy engineering.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

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

  • Market Research — Aggregate sentiment without accessing individual responses
  • Analytics Partnerships — Share metrics without revealing customer-level data
  • ML Training — Contribute encrypted embeddings to federated learning pipelines
  • Auditing — Prove compliance without exposing transaction details

Features

  • End-to-end encryption using X25519 + XSalsa20‑Poly1305 (libsodium sealed-box crypto_box_seal).
  • Forward secrecy — ephemeral keys generated per message.
  • Zero-knowledge transport – only ciphertext travels over HTTP (no plaintext, nonces, or key material exposed).
  • API authentication — API key middleware protects decryption endpoints.
  • Rate limiting — prevents abuse (20 req/15min on /decrypt).
  • Security headers — Helmet.js enforces HSTS, X-Frame-Options, etc.
  • TypeScript on both client and server for safety and autocompletion.

Prerequisites

  • Node ≥ 18 (native ESM support)
  • npm (or yarn/pnpm)
  • Git

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.

About

Indos enables insight monetization with zero-knowledge privacy engineering.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Sponsor this project

Packages

Used by

Contributors

Languages