Add custom stats widgets and update API routing and CI pipeline integration#2
Open
MSalman6 wants to merge 5 commits into
Open
Add custom stats widgets and update API routing and CI pipeline integration#2MSalman6 wants to merge 5 commits into
MSalman6 wants to merge 5 commits into
Conversation
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 a new "Custom Stat" widget to the home page stats section, allowing dynamic display of custom statistics based on a configurable JSON file. It adds both backend and frontend support for fetching and rendering these custom stats, and ensures proper integration with analytics and metadata systems. Additionally, a new GitHub Actions workflow is added for Docker image publishing.
Custom Stat Widget Feature:
app/api/custom-stat/route.ts) that reads from acustom-config.jsonfile and fetches upstream data for each configured custom stat, supporting flexible stat configuration.CustomStatWidgetReact component (client/slices/home/pages/index/stats/CustomStatWidget.tsx) to fetch the custom stat configs and display each stat as a widget, with support for nested JSON paths and icons.CustomStatWidgetinto the main stats grid on the home page (client/slices/home/pages/index/stats/Stats.tsx). [1] [2]Analytics and Metadata Integration:
/api/custom-statroute with analytics (client/shared/analytics/mixpanel/get-page-type.ts), Open Graph metadata (client/shared/metadata/get-page-og-type.ts), and page template/title systems (client/shared/metadata/templates/description.ts,client/shared/metadata/templates/title.ts) to ensure consistent tracking and SEO. [1] [2] [3] [4]DevOps:
.github/workflows/docker-publish.yml) to build and publish Docker images for the project on pushes to thedmdbranch.