Skip to content

feat: manage system settings (timezone, location, scheduler interval) from the app#55

Merged
markoceri merged 3 commits into
edge-mining:mainfrom
markoceri:feat/system-settings
Jul 14, 2026
Merged

feat: manage system settings (timezone, location, scheduler interval) from the app#55
markoceri merged 3 commits into
edge-mining:mainfrom
markoceri:feat/system-settings

Conversation

@markoceri

@markoceri markoceri commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Closes #54
Closes #8

Overview

Move timezone, location (latitude/longitude) and the optimization scheduler interval out of environment variables and into user-editable, database-backed settings, manageable from a new "System" settings page.

Core

  • SystemConfiguration value object and SystemConfigurationUpdated domain event.
  • ConfigurationService.get_system_configuration() / update_system_configuration() with validation (valid IANA timezone, latitude/longitude ranges, positive interval), persisted through the existing settings store (no migration).
  • Runtime propagation via the event bus, no restart needed:
    • refresh the application timezone;
    • reconfigure the Sun-calculation location (AstralSunFactory.reconfigure());
    • reschedule the evaluation job with the new interval.
  • Timezone state encapsulated in a TimezoneProvider.
  • Removed the TIMEZONE, LATITUDE, LONGITUDE and SCHEDULER_INTERVAL_SECONDS environment variables; defaults are seeded on first run.

API

  • GET / PUT /api/v1/system/settings.

Frontend

  • New "System" settings page with the timezone list sourced from the browser and an interactive dark Leaflet map to pick the location (draggable marker using the Edge Mining logo).

Tests

  • Schema, service and handler unit tests. Full unit suite green.

Notes

  • Breaking change: the removed environment variables are ignored; the values now live in the database and are configured from the app.
image

markoceri added 3 commits July 3, 2026 18:53
… from the app

Move timezone, latitude/longitude and the optimization scheduler interval out of
environment variables and into user-editable, database-backed settings.

Core:
- SystemConfiguration value object and SystemConfigurationUpdated domain event
- ConfigurationService.get_system_configuration / update_system_configuration with
  validation, persisted through the existing settings store (no migration)
- Runtime propagation via the event bus: refresh the application timezone, reconfigure
  the Sun-calculation location and reschedule the evaluation job without a restart
- Encapsulated timezone state in a TimezoneProvider; AstralSunFactory.reconfigure()
- Remove TIMEZONE, LATITUDE, LONGITUDE and SCHEDULER_INTERVAL_SECONDS env variables

API:
- GET/PUT /api/v1/system/settings

Frontend:
- System settings page with a browser-sourced timezone list and an interactive dark
  Leaflet map to pick the location (draggable marker using the Edge Mining logo)

Tests:
- Schema, service and handler unit tests
@markoceri markoceri self-assigned this Jul 3, 2026
@markoceri markoceri added enhancement New feature or request UI/UX core Backend labels Jul 3, 2026
@markoceri
markoceri merged commit 03b9d8e into edge-mining:main Jul 14, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Backend enhancement New feature or request UI/UX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Manage system settings (timezone, location, scheduler interval) from the app Add REST API for Settings (settings) domain

1 participant