Solaris

☀️ Solaris — Advanced Auto-Brightness & Circadian Monitor Control

Solaris application icon featuring a stylized sun and monitor silhouette

Solaris is a professional Windows application built with Flutter that synchronizes your monitor’s brightness and color temperature with natural circadian rhythms. By calculating the precise position of the sun (elevation and azimuth) based on your geographic location, Solaris ensures a comfortable, healthy, and fully automated computing experience 24/7.


🌟 Key Features

🌖 Circadian Mode (Auto-Adjustment)

The core of Solaris. The app automatically calculates the sun’s position relative to your horizon and adjusts monitor brightness according to a customizable curve.

Solaris Dashboard showing global brightness control and circadian rhythm chart

📈 Interactive Brightness Curves

Don’t settle for defaults. Visualize and refine your lighting profile.

🖥️ Multi-Monitor Mastery

Full control over your entire workspace.

🌡️ Dynamic Color Temperature (GPU-Assisted Filter)

Protect your eyes from blue light. Solaris shifts your display to warmer tones as the sun goes down.

🎮 Smart Game Mode (Exclusions)

Focus on the win without distractions.

☁️ Weather Influence

The first monitor controller that cares about the sky.

⌨️ Global Hotkeys

Control your environment without leaving your current app.

📍 Precise Location

🔄 Automatic Updates

Solaris supports automatic updates directly from within the app:

[!NOTE] Custom Builds (IS_OFFICIAL_RELEASE=false): Automatic updates are disabled by default. Note that updating from a custom build to an official release may reset your saved API keys due to Windows DPAPI encryption mechanics.


💤 Sleep Integration

Solaris supports sleep data integration to fine-tune monitor brightness and color temperature according to your sleep patterns. You can choose between a local offline integration or sync with Google Fit. Google Fit Sleep Data integration screen

⚙️ Smart Circadian Features

When Smart Circadian Regulation is enabled, Solaris applies four physiological models based on your sleep history:

  1. Wind-down Phase:
    • Gradually reduces brightness and warms screen color temperature (shifting toward amber/red tones) before your target bedtime to stimulate melatonin production.
    • Smoothly restores daytime settings in the morning shortly before your expected wake-up time.
  2. Bio-Morning (Dynamic Anchor):
    • Adapts the circadian schedule to your actual wake-up time. If you wake up earlier or later than usual, the system dynamically shifts the brightness and temperature peaks to sync with your body.
  3. Sleep Pressure (Wake Time):
    • Evaluates the duration of continuous wakefulness. If you stay awake for too long (over 16 hours), the system starts to gently dim the screen and reduce color temperature to minimize cognitive load.
  4. Sleep Debt Compensation:
    • Automatically activates if your last sleep was shorter than 6.5 hours. It maintains a more comfortable, muted lighting mode throughout the entire next day to relieve eye strain and fatigue.

🏠 Local Sleep Integration

If you prefer not to use Google Fit or want a completely offline, internet-free setup, Solaris features a built-in Local API Web Server. This allows third-party desktop sleep trackers, smart alarms, or automation scripts running on your PC to feed sleep data directly into the app.


🔐 Google Fit Integration

Solaris supports direct synchronization with Google Fit to retrieve your sleep history, enabling high-precision adjustments to monitor color temperature and brightness based on your personal circadian rhythms.

[!IMPORTANT] Access & Security Policy: Due to Google’s stringent security policies regarding health data (Restricted Scopes), public applications are prohibited from accessing sleep history without undergoing an extensive and costly independent security audit.

Consequently, official releases of Solaris do not ship with built-in Google Fit credentials. However, you can easily bypass this restriction using your own personal Google Cloud credentials.

To use Google Fit synchronization, you need to obtain your own Client ID and Client Secret:

  1. Create a Google Cloud Project: Set up a free project in the Google Cloud Console.
  2. Configure OAuth Consent Screen: Configure the consent screen, add the fitness.sleep.read scope, and add your Google account to the test users list.
  3. Create Credentials: Create an OAuth Client ID for a Desktop Application to get your Client ID and Client Secret.

Once you have the credentials, you have two options to integrate them:


🔑 Dynamic API Keys Configuration

Solaris is designed to be fully functional out-of-the-box, but advanced features (Mapbox maps, WeatherAPI forecasts, Google Fit sleep sync) require specific API credentials. Instead of forcing you to build the application from source code to insert these keys, Solaris features a Dynamic API Keys Management System built directly into the UI. Custom API keys configuration menu in the Solaris app

How to Configure Custom Keys

  1. Open Solaris and navigate to the Settings tab.
  2. Scroll down to the API Keys section.
  3. Paste your custom credentials into the respective fields:
    • Custom WeatherAPI Key: Get a free key from WeatherAPI.com to enable highly accurate weather and cloudiness brightness adjustments.
    • Custom Mapbox Token: Create a token on Mapbox to unlock the interactive coordinate selection map.
    • Custom Google Client ID & Custom Google Client Secret: Obtain credentials from the Google Cloud Console to sync your sleep history from Google Fit.
  4. Click Save next to the field.

