Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce Server-Side Concept for SciCat Frontend #1729

Open
Ingvord opened this issue Jan 28, 2025 · 0 comments
Open

Introduce Server-Side Concept for SciCat Frontend #1729

Ingvord opened this issue Jan 28, 2025 · 0 comments

Comments

@Ingvord
Copy link
Contributor

Ingvord commented Jan 28, 2025

Issue Name

Introduce Server-Side Concept for SciCat Frontend

Summary

Currently, the SciCat Frontend (FE) relies heavily on the backend (BE) for fetching configurations and managing environment-specific settings. This tight coupling introduces unnecessary complexity, reduces flexibility, and complicates deployments. To address these challenges, we propose introducing a server-side concept for the frontend, which would extract FE-specific server-side logic from the backend and manage configuration, asset serving, and routing independently.

Steps to Reproduce

  1. Observe the current FE setup where configuration is either fetched from the backend or from local files.
  2. Note the dependency on the backend for FE configuration, even in production.
  3. Analyze the complexities in deploying the FE when supporting multiple environments or backends.

Current Behaviour

The FE depends on the BE for configuration, creating a tight coupling between the two.

Inconsistent setup for dev and production environments:

  • In production, FE fetches configuration from the BE.
  • In development, FE relies on local configurations, which are only suitable for setups without a proxy.

Expected Behaviour

Introduce a lightweight server-side component for the frontend that manages:

Static Asset Serving: Delivering FE assets like JS, CSS, and HTML files.

Configuration Handling: Providing environment-specific configurations via a /config endpoint or static files.

Routing Simplification: Optionally acting as a reverse proxy to the BE for API requests (useful in development).

Decouple FE from BE configuration logic, making the FE self-contained and independent.

Extra Details

This approach aligns with modern FE practices and improves scalability, flexibility, and maintainability.

FE deployments become more consistent and self-contained, reducing complexity for both developers and operations teams.

Example configurations for different environments will be included in documentation.

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

No branches or pull requests

1 participant