Skip to content

Conversation

@timonrieger
Copy link

Summary

This PR replaces the current .env-based configuration with a SQLite-backed config store.

SQLite was chosen for simplicity, zero external dependencies, and to enable editing configuration while the container is running via the existing web interface at /admin.

Breaking change

This is an intentional breaking change:

  • Configuration is no longer sourced from .env at runtime
  • Existing deployments will require migration

The goal is to avoid dual config sources and long-term maintenance complexity.

Notes / limitations

  • The current implementation does not support multi-user configuration
  • It may break multi-user or multi-server setups; this has not been fully validated yet
  • The change assumes a single-node / single-config model
  • This PR is considered WIP, to not waste time in case of rejection by the maintainer

Compatibility path

If this approach is considered too disruptive, the implementation can be refactored to:

  • keep .env as a supported backend
  • make SQLite an alternative config provider behind the same interface

That was intentionally deferred to keep this PR focused unless required.

Scope

This PR is limited to configuration storage changes only. No unrelated behavior or features are introduced.

- Added Entity Framework Core packages to project.
- Implemented ConfigDbContext for managing account overrides.
- Created AccountOverrideEntity and corresponding DTO for data representation.
- Developed SqliteAccountOverrideStore for data access and manipulation.
- Introduced AccountOverrideMerger for applying overrides to account settings.
- Updated ConfigController to handle account override retrieval and updates.
- Enhanced Program.cs to configure the SQLite database context.
- Added tests for account override functionality in ConfigController and AccountOverrideMerger.
- Updated Dockerfile and docker-compose files to support SQLite data persistence.
- Introduced IAccountOverrideChangeNotifier and its implementation for notifying clients of account override changes.
- Updated ConfigController to handle SSE for account override events and version retrieval.
- Enhanced home-page and admin components to support real-time updates and management of account overrides.
- Added functionality to refresh asset loading upon override changes.
- Introduced GeneralSettingsDto for managing general settings.
- Implemented IGeneralSettingsStore and SqliteGeneralSettingsStore for data access.
- Added GeneralSettingsChangeNotifier for real-time updates on general settings changes.
- Enhanced ConfigController to handle retrieval and updates of general settings via API.
- Updated Program.cs to initialize the GeneralSettings table in SQLite.
- Integrated live updates in the home-page and admin components for general settings changes.
@coderabbitai
Copy link

coderabbitai bot commented Dec 31, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant