Skip to content

Commit 653ab6d

Browse files
committed
Update by AUDIT
1 parent 22d7280 commit 653ab6d

47 files changed

Lines changed: 4543 additions & 2541 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
jobs:
9+
verify:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
node-version: [20.x, 24.x]
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
cache: npm
25+
26+
- name: Install dependencies
27+
run: npm ci
28+
29+
- name: Install Playwright browsers
30+
run: npx playwright install --with-deps chromium firefox webkit
31+
32+
- name: Verify
33+
run: npm run verify

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
node_modules/
22
coverage/
3+
playwright-report/
4+
test-results/
35
.nyc_output/
46
*.log
57
.DS_Store

README.md

Lines changed: 34 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Fingerprint Framework
22

3-
Продвинутый каркас для browser fingerprinting и device intelligence с упором на модульность, контроль приватности и готовность к использованию как npm-пакета или обычного JS-файла.
3+
An advanced browser fingerprinting and device intelligence framework focused on modularity, privacy controls, and production-friendly distribution as both an npm package and a standalone browser script.
44

5-
Проект намеренно построен без внешних runtime-зависимостей: ESM API, script-tag сборка, типы, тесты на `node:test`, предсказуемый build pipeline.
5+
The project intentionally has no external runtime dependencies. It ships an ESM API, script-tag builds, TypeScript declarations, `node:test` coverage, and a predictable build pipeline.
66

7-
## Быстрый старт
7+
## Quick Start
88

99
```bash
1010
npm run verify
@@ -27,9 +27,9 @@ const result = await client.identify({
2727
console.log(result.visitorId, result.confidence.score);
2828
```
2929

30-
### Обычный JS-файл для страницы
30+
### Standalone Browser Script
3131

32-
После сборки подключите файл напрямую:
32+
After building, include the generated file directly:
3333

3434
```html
3535
<script src="./dist/browser/fingerprint-framework.min.js"></script>
@@ -45,20 +45,37 @@ console.log(result.visitorId, result.confidence.score);
4545
</script>
4646
```
4747

48-
## Профили приватности
48+
## Privacy Profiles
4949

50-
- `strict`: только низкочувствительные пассивные сигналы.
51-
- `balanced`: пассивные низко- и среднечувствительные сигналы, хороший дефолт для продукта.
52-
- `extended`: включает активные и высокочувствительные collectors вроде canvas/webgl, использовать только при понятном основании и согласии.
50+
- `strict`: low-sensitivity passive signals only.
51+
- `balanced`: low- and medium-sensitivity passive signals, suitable as the default product profile.
52+
- `extended`: includes active and high-sensitivity collectors such as canvas and WebGL, intended only for explicit product need and consent.
5353

54-
## Основные возможности
54+
## Capabilities
5555

56-
- Collector API для собственных сигналов.
57-
- Policy layer: allow/deny collectors, категории, sensitivity limit, consent gate.
58-
- Детерминированная canonical normalization перед хешированием.
59-
- SHA-256 через Web Crypto или Node Crypto, fallback для старых окружений.
60-
- Confidence scoring и сведения об ошибках collectors.
61-
- Опциональное хранение состояния визитов через `localStorage` или custom storage.
56+
- Collector API for custom signals.
57+
- Policy layer with allow/deny collectors, categories, sensitivity limits, and consent gates.
58+
- Deterministic canonical normalization before hashing.
59+
- SHA-256 via Web Crypto or Node Crypto, with fallback support for constrained runtimes.
60+
- Confidence scoring and collector error metadata.
61+
- Optional visit state storage through `localStorage` or a custom adapter.
6262
- Script-tag global API: `FingerprintFramework`.
6363

64-
Подробное ТЗ находится в [docs/TECHNICAL_SPEC.md](docs/TECHNICAL_SPEC.md).
64+
## Package Subpaths
65+
66+
```js
67+
import { createDefaultCollectors } from '@fingerprint-framework/core/collectors';
68+
import { createPolicy } from '@fingerprint-framework/core/policy';
69+
import { createMemoryStorage } from '@fingerprint-framework/core/storage';
70+
```
71+
72+
## Build And Verification
73+
74+
- Source files live in focused modules under `src/`.
75+
- `npm run build` bundles package entry points and browser scripts with esbuild.
76+
- `npm run typecheck` validates published declaration files through package imports.
77+
- `npm run test:coverage` enforces 100% line, branch, and function coverage for `src/**/*.js`.
78+
- `npm run test:browser` runs the standalone browser build in Chromium, Firefox, and WebKit.
79+
- `npm run check:size` enforces the browser minified bundle size budget.
80+
81+
The technical specification is available in [docs/TECHNICAL_SPEC.md](docs/TECHNICAL_SPEC.md). The current implementation audit is available in [docs/AUDIT_REPORT.md](docs/AUDIT_REPORT.md).

0 commit comments

Comments
 (0)