Skip to content

Enhance LocalStack integration and improve test configurations#1

Merged
fgiova merged 5 commits intomainfrom
test/coverage
Apr 2, 2026
Merged

Enhance LocalStack integration and improve test configurations#1
fgiova merged 5 commits intomainfrom
test/coverage

Conversation

@fgiova
Copy link
Copy Markdown
Owner

@fgiova fgiova commented Apr 2, 2026

This pull request makes several significant improvements to the backend package, focusing on refactoring the server startup process, enhancing health check logic, improving configuration handling, and updating tests for better coverage and reliability. The changes also include some minor dependency and Dockerfile adjustments.

Key changes include:

Backend Server Refactor and Startup

  • Refactored the backend server entrypoint: moved the main server startup logic from index.ts to a new server.ts file, and updated the Dockerfile and scripts to use server.js as the entrypoint. The buildApp function in index.ts now returns a Fastify instance for easier testing and modularity. [1] [2] [3] [4] [5] [6]

Health Check Logic Improvements

  • Enhanced the health check function to return a list of active services based on LocalStack's reported status and the configured enabled services, with improved error handling. Updated all related tests to validate these changes. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]

Configuration and Testing Enhancements

  • Added comprehensive tests for configuration parsing, ensuring that enabled services are correctly interpreted from environment variables, including edge cases with unknown or empty values.

Dependency and Code Quality Updates

  • Updated scripts and dependencies in package.json, including new dev dependencies for testing and coverage, and reordered some dependencies for consistency. Added v8 ignore comments in several places to improve code coverage reporting. [1] [2] [3] [4] [5]

Minor Fixes and Cleanups

  • Updated IAM and group policy route schemas for better consistency. [1] [2]
  • Added isDefaultVersion to IAM policy version responses for completeness.
  • Removed the unused aws/clients.ts file.
  • Updated .nvmrc to specify Node.js version 24.
  • Ensured Docker build copies the icons directory.

These changes collectively improve the maintainability, testability, and reliability of the backend service.

fgiova added 5 commits April 2, 2026 15:03
…status in the UI

Parse the LocalStack /_localstack/health response to extract which services
are actually running. The health endpoint now returns a `services` array
containing only the services that are both enabled in the backend config and
reported as "running" or "available" by LocalStack.

The frontend Sidebar and Dashboard consume this data to visually disable
services that are configured but not currently active on the LocalStack
instance (reduced opacity, non-clickable, tooltip on collapsed sidebar).

Additional changes included in this commit:

- Add app icons (favicon, apple-touch-icon, PWA manifest) and a Vite plugin
  to copy them into the public directory at build time
- Copy desktop icon in the Electron build script
- Fix IAM route response schemas (DeleteResponseSchema → MessageResponseSchema)
- Add isDefaultVersion field to IAM policy version response
- Add v8 ignore hints for unreachable fallback expressions in S3, SNS, SQS
- Update .gitignore for generated icon assets
- Update health unit, integration, and index tests to match the new response shape
Separate the Fastify app factory (buildApp in index.ts) from the server
bootstrap logic (main in server.ts) so that index.ts is a pure library
module with no side effects, making it easier to import in tests and
other consumers.

- Move main() from index.ts to new server.ts with top-level error handling
- Update package.json dev/start scripts to use server.ts/server.js
- Update Dockerfile ENTRYPOINT to node server.js
- Add .nvmrc pinned to Node 24
@fgiova fgiova merged commit f94d586 into main Apr 2, 2026
2 checks passed
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 2, 2026

🎉 This PR is included in version 1.1.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant