Set up data with frontend submodule#404
Merged
IsaacMilarky merged 3 commits intostagingfrom Oct 23, 2025
Merged
Conversation
Signed-off-by: Dinne Kopelevich <dinne.kopelevich@gsa.gov>
Signed-off-by: Dinne Kopelevich <dinne.kopelevich@gsa.gov>
6 tasks
decause-gov
previously approved these changes
Oct 20, 2025
Contributor
decause-gov
left a comment
There was a problem hiding this comment.
So much great work being put in here! Cannot wait to see how the new approach pans out!
LGTM +1 🚢
The merge-base changed after approval.
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.
module-name: Set up data with frontend submodule
Problem
Currently
metricsworks as a fully functional frontend application. However, since we will now have ametrics-externaland ametrics-internalthe frontend for the applications need s to stay in sync.Solution
Restructure this repository to serve as the external data backend, with the frontend included as a Git submodule. This enables separation of data generation (backend) from presentation (frontend), allowing multiple backends to share the same frontend.
Changes Made
Removed Frontend Components
app/:app/src/(CSS, JS source files)app/site/_includes/(Liquid includes)app/site/_layouts/(Liquid layouts)app/site/*.liquidfiles (page templates)app/.eleventy.js(Eleventy configuration)app/package.json(frontend dependencies)app/rollup.config.mjs(frontend build config)app/postcss.config.js(CSS processing config)Add Submodule:
metrics_frontendas Git submodule atfrontend/.gitmodulesfile tracking the submodulefeature/submodule-restructure(will update tomainafter merge)Updated Backend Scripts:
scripts/refresh_metrics.py:app/site/_data/→frontend/app/site/_data/scripts/refresh_graphs.py:app/site/_graphs/→frontend/app/site/_graphs/gen_graphs.shif applicable:gen_reports.shif applicable:Updated Configuration
.gitignorefor new structureapp/directory from rootResult
Metricsnow runs a data generation repository with a frontend submodule.File structure after changes
Test Plan
Verified Data Generation
./gen_reports.shruns successfullyfrontend/app/site/_data/./gen_graphs.shruns successfullyfrontend/app/site/_graphs/Verify Frontend Build
cd frontend/app && npm installcompletesnpm startruns development servernpm run buildcreates production buildManual Testing Steps
Breaking Changes
Repository structure has fundamentally changed:
app/tofrontend/(submodule)--recursiveflag or rungit submodule update --initgit submodule update --init --recursiveMigration for Existing Developers
Benefits of This Structure
Related PRs
Checklist
frontend/app/site/.gitignore--recursiveReviewer Notes
This is a significant architectural change. The functionality remains the same, but the code organization is fundamentally different.
Key Points to Review:
frontend/app/site/.gitmodulesTesting This PR:
Next Steps
metrics-data-internalrepository with same structure