Skip to content

Conversation

@vgeorge
Copy link
Contributor

@vgeorge vgeorge commented Oct 28, 2025

Summary

This PR introduces an early experiment toward a monorepo setup. It establishes a /packages and /apps structure and moves the main library code into packages/veda-ui. The goal is to explore the migration path and gather practical feedback before any broader restructuring decisions.

Contributes to:

Context

Based on my proposal on the ADR created by @AliceR. This is meant to complement it by prototyping a practical setup before committing to a full migration.

Changes

  • Moved app/scripts/packages/veda-ui/src/
  • Moved app/graphics/packages/veda-ui/graphics/
  • Added Yarn workspaces at root
  • Updated configs (tsconfig, gulpfile, vite, aliases`)
  • Fixed test and HTML paths
  • Kept lib/ and dist/ at root

Status

  • yarn buildlib, build, serve, test, and test:e2e all working
  • Existing builds appear unaffected

Potential Next Steps

  • Move app/apps/legacy-spa/
  • Move storybook/apps/storybook/
  • Review placement of mock/, test/, static/, and docs/
  • Revisit Parcel tooling and release process

Feedback and suggestions are welcome on the approach and possible next steps.

cc @dzole0311 @ifsimicoded @snmln @sandrahoang686 @aboydnw

- Move graphics to packages/veda-ui/graphics
- Update parcel config to extend from root
- Update gulpfile to use new source paths but keep lib output at root
- Remove package.json from library package (uses root dependencies)
- Add graphics alias to tsconfig and package.json
- Library build now working successfully
- Add $mock and $test aliases to tsconfig and package.json
- Fix test file imports to use aliases instead of relative paths
- Fix import order in test files
- TypeScript check now passes
- Note: stylelint errors are pre-existing, not introduced by refactor
@netlify
Copy link

netlify bot commented Oct 28, 2025

Deploy Preview for veda-ui ready!

Name Link
🔨 Latest commit 456ee99
🔍 Latest deploy log https://app.netlify.com/projects/veda-ui/deploys/6900d9ce54b4530008b33f29
😎 Deploy Preview https://deploy-preview-1898--veda-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Collaborator

@dzole0311 dzole0311 left a comment

Choose a reason for hiding this comment

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

Looks good as a first pass @vgeorge 👍

@@ -1,7 +1,11 @@
{
"name": "@teamimpact/veda-ui",
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should check if the renaming works with publishing of the veda-ui npm package under @teamimpact scope

"name": "veda-ui-monorepo",
"description": "VEDA UI Monorepo",
"version": "6.19.0",
"private": true,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we move this package.json into packages/veda-ui and add a new top-level one for the monorepo (set to "private": true)? 🤔

My understanding is that marking the root as private would (correctly) prevent the monorepo itself from being published, but the packages could still be published once they have its own package.json.

"$uswds": ["packages/veda-ui/src/uswds/"],
"$graphics/*": ["app/graphics/*"],
"$test/*": ["test/*"],
"$mock/*": ["mock/*"],
"$storybook": ["storybook/*"]
}
},
Copy link
Collaborator

Choose a reason for hiding this comment

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

Any thoughts on whether we can keep this as a root tsconfig.base.json shared by all packages and then have one per-package tsconfig.json that extends it?

"private": true,
"workspaces": [
"packages/*"
],
Copy link
Collaborator

Choose a reason for hiding this comment

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

Include apps/*?

@vgeorge
Copy link
Contributor Author

vgeorge commented Nov 10, 2025

@dzole0311 thanks for the review! Given that veda-ui is entering in maintenance mode (see #1889), I'm not sure if we should keep working on this refactor as there isn't a clear need for it in v6. I would suggest we close this PR.

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.

3 participants