refactor: split shared into packages#50
Merged
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
Bentroen
reviewed
Jul 26, 2025
Member
Bentroen
left a comment
There was a problem hiding this comment.
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
…s, moving frontend to apps/frontend and adding components package
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…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
…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
…proved clarity and development workflow
…cumentation for better clarity
…nd change global prefix from '/api/v1' to '/v1' for improved clarity and consistency
Bentroen
approved these changes
Sep 21, 2025
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 several structural and configuration changes to the whole project, primarily focused on spiting the project
server,webandsharedpackages into separate@nbw/backend,@nbw/frontend,@nbw/database,@nbw/song,@nbw/thumbnail,@nbw/soundsand@nbw/config.The following diagram shows the new structure of the project:
graph TD subgraph "Applications" Backend["@nbw/backend<br/>(Backend App)"] Frontend["@nbw/frontend<br/>(Frontend App)"] end subgraph "Workspace Packages" Config["@nbw/config<br/>(Configuration)"] Database["@nbw/database<br/>(Database Entities & DTOs)"] Song["@nbw/song<br/>(Song Processing)"] Sounds["@nbw/sounds<br/>(Sound Management)"] Thumbnail["@nbw/thumbnail<br/>(Thumbnail Generation)"] end %% Workspace package dependencies Database --> Config Song --> Database Thumbnail --> Song %% Backend dependencies Backend --> Database Backend --> Song Backend --> Thumbnail Backend --> Sounds %% Frontend dependencies (through workspace) Frontend -.-> Config Frontend -.-> Database Frontend -.-> Song Frontend -.-> Thumbnail %% Styling classDef appStyle fill:#e1f5fe,stroke:#0277bd,stroke-width:2px classDef pkgStyle fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px classDef leafStyle fill:#e8f5e8,stroke:#388e3c,stroke-width:2px class Backend,Frontend appStyle class Database,Song,Thumbnail pkgStyle class Config,Sounds leafStyleBun and Testing Improvements
Refined test scripts in
package.jsonto run tests specifically onsrc/**/*.spec.tsande2e/**/*.spec.ts, improving test targeting and coverage.Added
.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdcto 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: