@truesift/express 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,191 @@
1
+ # Changelog
2
+
3
+ All notable changes to the TrueSift Express SDK will be documented in this file.
4
+
5
+ The format follows a simple internal changelog structure while the package is still unpublished.
6
+
7
+ Product:
8
+
9
+ ```txt
10
+ TrueSift — Next-Gen Human Verification made in Germany
11
+ ```
12
+
13
+ Package:
14
+
15
+ ```txt
16
+ @truesift/express
17
+ ```
18
+
19
+ ---
20
+
21
+ ## [0.1.0] - 2026-06-16
22
+
23
+ ### Status
24
+
25
+ Internal work in progress.
26
+
27
+ This is the first internal package setup for the TrueSift server-side Node/Express SDK.
28
+
29
+ The package is not published yet and remains private.
30
+
31
+ ### Added
32
+
33
+ - Initialized standalone SDK package structure.
34
+ - Added TypeScript-first project setup.
35
+ - Added ESM package configuration.
36
+ - Added Node.js 20+ runtime target.
37
+ - Added `tsup` build setup.
38
+ - Added declaration file generation.
39
+ - Added Vitest as test runner.
40
+ - Added strict TypeScript configuration.
41
+ - Added initial package identity:
42
+
43
+ ```txt
44
+ @truesift/express
45
+ ```
46
+
47
+ - Added proprietary internal license placeholder.
48
+ - Added initial README documentation.
49
+ - Added package metadata for future npm or private registry publishing.
50
+ - Added initial source architecture:
51
+
52
+ ```txt
53
+ src/client
54
+ src/errors
55
+ src/types
56
+ src/utils
57
+ src/http
58
+ src/validation
59
+ ```
60
+
61
+ - Added initial test architecture:
62
+
63
+ ```txt
64
+ tests/unit
65
+ tests/integration
66
+ ```
67
+
68
+ - Added documentation folders:
69
+
70
+ ```txt
71
+ docs
72
+ examples/express
73
+ examples/next
74
+ ```
75
+
76
+ ### Architecture
77
+
78
+ The SDK is locked as a thin server-side service client.
79
+
80
+ It is intended to communicate with the TrueSift API from backend code only.
81
+
82
+ The first SDK version is planned to expose:
83
+
84
+ ```txt
85
+ createBotGuardClient(config)
86
+ BotGuardClient
87
+ createChallenge()
88
+ verifyChallenge()
89
+ isAllowed()
90
+ isReview()
91
+ isBlocked()
92
+ BotGuard error classes
93
+ BotGuard/TrueSift types
94
+ ```
95
+
96
+ ### Security
97
+
98
+ The SDK is designed as backend-only.
99
+
100
+ The following principles are locked for the first version:
101
+
102
+ - no browser usage
103
+ - no React client component usage
104
+ - no frontend bundle usage
105
+ - no `NEXT_PUBLIC_*` secret usage
106
+ - no automatic secret logging
107
+ - no default logging
108
+ - no business policy decisions inside the SDK
109
+ - no automatic Express middleware in the first version
110
+ - no automatic retry for challenge verification
111
+
112
+ ### Build
113
+
114
+ Current build commands:
115
+
116
+ ```bash
117
+ pnpm typecheck
118
+ pnpm build
119
+ ```
120
+
121
+ Both commands are expected to pass with the current empty SDK skeleton.
122
+
123
+ ### Notes
124
+
125
+ The package still uses some early internal `BotGuard` naming in the planned API and file structure because the original backend module and locked blueprint were created under the BotGuard name.
126
+
127
+ The product-facing name is now:
128
+
129
+ ```txt
130
+ TrueSift
131
+ ```
132
+
133
+ Future refactoring may decide whether the internal API remains `BotGuardClient` for compatibility with the backend module or moves fully to `TrueSiftClient`.
134
+
135
+ ### Publishing
136
+
137
+ Publishing is not decided yet.
138
+
139
+ Possible future distribution options:
140
+
141
+ - public npm package
142
+ - private npm package
143
+ - GitHub Packages
144
+ - internal registry
145
+ - own package server
146
+ - local workspace package
147
+
148
+ The SDK architecture is intentionally independent from the final publishing strategy.
149
+
150
+ ---
151
+
152
+ ## Future planned versions
153
+
154
+ ### [0.2.0] - Planned
155
+
156
+ Expected scope:
157
+
158
+ - Implement core type definitions.
159
+ - Implement SDK error model.
160
+ - Implement config validation.
161
+ - Implement decision normalization.
162
+ - Implement request timeout handling.
163
+ - Implement response parsing and validation.
164
+ - Implement `createChallenge()`.
165
+ - Implement `verifyChallenge()`.
166
+ - Add unit tests for core behavior.
167
+
168
+ ### [0.3.0] - Planned
169
+
170
+ Expected scope:
171
+
172
+ - Add example Express controller usage.
173
+ - Add example Next.js route handler usage.
174
+ - Add fail-open observe example.
175
+ - Add protect-mode block example.
176
+ - Add security documentation.
177
+ - Add smoke test against a development TrueSift API.
178
+
179
+ ### [1.0.0] - Planned
180
+
181
+ Expected scope:
182
+
183
+ - Stable internal release.
184
+ - Clean typecheck.
185
+ - Clean build.
186
+ - Core unit tests.
187
+ - Secret redaction tests.
188
+ - Timeout tests.
189
+ - Basic integration smoke test.
190
+ - README usage finalized.
191
+ - Publishing strategy decided.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 WebDigiTech - Ventsislav Kolev
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.