Merged
Conversation
added 4 commits
March 14, 2025 11:49
…bles and API endpoint
…onents to use them
… environment variables
There was a problem hiding this comment.
Pull Request Overview
This pull request adds dynamic branding customization to the application by introducing environment variables for branding, a new backend configuration endpoint, and corresponding updates to the frontend and documentation.
- Introduces environment variables for branding in Docker files.
- Adds a new configuration endpoint (/config) in the backend to serve branding settings.
- Updates frontend components, Tailwind configuration, and documentation to support dynamic theming.
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| README.md | Updated documentation to include detailed customization instructions. |
| internal/api/v1/config.go | Added a new API endpoint to load configuration from environment variables. |
| web/src/lib/config.js | Defined default branding config and a config loader to merge server data. |
| web/src/routes/+layout.js | Updated layout to load and apply the dynamic branding configuration. |
| docker-compose.prod.yml | Added commented-out environment variable examples for production. |
| docker-compose.yaml | Added branding environment variables for development. |
| web/tailwind.config.js | Included a safelist for dynamic branding class names in Tailwind CSS. |
| cmd/server/router.go | Registered the new /config endpoint in the server router. |
| version.yaml | Bumped the application version to 1.0.2. |
Comments suppressed due to low confidence (1)
web/tailwind.config.js:15
- [nitpick] Verify that the dynamic class names in the safelist (e.g., 'text-brand-primary') are consistent with the naming conventions used across the project and match the configured branding properties.
'text-brand-primary',
… unit tests for configuration retrieval
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces several changes to add customization options for branding and improve the code structure. The most important changes include adding environment variables for branding, updating the documentation, adding a new configuration endpoint, and modifying the frontend to support dynamic branding.
Branding Customization:
Dockerfile: Added environment variables for branding customization, such asBRAND_TITLE,BRAND_DESCRIPTION,BRAND_KEYWORDS,BRAND_AUTHOR,BRAND_THEME_COLOR,BRAND_LOGO_TEXT,BRAND_PRIMARY_COLOR,BRAND_SECONDARY_COLOR,BRAND_HEADER_TITLE,BRAND_FOOTER_TEXT, andBRAND_FOOTER_LINK.docker-compose.prod.ymlanddocker-compose.yaml: Added optional environment variables for branding customization. [1] [2]web/src/app.css: Added CSS variables and utility classes for dynamic branding colors.Documentation Updates:
README.md: Added a new section for customization and updated the table of contents to include the new section. [1] [2] [3]Backend Changes:
cmd/server/router.go: Added a new endpoint/configto serve the branding configuration.internal/api/v1/config.go: Created a new file to define theConfigstruct and theGetConfigfunction, which loads configuration from environment variables and returns it as JSON.Frontend Changes:
web/src/components/Footer.svelte,web/src/components/Main.svelte: Updated components to use dynamic branding values from the configuration. [1] [2]web/src/lib/config.js: Created a new file to define the default branding configuration and a function to load the configuration from the server.web/src/routes/+layout.js,web/src/routes/+layout.svelte: Updated layout to load and apply branding configuration dynamically. [1] [2]web/tailwind.config.js: Added a safelist for dynamic classes to support branding customization.Miscellaneous:
version.yaml: Updated the application version to1.0.2.