Skip to content

taoyadev/creepjs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

26 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CreepJS 2.0 - Educational Browser Fingerprinting Platform

Privacy-first browser fingerprinting platform built as a SaaS service for developers

License: MIT PRs Welcome Node Version pnpm Version Cloudflare

Live Demo: https://creepjs.org | API Docs: https://creepjs.org/docs | Playground: https://creepjs.org/playground


🎯 What is CreepJS 2.0?

CreepJS 2.0 is an educational, privacy-first browser fingerprinting platform designed to help developers understand and implement browser fingerprinting technology responsibly. It provides:

  • πŸ” Interactive Demo - Visualize how browser fingerprinting works in real-time
  • ⚑ RESTful API - Production-ready API running on Cloudflare Workers (<50ms response time)
  • πŸ“¦ JavaScript SDK - One-line integration with TypeScript support
  • πŸ“š Educational Content - Comprehensive guides explaining 40+ fingerprinting techniques
  • πŸ”’ Privacy-First - Transparent, minimal data collection, user-controlled

Core Value Proposition

"3-minute browser fingerprint API integration - Developer-friendly, privacy-first"


✨ Features

🌐 Web Application

  • Landing Page - Modern, responsive design with dark mode support
  • Live Demo - Real-time browser fingerprint analysis with detailed breakdowns
  • Interactive Playground - Test API endpoints with live examples
  • Documentation Center - Complete guides, API reference, and tutorials
  • 40+ Fingerprint Types - Canvas, WebGL, Audio, Fonts, Navigator, WebRTC, storage APIs, PCM, Service Workers, and more
  • Performance Controls - Adaptive concurrency & idle-delay knobs keep UX smooth (see docs/PERFORMANCE.md)

πŸš€ API Service

  • RESTful API - POST /v1/fingerprint for fingerprint generation
  • Edge Computing - Deployed on Cloudflare Workers with global coverage
  • Token Authentication - Simple API token-based auth
  • Rate Limiting - Built-in rate limiting with Cloudflare KV
  • <50ms Response Time - Lightning-fast with 99.9% uptime

πŸ“¦ JavaScript SDK

import { getFingerprint } from '@creepjs/sdk';

const result = await getFingerprint({
  token: 'cfp_your_token',
});

console.log(result.fingerprintId); // "a1b2c3d4e5f6..."

Features:

  • One-line integration
  • TypeScript support
  • UMD/ESM builds
  • <15KB gzipped
  • localStorage caching

Collector Coverage Snapshot

The core engine now exposes 40+ entropy sources, spanning:

  • Graphics: Canvas, WebGL, SVG, DOMRect, TextMetrics
  • Hardware & Device: Screen/ScreenFrame, Color Gamut/Depth, Audio, WebRTC, Service Workers, Media Devices
  • Storage & Platform: localStorage/sessionStorage/indexedDB/WebSQL, Cookie availability, plugins, Apple Pay, Private Click Measurement
  • Navigator & Locale: Languages, Intl/Timezone, Reduced Motion/Transparency, HDR, Forced Colors, Vendor flavors, Architecture hints

Each collector is optional in the final payload so you can consume only the signals you need.

Need deeper tuning? Check out docs/PERFORMANCE.md for concurrency, profiling, and troubleshooting tips.


πŸ—οΈ Architecture

Tech Stack

Frontend (apps/web)
β”œβ”€β”€ Next.js 15 (App Router)
β”œβ”€β”€ React 19
β”œβ”€β”€ TypeScript 5.7
β”œβ”€β”€ Tailwind CSS + shadcn/ui
└── Deployed on: Cloudflare Pages

Backend API (apps/api)
β”œβ”€β”€ Hono.js (Lightweight framework)
β”œβ”€β”€ Cloudflare Workers (V8 Isolates)
β”œβ”€β”€ Cloudflare KV (Storage)
└── <50ms response time globally

Core Engine (packages/core)
β”œβ”€β”€ 40+ fingerprint collectors
β”œβ”€β”€ MurmurHash3 + Base62 encoding
β”œβ”€β”€ TypeScript
└── Modular design

SDK (packages/sdk)
β”œβ”€β”€ Vanilla JavaScript
β”œβ”€β”€ TypeScript support
β”œβ”€β”€ UMD/ESM builds
└── <15KB gzipped

Why Cloudflare?

