Repository navigation
Expand file tree
/
Copy pathpolicy.ts
More file actions
387 lines (373 loc) · 14 KB
/
Copy pathpolicy.ts
File metadata and controls
387 lines (373 loc) · 14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
import profile from '@data/profile';
import { CONSENT_COOKIE, CONSENT_MAX_AGE_DAYS } from '@util/consent/consentStore';
/** A paragraph of text. */
interface ParagraphBlock {
/** Discriminator. */
type: 'paragraph';
/** The text; a Markdown-style `[label](url)` within it renders as a link, as {@link INLINE_LINK} matches. */
text: string;
}
/** A bulleted list. */
interface ListBlock {
/** Discriminator. */
type: 'list';
/** The items, in order; each may hold `[label](url)` links like a paragraph. */
items: string[];
}
/** A table; a cell matching {@link LINK_CELL} renders as a link. */
interface TableBlock {
/** Discriminator. */
type: 'table';
/** Column headings. */
columns: string[];
/** Rows, each with one cell per column. */
rows: string[][];
}
/**
* Matches a Markdown-style `[label](url)` link inside paragraph or list text, capturing the label and the URL. Only
* `https:` and `mailto:` URLs match, as in {@link LINK_CELL}, so no other scheme can become a link.
*/
export const INLINE_LINK = /\[([^\]]+)\]\(((?:https:\/\/|mailto:)[^)\s]+)\)/;
/** Matches a table cell holding only an `https://` or `mailto:` URL, which every renderer turns into a link. */
export const LINK_CELL = /^(https:\/\/|mailto:)\S+$/;
/** The place where the dialog renders the consent switches; text renderers such as Markdown omit it. */
interface ConsentControlsBlock {
/** Discriminator. */
type: 'consentControls';
}
/** One block of policy content. */
export type PolicyBlock = ParagraphBlock | ListBlock | TableBlock | ConsentControlsBlock;
/** A titled section of the policy. */
export interface PolicySection {
/** Section heading. */
heading: string;
/** Section body, in reading order. */
blocks: PolicyBlock[];
}
/** The site's host name, as visitors see it. */
const host = new URL(profile.url).hostname;
/** The contact address as an inline `mailto:` link, which every renderer turns into a link that opens an email. */
const EMAIL_LINK = `[${profile.email}](mailto:${profile.email})`;
/** Retention shared by every item stored on the device until consent is withdrawn or site data is cleared. */
const UNTIL_WITHDRAWN = 'Until you withdraw consent or clear site data';
/** The policy's title, exported alone so the banner and footer can name it without loading the whole policy. */
export const POLICY_TITLE = 'Privacy & cookie policy';
/**
* The combined privacy and cookie policy, rendered in the policy dialog and in the Markdown representation of the site.
*
* Vendor facts and their sources: Vercel runtime logs are kept 1 hour (Hobby) to 1 day (Pro),
* https://vercel.com/docs/runtime-logs; Sentry keeps errors 30 to 90 days by plan,
* https://docs.sentry.io/security-legal-pii/security/data-retention-periods; Firebase Performance Monitoring keeps
* IP-associated events 30 days and other data 60 days, https://firebase.google.com/support/privacy; Google Analytics
* cookie lifetimes, https://support.google.com/analytics/answer/11397207; DuckDuckGo's IP statement,
* https://duckduckgo.com/privacy.
*
* The text discloses what happens without naming any law or regulation it is written to satisfy.
*/
const policy: {
/** Policy title. */
title: string;
/** ISO date the policy was last updated. */
lastUpdated: string;
/** Policy body. */
sections: PolicySection[];
} = {
title: POLICY_TITLE,
lastUpdated: '2026-10-09',
sections: [
{
heading: 'Summary',
blocks: [
{
type: 'paragraph',
text: `[${host}](${profile.url}) is the personal portfolio of ${profile.name}. It showcases past work and provides no services. This policy describes what happens to information when you visit, and the choices you have.`,
},
{
type: 'list',
items: [
'Optional analytics, video, link-icon, and offline features stay off until you choose to allow them.',
"Analytics data is used only to understand visits to, and use of, this portfolio. It is never used for advertising: advertising storage, ad personalization, Google signals, and cross-device linking are switched off in the site's code.",
'The site has no advertising, accounts, forms, comments, or payments, and visitor information is not sold.',
],
},
],
},
{
heading: 'Contact',
blocks: [
{
type: 'paragraph',
text: `This site is run by ${profile.name}. For questions about this policy or your information, email ${EMAIL_LINK}.`,
},
],
},
{
heading: 'Your choices',
blocks: [
{
type: 'paragraph',
text: `On your first visit, a banner asks what to allow. "Accept all" allows every optional purpose below, "Essential only" refuses them all, and "Customize" lets you choose each one. Your choice is kept for ${CONSENT_MAX_AGE_DAYS} days, after which you are asked again.`,
},
{ type: 'consentControls' },
{
type: 'paragraph',
text: 'You can change or withdraw consent at any time with "Cookie settings" at the bottom of every page. Withdrawing is as easy as consenting, does not affect what was processed before, and deletes the analytics cookies and offline copies this site stored on your device. You can also block or delete cookies in your browser settings; the site works without them.',
},
],
},
{
heading: 'What is collected and why',
blocks: [
{
type: 'paragraph',
text: 'Optional features run only with your consent. Hosting, error reports, email, and the cookie remembering your choice run without it, because the site needs them to work and to answer you.',
},
{
type: 'table',
columns: ['Activity', 'Information', 'Kept for', 'Provider'],
rows: [
[
'Hosting: deliver and secure the site',
'IP address, browser, page requested, and time',
'Up to 1 day',
'Vercel',
],
[
'Error reports: find and fix bugs',
'On a server error: IP address, browser, page requested, and error details',
'Up to 90 days',
'Sentry',
],
[
'Consent cookie: remember your choice',
'What you allowed, and when',
`${CONSENT_MAX_AGE_DAYS} days`,
'This site, on your device',
],
[
'Analytics: count visits and see how the site is used',
'A random device ID, pages viewed, clicks, device and browser, and city-level location (Google does not keep your IP address)',
'14 months',
'Google Firebase',
],
[
'Browser error reports: find and fix bugs in the page',
'Only if you allow Analytics: error details, the page, recent clicks and pages visited, and browser; no cookies or user details',
'Up to 90 days',
'Sentry',
],
[
'Performance: measure page speed',
'Load timings, device and browser, and country; Speed Insights data is not linked to you',
'30 to 60 days (Firebase); up to 12 months of reports (Vercel)',
'Google Firebase and Vercel',
],
[
'Embedded videos: play project previews',
"IP address, device, and YouTube's cookies, once a preview plays",
'Set by Google',
'YouTube (Google)',
],
[
'Offline access: load faster and work offline',
"Copies of this site's pages, kept only on your device",
UNTIL_WITHDRAWN,
'This site, on your device',
],
[
'Link icons: show where links go',
'IP address and the host name of each linked site; no cookies',
'Not kept; DuckDuckGo states it does not log IP addresses',
'DuckDuckGo',
],
[
'Email you send: reply to you',
'Your email address, name, and message',
'Until no longer needed to reply',
"Microsoft, which hosts this site's Outlook.com inbox",
],
],
},
],
},
{
heading: 'Cookies and device storage',
blocks: [
{
type: 'table',
columns: ['Name', 'Set by', 'Purpose', 'Category', 'Duration'],
rows: [
[
CONSENT_COOKIE,
'This site',
'Remembers your choices and when you made them',
'Essential',
`${CONSENT_MAX_AGE_DAYS} days`,
],
['_ga', 'Google Analytics', 'Distinguishes visitors', 'Analytics', '2 years'],
['_ga_<ID>', 'Google Analytics', 'Keeps session state', 'Analytics', '2 years'],
[
'firebase-installations-database, firebase-heartbeat-database (IndexedDB)',
'Firebase',
'Installation identifier and software development kit health data',
'Analytics',
UNTIL_WITHDRAWN,
],
[
'@firebase/performance/config, @firebase/performance/configexpire (local storage)',
'Firebase',
'Performance Monitoring settings',
'Analytics',
UNTIL_WITHDRAWN,
],
[
'YouTube cookies and local storage, such as yt-remote-device-id',
'YouTube (Google)',
"Set by YouTube's player when a preview plays",
'Embedded videos',
'Set by Google',
],
// The cache names are declared in public/sw.js, which the build does not import.
[
'alexjsully-portfolio, runtime-cache (Cache Storage)',
'This site',
'Offline copies of pages and files',
'Offline access',
UNTIL_WITHDRAWN,
],
],
},
],
},
{
heading: 'Where your information goes',
blocks: [
{
type: 'paragraph',
text: 'Hosting, analytics, video, error-monitoring, email, and link-icon providers process information on their own servers, each under its own privacy policy, linked below. DuckDuckGo receives only the host names of linked sites, and states that it does not log IP addresses.',
},
{
type: 'table',
columns: ['Recipient', 'Information', 'When and how', 'Privacy policy'],
rows: [
[
'Vercel Inc.',
'Hosting logs; Speed Insights if you allow Analytics',
'On each visit, over an encrypted connection',
'https://vercel.com/legal/privacy-policy',
],
[
'Google LLC',
'Analytics and performance data if you allow Analytics; video data if you allow Embedded videos',
'While you use the site, over an encrypted connection',
'https://policies.google.com/privacy',
],
[
'Functional Software, Inc. (Sentry)',
'Error reports',
'When an error occurs on the server, or in your browser if you allow Analytics, over an encrypted connection',
'https://sentry.io/privacy/',
],
[
"Microsoft Corporation (Outlook.com, which hosts this site's inbox)",
'Email you send and the replies to it',
'When you email, over an encrypted connection',
'https://privacy.microsoft.com',
],
[
'Duck Duck Go, Inc.',
'Host names of linked sites, if you allow Link icons',
'While you view a page with links, over an encrypted connection',
'https://duckduckgo.com/privacy',
],
],
},
{
type: 'paragraph',
text: 'Allowing Analytics, Embedded videos, or Link icons is also your consent to sending that information to the providers above. You can refuse: the site works without it, except that your visit is not measured, project previews do not play videos, and links show a generated icon.',
},
],
},
{
heading: 'How your information is protected',
blocks: [
{
type: 'list',
items: [
'Connections to the site are encrypted, and browsers are told to use only encrypted connections.',
'Security headers help stop the site being framed by other sites and browsers guessing file types.',
'Only the information listed above is knowingly collected.',
'Access to the analytics and error dashboards is limited to the site owner.',
],
},
],
},
{
heading: 'Questions about your information',
blocks: [
{
type: 'paragraph',
text: `You are welcome to email ${EMAIL_LINK} with any question about your information. Withdrawing consent in "Cookie settings" stops further collection.`,
},
{
type: 'paragraph',
text: 'To learn more about privacy and your rights where you live, these are some of the privacy authorities that publish guidance.',
},
{
type: 'table',
columns: ['Region', 'Privacy authority', 'Website'],
rows: [
['Canada', 'Office of the Privacy Commissioner of Canada', 'https://www.priv.gc.ca'],
['European Union', 'European Data Protection Board', 'https://www.edpb.europa.eu'],
['France', "Commission nationale de l'informatique et des libertés", 'https://www.cnil.fr/en'],
[
'Germany',
'Federal Commissioner for Data Protection and Freedom of Information',
'https://www.bfdi.bund.de',
],
['Ireland', 'Data Protection Commission', 'https://www.dataprotection.ie'],
['United Kingdom', "Information Commissioner's Office", 'https://ico.org.uk'],
['United States', 'Federal Trade Commission', 'https://consumer.ftc.gov'],
['California', 'California Privacy Protection Agency', 'https://cppa.ca.gov'],
[
'Argentina',
'Agencia de Acceso a la Información Pública',
'https://www.argentina.gob.ar/aaip',
],
['China', 'Cyberspace Administration of China', 'https://www.cac.gov.cn'],
[
'India',
'Ministry of Electronics and Information Technology',
'https://www.meity.gov.in/data-protection-framework',
],
['South Korea', 'Personal Information Protection Commission', 'https://www.pipc.go.kr'],
[
'Vietnam',
'Ministry of Public Security, personal data protection portal',
'https://baovedlcn.gov.vn',
],
],
},
],
},
{
heading: 'Links to other sites',
blocks: [
{
type: 'paragraph',
text: 'Project, publication, and social links lead to other sites, such as GitHub, LinkedIn, and journal publishers, which have their own privacy policies.',
},
],
},
{
heading: 'Changes and language',
blocks: [
{
type: 'paragraph',
text: `The date at the top shows when this policy was last updated. When a change affects what you are asked to allow, the banner asks you again. This policy is written in English.`,
},
],
},
],
};
export default policy;