Web account and administration surfaces
The web account and administration surfaces help people enter Karakeep, recover and protect their accounts, control personal and service settings, and operate a shared instance. They extend the Web application beyond daily bookmark reading and connect to the service controls described in Integration and operations APIs.
Access boundary
The web app separates public account entry, signed-in settings, and administrator controls. A session carries the user identity and role. Settings belong to the signed-in user, while administration is limited to users with the admin role.
Authentication methods
Sign-in offers local email and password access when enabled and shows the OAuth providers configured by the server. Local access can require a verified email. OAuth uses the same session boundary for both new and returning users.
References: apps/…/SignInForm.tsx• L18-71 apps/…/CredentialsForm.tsx• L34-95 apps/…/auth.ts• L116-203 apps/…/auth.ts• L218-279
Session boundary
Public pages support people who do not have a session. A signed-in user who opens sign-in is sent to a validated destination, or to the main app when no safe destination is supplied. Users without a session cannot use settings, and non-admin users cannot use administration.
References: apps/…/auth.ts• L31-56 apps/…/page.tsx• L8-22 apps/…/layout.tsx• L114-123 apps/…/layout.tsx• L45-53
Account access flows
Account access uses linked flows for registration, email verification, password recovery, and invitations. Each flow ends in a usable session or returns the person to a safe next step.
Registration flow
Registration creates a local account from a name, email, and password when open sign-up and local passwords are enabled. A configured human check can block account creation. After creation, the flow signs the user in or sends the user to email verification when verification is required.
References: apps/…/page.tsx• L11-34 apps/…/SignUpForm.tsx• L46-96 apps/…/SignUpForm.tsx• L109-163 packages/…/users.ts• L31-95
Email verification flow
The email check page confirms where the message was sent and supports a limited resend. The verification page consumes the token and shows loading, success, or error state before offering the next safe action. A validated mobile destination can return the user to a mobile app instead of web sign-in; a web destination returns the user to sign-in.
References: apps/…/page.tsx• L20-51 apps/…/page.tsx• L23-110 packages/…/users.ts• L218-257 apps/…/auth.ts• L229-247
Password recovery flow
Recovery separates the request for help from the password change. The request gives a neutral result so it does not reveal whether an account exists. A valid link opens a form that checks and saves a new password before returning the user to sign-in.
References: apps/…/page.tsx• L6-19 apps/…/ForgotPasswordForm.tsx• L36-95 apps/…/page.tsx• L6-27 apps/…/ResetPasswordForm.tsx• L47-108 packages/…/users.ts• L259-287
Invitation flow
An administrator can invite a specific email instead of relying on open registration. The invite page checks the token and distinguishes loading, invalid, and expired states. A valid invite collects a name and password, creates a verified regular user, removes the invite, and signs the user in.
The main account-entry paths converge on a signed-in session as shown below.
flowchart TD
Visitor[Visitor] --> SignIn[Sign in]
Visitor --> Register[Register]
Visitor --> Recovery[Recover password]
Admin[Administrator] --> Invite[Send invitation]
Invite --> Accept[Accept invitation]
Register --> Verify[Verify email when required]
Verify --> SignIn
Recovery --> Reset[Set new password]
Reset --> SignIn
Accept --> Session[Signed-in session]
SignIn --> Session
References: apps/…/page.tsx• L6-25 apps/…/InviteAcceptForm.tsx• L51-164 apps/…/InviteAcceptForm.tsx• L166-215 packages/…/invites.ts• L21-78 packages/…/invites.ts• L152-206
User settings
Settings give a signed-in user one place to manage identity, security, reading behavior, data movement, and connected services. The settings shell loads the user’s current settings and shows optional subscription or AI areas only when the related server service is configured. Shared page and section surfaces keep each setting focused while the settings navigation groups related product controls.
References: apps/…/layout.tsx• L30-111 apps/…/layout.tsx• L114-149
Profile and security settings
Profile settings show the user identity and avatar. Security settings support a local-password change and account deletion. Deletion is permanent and asks for the local password when the account uses local authentication.
References: apps/…/UserAvatar.tsx• L21-139 apps/…/ChangePassword.tsx• L28-72 apps/…/DeleteAccount.tsx• L38-109 apps/…/page.tsx• L19-31
Personal behavior settings
Personal settings shape how the app feels and behaves for one user. They cover language, time zone, bookmark and archive behavior, tag style, AI preferences, and reader presentation. Reader defaults can be stored for the account while local device overrides can take precedence and can be cleared.
References: apps/…/UserOptions.tsx• L56-72 apps/…/UserOptions.tsx• L140-269 apps/…/AISettings.tsx• L64-215 apps/…/AISettings.tsx• L219-455 apps/…/ReaderSettings.tsx• L42-78 apps/…/ReaderSettings.tsx• L102-303
Data transfer settings
Import and export settings move bookmark data into and out of the account. Imports accept several external file formats and show upload progress. An import session then provides a durable view of progress and item results. Its status controls support staging, pausing active work, resuming paused work, finalizing staged work, and deleting sessions in states that can be removed. Result tabs separate accepted, rejected, duplicate, and pending items, while archived sessions retain their summary without an active result list. Exports support Karakeep JSON and Netscape HTML formats.
References: apps/…/ImportExport.tsx• L51-131 apps/…/ImportExport.tsx• L134-375 apps/…/ImportSessionCard.tsx• L84-121 apps/…/ImportSessionCard.tsx• L252-355 apps/…/ImportSessionDetail.tsx• L239-319 apps/…/ImportSessionDetail.tsx• L530-645 apps/…/useImportSessions.ts• L34-197
Subscription settings
Subscription settings show the current free, custom, or paid tier, active billing dates, quota context, and payment problems. A user can start monthly or yearly web billing when Stripe is available, manage an active Stripe subscription through the billing portal, or follow the mobile app path when the subscription is managed in an app store. The page is available only when web or in-app subscription support is configured.
References: apps/…/page.tsx• L18-34 apps/…/SubscriptionSettings.tsx• L18-119 apps/…/SubscriptionSettings.tsx• L126-199 apps/…/SubscriptionSettings.tsx• L200-359
Service settings
Service settings let a user manage the systems that extend bookmark work. They include RSS feeds, backups, API keys, webhooks, subscriptions, and optional AI behavior. These pages expose user-facing controls for creating, changing, running, or removing a service connection.
| Service | User-facing purpose |
|---|---|
| Feeds | Subscribe to RSS sources, fetch them, and control whether they remain active. |
| Backups | Set automatic backup rules and inspect, download, or delete backup records. |
| API keys | Create full-access or scoped credentials and revoke them when access is no longer needed. |
| Webhooks | Send selected events to a URL with an optional authentication token. |
| Subscriptions | View the current tier and quota, start paid web billing when available, or manage an active subscription through its provider. |
| AI preferences | Control inference behavior, curated tags, tag rules, and prompt previews. |
References: apps/…/FeedSettings.tsx• L66-195 apps/…/FeedSettings.tsx• L348-509 apps/…/BackupSettings.tsx• L61-207 apps/…/BackupSettings.tsx• L336-425 apps/…/page.tsx• L14-24 apps/…/AddApiKey.tsx• L160-235 apps/…/DeleteApiKey.tsx• L14-58 apps/…/WebhookSettings.tsx• L60-183 apps/…/WebhookSettings.tsx• L442-529 apps/…/SubscriptionSettings.tsx• L17-312 apps/…/AISettings.tsx• L875-885
Administrator surfaces
Administration is a role-protected area for managing the people and health of a shared instance. It adds account actions and repair tools without mixing them with normal bookmark work.
Instance overview
The administrator overview reports the size and release state of the instance, then checks the external services that support it. It shows user and bookmark totals, the running server version, and an available newer release when release checks are enabled. Connection cards distinguish services that are not configured from services that are configured but disconnected, and expose a short error when a check fails.
The health view covers the search engine, browser, queue system, and vector store. These signals help an administrator decide whether a problem belongs to account data or to a supporting service before using a repair tool.
References: apps/…/BasicStats.tsx• L14-55 apps/…/BasicStats.tsx• L74-115 apps/…/ServiceConnections.tsx• L9-81 apps/…/ServiceConnections.tsx• L109-162
User administration
The user surface combines account records with usage information. An administrator can create users, change roles and bookmark or storage quotas, reset another local user’s password, and delete another user. The current administrator cannot use these actions on their own account.
Invitation administration tracks active invitations by email. An administrator can create, resend, or revoke an invite. The server rejects an existing user or active invite for the same email, and an accepted invite creates a regular user rather than an administrator.
References: apps/…/UserList.tsx• L42-112 apps/…/UserList.tsx• L114-173 apps/…/UserList.tsx• L176-255 apps/…/UpdateUserDialog.tsx• L40-99 apps/…/ResetPasswordDialog.tsx• L32-84 apps/…/InvitesList.tsx• L28-65 apps/…/InvitesList.tsx• L67-159 packages/…/invites.ts• L21-77 packages/…/invites.ts• L208-275
Bookmark diagnosis
The bookmark debugger gives an administrator a focused view of one bookmark. It brings together ownership, content, crawl, enrichment, tags, and assets, then offers targeted repair actions such as recrawl, reindex, embedding regeneration, retagging, and resummarization. These actions support diagnosis and repair rather than normal bookmark use.
References: apps/…/BookmarkDebugger.tsx• L41-178 apps/…/BookmarkDebugger.tsx• L208-241 apps/…/BookmarkDebugger.tsx• L269-416 apps/…/BookmarkDebugger.tsx• L618-697
Maintenance support
Shared maintenance controls support large operational lists without hiding their state. Search, selection, empty results, and retry states give administrator-facing maintenance views a consistent way to narrow work and recover from a failed load.
References: apps/…/Maintenance.tsx• L11-94
Change checklist
When these files or sections are changed, remember to consider these:
- Keep page access, session redirects, and role checks aligned so a user does not reach a dead end after sign-in.
- Keep registration, verification, resend, recovery, and invitation rules aligned with server auth settings and token contracts.
- Treat return destinations as a shared contract. Validate new destinations before using them for web or mobile flows.
- Keep invite creation, lookup, acceptance, resend, and revoke behavior aligned so old links cannot create confusing account states.
- Keep admin role and quota fields aligned with the user contract. Refresh user and usage views after account changes.
- Keep import session status, allowed actions, polling, result filters, and pagination aligned. A new state must have a clear user action or terminal view.
- Keep API key scopes and webhook events aligned with the service contracts. Do not expose an option that the server cannot honor.
- Keep backup and subscription status views aligned with the asynchronous service state. A queued or canceled action must not look complete.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| Required email verification is incomplete | Local sign-in does not create a session | The auth callback sends the user to the email check flow |
| A recovery or invitation token is invalid or used | The account flow cannot continue | The public pages show an error state before collecting account details |
| Open registration or local password auth is disabled | The related local account path is unavailable | The client reflects server auth configuration |
| A non-admin opens an admin route | The user cannot access administrator controls | The admin layout checks the session role |
| An admin tries to edit, reset, or delete their own user | The account action is blocked | User rows disable self-actions and server procedures enforce the boundary |
| An import session is paused or staged | Processing does not continue until the matching action is taken | Session status controls expose only actions valid for that state |
| An archived import session is opened | Its item results are not loaded for active browsing | The detail view shows the archived summary and hides result filters |
| A subscription provider is not configured | The subscription page is not available, or web checkout is not offered | The settings navigation and page check provider configuration |
| A subscription payment fails or is set to end | Paid access needs attention or will stop at the period end | The status view shows a payment warning or cancellation date and links to the provider when applicable |
| A supporting service is configured but disconnected | Bookmark processing or search-related work can fail | The administrator connection view marks the service and displays its error |
| A user or invite mutation fails | The visible list can remain stale or the requested account action does not happen | Mutation errors are shown and successful changes invalidate the related query |
Key files
| File | Why to read it |
|---|---|
| apps/…/auth.ts | Defines the session, local and OAuth access, roles, and verification behavior. |
| apps/…/SignUpForm.tsx | Shows registration and its transition to verification or a session. |
| apps/…/CredentialsForm.tsx | Shows local sign-in, recovery, and verification feedback. |
| apps/…/page.tsx | Shows the public sign-in boundary and safe return destination. |
| apps/…/page.tsx | Shows verification outcomes, resend behavior, and web or mobile continuation. |
| apps/…/InviteAcceptForm.tsx | Shows how an invitation becomes a verified signed-in user. |
| packages/…/invites.ts | Defines invitation creation, validation, acceptance, resend, and revoke behavior. |
| apps/…/layout.tsx | Defines settings access, navigation, and configuration-gated settings groups. |
| apps/…/SettingsPage.tsx | Defines the shared page and section structure for settings. |
| apps/…/ChangePassword.tsx | Shows the signed-in password change flow. |
| apps/…/ImportExport.tsx | Shows the main data transfer entry points. |
| apps/…/ImportSessionDetail.tsx | Shows detailed import progress, result filters, and lifecycle controls. |
| apps/…/SubscriptionSettings.tsx | Shows subscription status, purchase paths, billing management, and payment states. |
| apps/…/page.tsx | Shows the backup settings entry point and its place in the signed-in settings surface. |
| apps/…/AddApiKey.tsx | Shows credential creation and scope selection. |
| apps/…/WebhookSettings.tsx | Shows webhook creation, event selection, token changes, and removal. |
| apps/…/BasicStats.tsx | Shows the administrator instance totals and release signal. |
| apps/…/ServiceConnections.tsx | Shows health signals for the services that support the instance. |
| apps/…/UserList.tsx | Shows administrator account actions, usage data, and self-action limits. |
| apps/…/InvitesList.tsx | Shows the administrator invitation lifecycle. |
| apps/…/BookmarkDebugger.tsx | Shows focused bookmark diagnosis and repair actions. |