Feat: System settings #269

Closed
opened 2026-04-05 16:17:13 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @wayneshn on 8/24/2025

This PR introduces an elementary System Settings feature for Open Archiver, enabling admins to manage global application configurations. This includes a settings service, API endpoints, database schema, and a new user interface in the frontend for managing these settings. #65

Key Features & Implementation Details:

  • Backend API & Services:

    • A new SettingsService is implemented to handle all business logic related to system settings, including retrieval, updates, and initialization with default values.
    • Secure API endpoints are established under /v1/settings:
      • GET /: A public endpoint to fetch non-sensitive settings required by all users (e.g., theme).
      • PUT /: A protected endpoint requiring manage:settings permission to update the settings.
    • The settings router is integrated into the main application server.
  • Database Schema:

    • A new system_settings table is added via a database migration to store settings in a jsonb column, allowing for flexible configuration options.
    • Drizzle schema and necessary type definitions (SystemSettings) are created and shared across the monorepo.
  • Frontend UI & State Management:

    • A new settings page is created at /dashboard/settings/system, providing a user-friendly interface for administrators.
    • The initial implementation allows for managing the Default Theme (Light, Dark, System) and a Support Email.
    • System settings are fetched in the root +layout.server.ts and made available globally, allowing the application to dynamically respond to configuration changes (e.g., applying the default theme).
    • New reusable RadioGroup UI components have been added, following the project's design system.
*Originally created by @wayneshn on 8/24/2025* This PR introduces an elementary System Settings feature for Open Archiver, enabling admins to manage global application configurations. This includes a settings service, API endpoints, database schema, and a new user interface in the frontend for managing these settings. #65 ### Key Features & Implementation Details: * **Backend API & Services:** * A new `SettingsService` is implemented to handle all business logic related to system settings, including retrieval, updates, and initialization with default values. * Secure API endpoints are established under `/v1/settings`: * `GET /`: A public endpoint to fetch non-sensitive settings required by all users (e.g., theme). * `PUT /`: A protected endpoint requiring `manage:settings` permission to update the settings. * The settings router is integrated into the main application server. * **Database Schema:** * A new `system_settings` table is added via a database migration to store settings in a `jsonb` column, allowing for flexible configuration options. * Drizzle schema and necessary type definitions (`SystemSettings`) are created and shared across the monorepo. * **Frontend UI & State Management:** * A new settings page is created at `/dashboard/settings/system`, providing a user-friendly interface for administrators. * The initial implementation allows for managing the **Default Theme** (Light, Dark, System) and a **Support Email**. * System settings are fetched in the root `+layout.server.ts` and made available globally, allowing the application to dynamically respond to configuration changes (e.g., applying the default theme). * New reusable `RadioGroup` UI components have been added, following the project's design system.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/OpenArchiver#269