Skip to content

Feat/branding#7

Merged
kek-Sec merged 5 commits intomainfrom
feat/branding
Mar 14, 2025
Merged

Feat/branding#7
kek-Sec merged 5 commits intomainfrom
feat/branding

Conversation

@kek-Sec
Copy link
Owner

@kek-Sec kek-Sec commented Mar 14, 2025

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 as BRAND_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, and BRAND_FOOTER_LINK.
  • docker-compose.prod.yml and docker-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 /config to serve the branding configuration.
  • internal/api/v1/config.go: Created a new file to define the Config struct and the GetConfig function, 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:

@kek-Sec kek-Sec requested a review from Copilot March 14, 2025 09:58
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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',

@kek-Sec kek-Sec requested a review from Copilot March 14, 2025 10:05
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 16 out of 16 changed files in this pull request and generated no comments.

@kek-Sec kek-Sec merged commit 11d0e47 into main Mar 14, 2025
11 checks passed
@kek-Sec kek-Sec deleted the feat/branding branch March 14, 2025 10:06
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.

2 participants