- Add rokojori-auth lookup-email endpoint
+ styles.rokojori.com
- Project members are currently stored by email (Option B interim). To migrate to
- user-ID-based membership the two services need a server-to-server lookup call.
+ New asset and font hosting service at styles.rokojori.com. Hosts Google Fonts
+ (downloaded and self-served), CSS presets, components, and images for use
+ across all rokojori websites.
- In rokojori-auth:
- — Add POST /api/auth/lookup-email route
- — Body: { email: string }
- — Auth: Authorization: Bearer <SERVICE_SECRET> header (shared env var, not a user JWT)
- — Returns { id, email } on success, 404 if no account exists for that email
- — Add SERVICE_SECRET to rokojori-auth .env and its deployment config
+ Auth via shared JWT cookie from rokojori-auth. Access gated by requireAccess
+ middleware (already designed and documented in rokojori-auth workspace).
+ PATCH /api/admin/users/:id/products is live in rokojori-auth — assign the
+ "styles" product to grant access.
- In Roject:
- — Add ROJECT_SERVICE_SECRET to .env (must match rokojori-auth)
- — In POST /api/projects/:id/members: call account.rokojori.com/api/auth/lookup-email,
- receive the user ID, store member_id as the user ID instead of the email
- — In source/server/projectAccess.ts change the one line in memberMatchesUser()
- from member.member_id === user.email
- to member.member_id === user.userId
- — Write a one-off migration script to rewrite existing project_members records:
- for each member row, call lookup-email with the stored email, replace member_id
- with the returned user ID
+ Pages:
+ — / — logged-out or no-permission users see "STYLES" + login button linking
+ to account.rokojori.com/login?redirect=https://styles.rokojori.com;
+ logged-in users with access see list of available sections
+ — /list-fonts — preview-sentence input at top, then all font families rendered
+ with that sentence
+ — /add-fonts — preview-sentence input + font-family name input; downloads from
+ Google Fonts and generates a stylesheet
+
+ Access rules: role:admin, role:user + product:styles, role:user + product:premium
diff --git a/workspace/boards/tasks.html b/workspace/boards/tasks.html
index 16f999d..a83336f 100644
--- a/workspace/boards/tasks.html
+++ b/workspace/boards/tasks.html
@@ -66,6 +66,23 @@
+
+ Roject: wire lookup-email for member storage migration
+
+ The rokojori-auth side (POST /api/auth/lookup-email) is live.
+ Remaining Roject-side work:
+
+ — Add SERVICE_SECRET to Roject .env (must match rokojori-auth SERVICE_SECRET)
+ — In POST /api/projects/:id/members: call account.rokojori.com/api/auth/lookup-email,
+ receive the user ID, store member_id as the user ID instead of the email
+ — In source/server/projectAccess.ts change memberMatchesUser()
+ from member.member_id === user.email
+ to member.member_id === user.userId
+ — Write a one-off migration script: for each member row, call lookup-email
+ with the stored email and replace member_id with the returned user ID
+
+
+
Switch Gitea webhook to dev branch