Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restructuring for Multi-Platform Extensions (Phase 1) #11460

Merged
merged 8 commits into from
Mar 19, 2025

Conversation

flvndvd
Copy link
Contributor

@flvndvd flvndvd commented Mar 19, 2025

Description

• This PR reorganizes our codebase to handle multiple deployment platforms (Chrome extension, Front integration, etc.) more cleanly.
• It moves files into a more platform-oriented structure but doesn’t change the existing functionality or logic itself.
• We’re using a single package.json across all platforms for now. If we discover in the future that platform dependencies diverge significantly, we can split them into distinct package.json files as part of a more advanced monorepo approach.

Motivation:

• We need better maintainability and scalability as we support multiple “extensions” (Chrome, Front, and so on).
• Today, nearly all dependencies are shared. Hence, only one package.json is needed.
• Cleaning up the directory structure lays the groundwork for Phase 2, where we’ll add truly generic platform interfaces and further customization.

What’s Changed in This Phase:

  1. Physical File Relocation:

    • Files have been moved around to reflect a clearer “platforms / shared / ui” layout.
    • Import paths have been updated to match the new structure.
  2. Common Build Setup:

    • We still rely on shared build infrastructure, but each platform can have its own webpack config that extends or customizes the shared parts.
    • The output directories are now clearly separated by platform (e.g., build/chrome, build/front).
  3. Single Package.json:

    • All platforms share the same dependencies at the moment, so we keep one package.json to minimize duplication.
    • If/when we see significant differences in the future, we can split them into separate package.json files.
  4. No Functional Changes Yet:

    • This is only a reorganization. No new features or changes to the extension’s behavior.
    • Everything should continue working exactly as before, just with a cleaner directory structure.

Next Steps:

• Phase 2 will introduce generic platform interfaces and stricter domain boundaries, letting each platform implement the common services (e.g., for storage, authentication) in its own way.

Testing & Verification:

• Build and run the Chrome extension locally. Verify that everything still functions without regression.
• Confirm that the restructured paths match the new imports and that the build outputs (e.g., background.js, main.js, main.html) are still produced as expected.

Risk

Deploy Plan

@flvndvd flvndvd marked this pull request as ready for review March 19, 2025 09:27
Copy link
Contributor

@PopDaph PopDaph left a comment

Choose a reason for hiding this comment

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

I have not tested locally but diff LGTM! Really cool that we can reuse the code for both the Chrome ext and the Front app.

Maybe sync with @tdraier on the merging part since you're both changing a lot of things on the extension at the same time! 🙏🏻

@flvndvd
Copy link
Contributor Author

flvndvd commented Mar 19, 2025

I have not tested locally but diff LGTM! Really cool that we can reuse the code for both the Chrome ext and the Front app.

Maybe sync with @tdraier on the merging part since you're both changing a lot of things on the extension at the same time! 🙏🏻

Yep @tdraier offered to handle the conflicts on his side 😅 😁. Happy to help @tdraier.

@flvndvd flvndvd merged commit 3725d7d into main Mar 19, 2025
5 checks passed
@flvndvd flvndvd deleted the flav/front-extension branch March 19, 2025 09:51
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.

None yet

2 participants