Benefit Description
Zero Cold Start V8 Isolates ensure instant response
Global Coverage 300+ edge locations worldwide
Free Tier 100K requests/day on Workers free plan
Low Latency <50ms p95 response time
Easy Scaling Seamlessly scales to millions of requests

πŸ“‚ Project Structure

creepjs/
β”œβ”€β”€ apps/
β”‚   β”œβ”€β”€ web/                     # Next.js 15 web application
β”‚   β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”‚   β”œβ”€β”€ page.tsx         # Home page
β”‚   β”‚   β”‚   β”œβ”€β”€ demo/            # Live demo
β”‚   β”‚   β”‚   β”œβ”€β”€ docs/            # Documentation center
β”‚   β”‚   β”‚   β”œβ”€β”€ playground/      # API playground
β”‚   β”‚   β”‚   └── fingerprint/[type]/  # Individual fingerprint pages
β”‚   β”‚   β”œβ”€β”€ components/          # React components
β”‚   β”‚   β”‚   └── ui/              # shadcn/ui components
β”‚   β”‚   └── public/              # Static assets
β”‚   β”‚
β”‚   └── api/                     # Cloudflare Workers API
β”‚       β”œβ”€β”€ src/
β”‚       β”‚   β”œβ”€β”€ index.ts         # Main entry point
β”‚       β”‚   β”œβ”€β”€ routes/          # API routes
β”‚       β”‚   β”œβ”€β”€ middleware/      # Auth, CORS, rate limiting
β”‚       β”‚   └── utils/           # Validation, helpers
β”‚       └── wrangler.toml        # Cloudflare configuration
β”‚
β”œβ”€β”€ packages/
β”‚   β”œβ”€β”€ core/                    # Core fingerprinting engine
β”‚   β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”‚   β”œβ”€β”€ collectors/      # 40+ fingerprint collectors
β”‚   β”‚   β”‚   └── utils/           # Hashing, async helpers
β”‚   β”‚   └── tests/               # Unit tests
β”‚   β”‚
β”‚   └── sdk/                     # JavaScript SDK
β”‚       β”œβ”€β”€ src/
β”‚       β”‚   └── index.ts         # SDK entry point
β”‚       └── rollup.config.js     # UMD/ESM build config
β”‚
β”œβ”€β”€ docs/                        # Documentation
β”‚   β”œβ”€β”€ ARCHITECTURE.md          # Technical architecture
β”‚   β”œβ”€β”€ API.md                   # API reference
β”‚   β”œβ”€β”€ SDK.md                   # SDK guide
β”‚   β”œβ”€β”€ DEPLOYMENT.md            # Deployment instructions
β”‚   └── SECURITY.md              # Security and privacy
β”‚
β”œβ”€β”€ .github/
β”‚   └── workflows/               # GitHub Actions CI/CD
β”‚
β”œβ”€β”€ package.json                 # Monorepo root config
β”œβ”€β”€ turbo.json                   # Turborepo configuration
β”œβ”€β”€ pnpm-workspace.yaml          # pnpm workspace config
└── README.md                    # This file

πŸš€ Quick Start

Prerequisites

  • Node.js >= 20.9.0
  • pnpm >= 9.0.0
  • Cloudflare account (for deployment)

Installation

# Clone the repository
git clone https://github.com/taoyadev/creepjs.git
cd creepjs

# Install dependencies (MUST use pnpm)
pnpm install

# Start development server
pnpm dev

# This will start:
# - Next.js on http://localhost:3000
# - Wrangler (Workers) on http://localhost:8787

Build

# Build all packages
pnpm turbo run build

# Build specific app
pnpm --filter @creepjs/web build
pnpm --filter @creepjs/api build

Testing

# Run all tests
pnpm turbo run test

# Test specific package
pnpm --filter @creepjs/core test
pnpm --filter @creepjs/api test

πŸ“– Usage

Using the SDK

Installation:

npm install @creepjs/sdk
# or
pnpm add @creepjs/sdk
# or
yarn add @creepjs/sdk

Basic Usage:

import { getFingerprint } from '@creepjs/sdk';

// Get fingerprint with API token
const result = await getFingerprint({
  token: 'cfp_your_token',
  endpoint: 'https://api.creepjs.org', // optional
  cache: true, // Enable localStorage caching
  cacheTtl: 3600, // Cache TTL in seconds
});

