Accounts are centralized in AuthGuard now, so this project's own "first
launch, create the admin account" flow needs to know whether AuthGuard
already has one - not just whether *this* project's local setup has been
claimed. A fresh instance pointed at an AuthGuard that already has a
superadmin (created via AuthGuard's own web UI, or a sibling project's
setup) was incorrectly still showing its own create-account form.
Both the status check and the setup/registration handler now also consult
AuthGuard's GET /api/setup-status (via the vendored authclient's new
SetupStatus method) before deciding: if AuthGuard already has an account,
show the login screen instead, and reject a setup attempt that reaches the
handler anyway (e.g. a stale page) the same way an already-claimed local
setup is rejected.
Also updates the vendored shared/backend/authclient to add PublicUser's
totp_enabled field (AuthGuard has reported it for a while; the client
just hadn't picked it up).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This project's own "break glass" admin reset never actually touched the
centralized AuthGuard account - it only printed a local one-time code and,
on confirm, wiped this project's local "setup completed" flag so its own
setup screen reappeared, leaving the real AuthGuard account untouched and
orphaned from this project's perspective. AuthGuard now has its own proper
superadmin reset in its web UI, which is where this recovery path belongs
going forward - having every integrated project also show a "Reset admin
account" link that does something different and doesn't actually solve
"I forgot my AuthGuard password" was confusing and redundant.
Removes the backend reset handlers, their routes, the local ResetManager
field/init, any local cleanup method that only existed to serve them, and
the frontend API calls plus the onRequestReset/onConfirmReset wiring that
made the shared AuthPage component's reset link appear.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Brings this repo's README in line with a shared house style (Tech
Stack table, Repository Layout, Configuration table, Quick Start,
Development, Testing, CI/CD) and fixes staleness accumulated since it
was last written - outdated auth model descriptions, stale directory
names, dead references to removed code, and CI details that no longer
matched the actual workflow files.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Same pattern as GameStream (commit 6a46007), adapted for CollabTable
being genuinely multi-user (not single-admin): admin user management
(list/create/update/delete, role reassignment, superadmin protection)
is fully proxied to AuthGuard, which already enforces the same rules
CollabTable checked locally. Cookie forwarding, no local session token,
AUTHGUARD_URL optional (unset = auth fully disabled), transport
failures always surface as errAuthGuardUnavailable rather than ever
letting a request through - proven with live tests against a closed
socket.
CollabTable's device-sync API token feature (separate from browser
sessions) is deliberately left local-only regardless of AUTHGUARD_URL,
keyed by a new currentUserID helper (AuthGuard's id when enabled, the
shared placeholder id 0 when disabled) - a real, functional token
either way, not faked data.
Real bug found and fixed: api_tokens.user_id had a hard FK into the
local auth_users table, which would reject new tokens once accounts
stop being written locally. Dropped the now-invalid FK.
Known, accepted gap (same as GameStream): self-service profile editing
for non-admin accounts is lost, since AuthGuard only exposes an admin
endpoint, no self-edit. TOTP QR issuer branding now comes from AuthGuard
rather than CollabTable.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- Sync shared web-ui AdminDialog and header/profile/settings dialog updates
- Add a dedicated admin entry to the header profile dropdown, admin-only
- Move user-management settings from SettingsDialog/ProfileDialog into AdminDialog
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- The dashboard and list-detail page roots' own p-4 stacked on top of
the shared page title box's margin-bottom (padding never collapses
with margin) - drop the top half so there's a single, consistent gap.
- Remap the shared component library's --sc-* tokens onto this app's
own --color-* palette so the header, page title box, dialogs, and
buttons all render in-brand instead of the generic default theme.
- Added TOTP setup, enable, and disable functions to the API.
- Implemented admin reset request and confirmation functionalities.
- Updated AuthPage to handle new reset functionalities and TOTP inputs.
- Enhanced auth store to manage user creation, deletion, and listing.
- Improved AppShell and SettingsDialog to support user management features.
- Refactored API calls for better organization and clarity.
- Implemented CredentialsDialog for updating user credentials.
- Created auth store with functions for managing authentication state.
- Added HealthWidget to display server health status.
- Introduced health monitoring functionality with polling.
- Developed AppShell layout to manage authentication and loading states.
- Added SettingsDialog for user preferences including theme and language.
- Created utility functions for list management and data fetching.
- Implemented dashboard view mode preferences.
- Integrated search functionality for filtering lists.
- Established theme management with local storage support.
- Added utility functions for class name management.
- Configured SvelteKit for static site generation with fallback.
- Set up Vite for development with proxy support for API calls.
- Created About and List detail pages with data fetching and display.
- Added favicon and updated project configuration files.
feat(api): update API methods to include email and identifier for authentication
feat(ui): enhance authentication forms to support email input
feat(settings): implement language selection in settings dialog
feat(language): add language management for multilingual support
- Add go.mod and go.sum for dependency management
- Implement models for List, Field, Item, ItemValue, SyncRequest, SyncResponse, and NotificationEvent
- Create notification handling functions including enqueueNotification and ignoreNotificationError
- Implement sync functionality to handle data synchronization between client and server
- Add web data handling and notification polling endpoints
- Include tests for timestamp normalization and sync logic
- Embed web assets for serving the frontend application
- Introduced a new authentication system using session cookies for the web dashboard and API tokens for sync clients.
- Replaced the old SERVER_PASSWORD scheme with a more secure API token mechanism.
- Added routes for user setup, login, logout, and credential updates.
- Implemented middleware to require session and API token for protected routes.
- Updated web UI to handle authentication states and provide user feedback.
- Enhanced error handling in API requests and responses.
- Updated README to reflect new authentication flow and database requirements.
feat: implement select component for dropdown functionality
feat: create tooltip component for enhanced user interaction
feat: add TechStackSection to display technology stack information
feat: implement HealthWidget to monitor server health status
feat: create AppShell layout for consistent application structure
feat: add SettingsDialog for user preferences management
feat: implement list helpers for managing list data
feat: create overview data fetching for lists
feat: add view mode preferences for dashboard layout
feat: implement search functionality for filtering lists
feat: add theme management for light and dark modes
feat: create utility functions for class name management
chore: configure SvelteKit with static adapter and Vite
chore: add favicon for branding
chore: set up Vite configuration with Tailwind CSS and proxy settings