Reactive Runtime Updates

The application relies on Riverpod’s reactive state architecture. When you save or clear a key in the settings UI:

Local Security and Storage

Your custom API keys are secure:


🔌 Solaris Control API v1, Outbound Webhooks & WebSocket

Solaris includes a built-in, local HTTP & WebSocket control server that enables third-party applications (Home Assistant, BitFocus Companion, Stream Deck, Raycast, Node-RED, or custom scripts) to query state, adjust monitor parameters, trigger presets, subscribe to real-time events, and receive outbound webhooks.

🌟 Key Capabilities


📚 API Documentation Catalog

Detailed technical documentation for integrating with Solaris Control API v1 is available in the docs/ directory:

Document Description
Architecture & Core Guide Core design, security pipeline, authentication formats (X-API-Key, Bearer, ?token), RFC 7807 error format, and Swagger UI setup.
REST Endpoints & Action System State endpoints (/api/v1/status, /api/v1/health, /api/v1/presets, /api/v1/sleep/sessions), Friendly Slugs, and comprehensive catalog of all 26 Action commands.
Outbound Webhooks Engine Webhook management REST endpoints, 23 Webhook events catalog, SSRF protection, True IP-Pinning, HMAC-SHA256 signatures, WAL buffer, and DLQ handling.
Real-Time WebSocket API Socket endpoint (/api/v1/ws), authentication headers, cmd_id correlation, selective module subscriptions, and OS/Hardware error broadcasts.

🚀 Technical Stack

Solaris leverages cutting-edge technologies for peak performance on Windows:


📂 Project Structure

lib/
├── l10n/              # Localization (English, Russian, Ukrainian support)
├── models/            # Data structures (SolarPhase, SettingsState, PresetType)
├── providers/         # Feature-specific logic (Weather, Temperature, Lifecycle)
├── screens/           # UI Screens (Dashboard, Schedule, Settings, Location, Sleep)
├── services/          # Core mechanics (Monitor control, Sun math, Hotkeys)
├── theme/             # Premium Glassmorphism styling and palettes
└── widgets/           # Specialized UI components (SunPathPainter, Dials, Charts)

🛠️ Getting Started

📥 Download (Quick Start)

If you just want to use the application, you can download the latest ready-to-use version from the Releases page.

  1. Download the .zip archive.
  2. Extract it to your preferred location.
  3. Run solaris.exe.

[!TIP] API Keys & Integrations: Pre-built releases do not ship with embedded credentials. However, you can configure your own credentials for Google Fit, Mapbox, and WeatherAPI directly in the app’s Settings screen (no compilation or command-line setup required).


Building from Source

Solaris can be compiled and executed entirely without any API keys. If you do not configure .env (or configure it with placeholders), the application will build successfully and run in Graceful Fallback Mode (see Feature Limitations below). However, you can still enter these keys dynamically in the running app’s settings at any time.

Prerequisites:


  1. Clone the repository:

    git clone https://github.com/maksim0-debug/Solaris.git
    
  2. Setup Environment Variables:

    Navigate to the solaris/ directory, rename .env.example to .env.

    cd solaris
    cp .env.example .env
    
  3. Configure API Keys (Optional):

    Open the newly created .env file and insert your credentials to unlock advanced features at build time:

    • WeatherAPI: To allow Solaris to adjust brightness based on real-time cloudiness and weather conditions with high precision, register at WeatherAPI.com to get a free API key and paste it into WEATHER_API_KEY.
    • Mapbox: To use interactive maps for location selection, get a Mapbox Access Token and paste it into MAPBOX_TOKEN.
    • Google Fit: If you want to sync your sleep history, follow the Google Fit Integration guide above to get your GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET.
  4. Get dependencies & generate code:

    flutter pub get
    dart run build_runner build --delete-conflicting-outputs
    
  5. Run the app:

    flutter run -d windows
    

Building for Release

flutter build windows

⚠️ Graceful Fallback Mode & Feature Limitations

If you compile or run Solaris without providing API keys, the application automatically handles this by disabling specific features while keeping the core circadian rhythm engine fully functional. You can unlock any of these features at runtime by supplying your custom keys in Settings -> API Keys:

Feature / Integration Requirement Fallback Behavior when Key is Missing (Unlockable in Settings)
Interactive Map & Mini-Map MAPBOX_TOKEN Map areas display a padlock icon. Clicking it shows a tooltip informing that the token is missing. You can still set your coordinates manually. Reverse geocoding falls back to a timezone-based city lookup.
WeatherAPI Provider WEATHER_API_KEY “WeatherAPI” option in Settings is disabled and displays a warning under the selector. Solaris automatically falls back to Open-Meteo API (free public endpoints), meaning weather-based brightness shifts remain functional.
Google Fit Integration GOOGLE_CLIENT_ID “Connect Google Fit” button on the Sleep screen is disabled, and an informative warning message is shown. Offline sleep tracking can still be fully synced using the Local Sleep Integration.


Developed with ❤️ for visual health and focused productivity.