console.log(result);
// {
//   fingerprintId: "a1b2c3d4e5f6...",
//   confidence: 0.95,
//   uniqueness: 0.87,
//   timestamp: 1700000000000,
//   cached: false
// }

CDN (UMD):

<script src="https://cdn.creepjs.org/v1/sdk.js"></script>
<script>
  CreepJS.getFingerprint({
    token: 'cfp_your_token',
  }).then((result) => {
    console.log('Fingerprint ID:', result.fingerprintId);
  });
</script>

Using the API Directly

Get API Token:

curl "https://api.creepjs.org/v1/token?email=your@email.com"

Generate Fingerprint:

curl -X POST https://api.creepjs.org/v1/fingerprint \
  -H "Content-Type: application/json" \
  -H "X-API-Token: cfp_your_token" \
  -d '{
    "components": {
      "canvas": "...",
      "webgl": "...",
      "navigator": "..."
    }
  }'

See API Documentation for complete reference.


🚒 Deployment

Deploy to Cloudflare

1. Deploy Workers (API):

cd apps/api

# Login to Cloudflare
npx wrangler login

# Create KV namespace
npx wrangler kv:namespace create CREEPJS_TOKENS

# Deploy
npx wrangler deploy

2. Deploy Pages (Frontend):

# Build the project
pnpm turbo run build --filter=@creepjs/web

# Deploy to Cloudflare Pages
cd apps/web
npx wrangler pages deploy .next --project-name=creepjs

3. GitHub Actions (Automatic):

Set these secrets in GitHub repository settings:

  • CLOUDFLARE_API_TOKEN - Your Cloudflare API token
  • CLOUDFLARE_ACCOUNT_ID - Your Cloudflare account ID

Push to main branch to trigger automatic deployment.

See DEPLOYMENT.md for detailed instructions.


πŸ§ͺ Testing

Unit Tests

# Run all tests
pnpm turbo run test

# Watch mode
pnpm --filter @creepjs/core test --watch

API Tests

# Test with Cloudflare Workers test environment
pnpm --filter @creepjs/api test

E2E Tests (Playwright)

# Run E2E tests
pnpm --filter @creepjs/web test:e2e

πŸ“Š Performance Targets

Metric Target Current
API Response Time (p95) <100ms ~50ms
SDK Bundle Size (gzipped) <15KB ~12KB
Lighthouse Score >95 98
Uptime >99.9% 99.95%

πŸ”’ Privacy & Security

Core Principles

  1. Transparency - Clear disclosure of data collection
  2. Minimization - Only collect necessary fingerprint data
  3. User Control - Provide "Do Not Track" options
  4. Short Retention - No long-term storage by default

Compliance

  • βœ… GDPR - Consent mechanisms, data deletion API
  • βœ… CCPA - California privacy options
  • βœ… Cookie Banner - Clear disclosure
  • βœ… Privacy Policy - Easy-to-understand terms

See SECURITY.md for details.


πŸ—ΊοΈ Roadmap

βœ… Phase 1: MVP (Complete)

  • Core fingerprinting engine (40+ collectors)
  • Cloudflare Workers API
  • Next.js web application
  • JavaScript SDK
  • Documentation center
  • Interactive playground

🚧 Phase 2: Enhanced Features (In Progress)

  • Browser extension detection
  • Advanced privacy mode detection
  • Fingerprint comparison tool
  • Export & sharing features
  • More educational content

πŸ“… Phase 3: Developer Tools (Planned)

  • CLI tool for testing
  • Postman collection
  • Code generators
  • WordPress plugin
  • React/Vue component library

See ROADMAP.md for complete roadmap.


🀝 Contributing

We welcome contributions from the community! Please read our Contributing Guide before submitting PRs.

Development Workflow

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Code Standards

  • TypeScript strict mode enabled
  • ESLint + Prettier for code formatting
  • Write tests for new features
  • Follow conventional commits

πŸ“„ License

  • Core Engine: Based on CreepJS (MIT License)
  • This Project: MIT License

See LICENSE for details.


πŸ™ Acknowledgments

Special thanks to Abraham Juliot for developing the excellent open-source CreepJS project, which serves as the technical foundation for this platform.


πŸ“ž Contact


Built with ❀️ by developers, for developers

Making browser fingerprinting transparent, educational, and privacy-respectful

About

Educational browser fingerprinting platform with privacy-first approach

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages