Skip to content

Local env#108

Merged
rssk merged 6 commits intomainfrom
local-env
Dec 9, 2025
Merged

Local env#108
rssk merged 6 commits intomainfrom
local-env

Conversation

@rssk
Copy link
Copy Markdown
Collaborator

@rssk rssk commented Dec 3, 2025

Environment Variable Management and Local Development Improvements

Summary

Refactors environment variable management to a fail-fast approach, removes dotenv dependency, and adds local development automation.

Changes

Environment Variable Management

  • Removed dotenv from all services (except desktopApp)
  • Added requireEnv() and requireEnvOptional() helpers for fail-fast validation
  • Services exit immediately with clear error messages if required variables are missing
  • Updated config files: centralApi, centralFederatedClient, fileServer, vaultFederatedClient

Local Development Scripts

  • Created dev-start.js for each service:

    • Auto-initializes .env from .env.template if missing
    • Loads .env file (respects shell exports)
    • Runs npm start (includes build step)
  • Created dev-start-all.sh:

    • Launches all services in separate terminal tabs (macOS/Linux)
    • Leaves original tab untouched
    • Includes startup delay for service dependencies

Webpack Configuration

  • Disabled automatic browser opening (BROWSER=none)

Benefits

  • Fail-fast configuration prevents runtime errors
  • Single command launches all services
  • Services always build on start
  • No auto-opening browser tabs

Migration Notes

  • .env.template files remain as documentation
  • Developers create .env files (auto-created on first run)
  • Production should set env vars externally
  • dev-start.js scripts are development-only

@rssk rssk merged commit 68464df into main Dec 9, 2025
1 check passed
@rssk rssk deleted the local-env branch December 9, 2025 18:05
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