Source
This app’s code and revision history are public. Download a copy or explore the files below.
Public
The app’s code and revision history are public.
Run it yourself
Take the whole tree and run it on your own machine. The download needs no account. Cloning needs a sign-in.
Download .zip
bounded clone 70bace54357d4b57b674108f
A copy you download is not bounded. The guarantees this app runs under - declared egress, proven invariants, writes that fail closed - live in the runtime serving this page, not in the files. What you get is auditable source you can read and run, with no runtime guarantees attached.
policy.json
{
"constants": {
"AGENT_ADDRESS": "GtpHJX8By4YoJjibA2jtDLbe1kZhhs7tRLkeEUdZMTWf",
"AGENT_ADDRESS_BOUND": true
},
"auth": {
"anonymous": true
},
"resumes/$resumeId": {
"description": "A shared resume. data is a JSON string with the whole resume (the format in functions/lib/resume.ts). Readable by anyone who opened its link (a join below); only owners can change it.",
"fields": {
"data": "String",
"createdBy": "String!",
"createdAt": "UInt!",
"updatedAt": "UInt"
},
"rules": {
"read": "@user.id != null && get(/resumes/$resumeId/joins/@user.id) != null",
"create": "@user.id != null && @newData.createdBy == @user.id && @newData.createdAt <= @time.now && @newData.updatedAt <= @time.now && @StringUtils.length(@newData.data) <= 100000 && getAfter(/resumes/$resumeId/joins/@user.id) != null && getAfter(/resumes/$resumeId/owners/@user.id) != null && getAfter(/resumekeys/$resumeId) != null",
"update": "@user.id != null && get(/resumes/$resumeId/owners/@user.id) != null && @newData.updatedAt <= @time.now && @StringUtils.length(@newData.data) <= 100000",
"delete": "false"
}
},
"resumes/$resumeId/joins/$userId": {
"description": "Someone who opened the resume's link on a device. Knowing the resume id is what lets you join and read it.",
"fields": {
"at": "UInt!"
},
"rules": {
"read": "@user.id != null && @user.id == $userId",
"create": "@user.id != null && @user.id == $userId && @newData.at <= @time.now && getAfter(/resumes/$resumeId) != null",
"update": "false",
"delete": "false"
}
},
"resumes/$resumeId/owners/$userId": {
"description": "Someone who can edit the resume: its creator, or anyone who presented its admin key.",
"fields": {
"at": "UInt!"
},
"rules": {
"read": "@user.id != null && get(/resumes/$resumeId/joins/@user.id) != null",
"create": "@user.id != null && @user.id == $userId && @newData.at <= @time.now && ((get(/resumes/$resumeId) == null && getAfter(/resumes/$resumeId).createdBy == @user.id) || (get(/resumekeys/$resumeId) != null && getAfter(/resumeclaims/$resumeId/c/@user.id).key == get(/resumekeys/$resumeId).key))",
"update": "false",
"delete": "false"
}
},
"resumekeys/$resumeId": {
"description": "The resume's admin key, set once by its creator. Only the public API can read it, to check a key someone presents.",
"fields": {
"key": "String!"
},
"rules": {
"read": "@user.id == @const.BOUNDED_PUBLIC_PRINCIPAL_API",
"create": "@user.id != null && get(/resumes/$resumeId) == null && getAfter(/resumes/$resumeId).createdBy == @user.id && @StringUtils.length(@newData.key) >= 20",
"update": "false",
"delete": "false"
}
},
"resumeclaims/$resumeId/c/$userId": {
"description": "An admin key someone presented to become an owner. Nobody can read it back.",
"fields": {
"key": "String"
},
"rules": {
"read": "false",
"create": "@user.id != null && @user.id == $userId",
"update": "@user.id != null && @user.id == $userId",
"delete": "false"
}
},
"functions": {
"api": {
"auth": "true",
"entry": "functions/api.ts",
"public": true,
"methods": [
"GET",
"POST",
"PATCH"
],
"cors": "passthrough"
}
}
}
Change history
Quality pass: several resumes, cover letters, phone-readable shared pages
Bounded source sync
Bounded source sync
Bounded source sync