-
-
Notifications
You must be signed in to change notification settings - Fork 4
refactor: split shared into packages #50
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
base: develop
Are you sure you want to change the base?
Conversation
…adjusting exports
…e unused imports across various files
… unused imports across the frontend
… up unused imports in auth and song services
…ture for backend and frontend
…add dependency in package.json
…istency across song components
…an up unused imports in auth, song, and user modules
…g, sounds, and thumbnail packages
…song, and sounds packages to use glob pattern for improved test discovery
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thank you for working on these changes =)
Some extra things (besides the review comments) we gotta make sure are working before merging:
- Update VSCode workspace file, test running etc. to reflect the new project structure
- Update GitHub Actions to reflect the new project structure
…Script configuration, color utilities, and user constants
…t new naming conventions and add development scripts
…nsistency across database and user modules
…TANTS across song and seed modules for consistency
There was a problem hiding this 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 PR restructures the monorepo by splitting the original server
, web
, and shared
packages into focused workspace packages and applications. It creates a more modular architecture with separate packages for configuration, database entities, song processing, thumbnail generation, and sound management, while establishing clear dependency relationships between components.
- Splits the monolithic structure into focused packages (
@nbw/config
,@nbw/database
,@nbw/song
,@nbw/thumbnail
,@nbw/sounds
) - Creates dedicated application packages (
@nbw/backend
,@nbw/frontend
) - Updates all import paths throughout the codebase to use the new package structure
Reviewed Changes
Copilot reviewed 124 out of 398 changed files in this pull request and generated 7 comments.
Show a summary per file
File | Description |
---|---|
packages/configs/ | New configuration package with shared constants and types |
packages/database/ | New database package setup with gitignore and eslint config |
apps/frontend/ | Updated frontend with new import paths and package structure |
apps/backend/ | Updated backend with new import paths and dependency references |
package.json | Root package updated with new workspace structure and exports |
build.ts | Updated build script to use new package imports |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
apps/frontend/src/modules/song-upload/components/client/context/UploadSong.context.tsx
Show resolved
Hide resolved
apps/frontend/src/modules/song-edit/components/client/context/EditSong.context.tsx
Show resolved
Hide resolved
…rvice.spec.ts for cleaner code
…or improved project organization
…nhance module functionality
…s, moving frontend to apps/frontend and adding components package
Co-authored-by: Copilot <[email protected]>
…ons for improved UI aesthetics
…eBlockWorld into feature/node-workspace-setup
…and grayscale note block image to thumbnail assets, and clean up utils.spec.ts by removing mock canvasFactory
…le asset file locations and ensure path existence check
…le linked sourcemaps for improved debugging
…future shared utility migration
…moving obsolete entries and adding new patterns for improved dependency and build management
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
…gs, streamline project structure, and improve compatibility across packages
…introducing backend and frontend specific configurations, and updating dependencies for improved linting consistency across the project
…ting scripts for backend and frontend applications, enhancing consistency and maintainability across the project
…or improved clarity and consistency
…ackend/scripts/build.ts, enhancing project structure and maintainability
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
…proved clarity and development workflow
…cumentation for better clarity
…nd change global prefix from '/api/v1' to '/v1' for improved clarity and consistency
This pull request introduces several structural and configuration changes to the whole project, primarily focused on spiting the project
server
,web
andshared
packages into separate@nbw/backend
,@nbw/frontend
,@nbw/database
,@nbw/song
,@nbw/thumbnail
,@nbw/sounds
and@nbw/config
.The following diagram shows the new structure of the project:
Bun and Testing Improvements
Refined test scripts in
package.json
to run tests specifically onsrc/**/*.spec.ts
ande2e/**/*.spec.ts
, improving test targeting and coverage.Added
.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc
to document and enforce the use of Bun over Node.js, npm, pnpm, or vite, including recommendations for APIs, testing, and frontend workflows.The https://github.com/OpenNBS/NoteBlockWorld/blob/feature/node-workspace-setup/.github/workflows/tests.yml file will need to be updated to this:
And our https://github.com/OpenNBS/NoteBlockWorld/blob/main/.github/workflows/lint.yml file is broken; it doesn't commit the linted files. I think this solves it: