Skip to content

Restructure project into feature/domain/shared areas, add path aliases and UI shell components#14

Merged
DMNerd merged 4 commits into
mainfrom
codex/refactor-project-structure-by-feature-domain
May 17, 2026
Merged

Restructure project into feature/domain/shared areas, add path aliases and UI shell components#14
DMNerd merged 4 commits into
mainfrom
codex/refactor-project-structure-by-feature-domain

Conversation

@DMNerd
Copy link
Copy Markdown
Owner

@DMNerd DMNerd commented May 17, 2026

Motivation

  • Split the codebase into logical ownership boundaries (app, features, shared, domain) to improve modularity and make public feature APIs explicit.
  • Introduce scoped import aliases so new code imports feature/public APIs rather than reaching into internals.
  • Centralize shared utilities and UI primitives and extract stage/panel shell pieces to simplify App composition.

Description

  • Reorganized & renamed many files into src/features/*, src/domain/*, and src/shared/*, and added feature index entrypoints (for example @features/display, @features/instrument, @features/export, @features/practice, @features/theory, @features/fretboard, @features/share).
  • Replaced many relative/legacy imports with scoped aliases and updated runtime build resolution by adding path aliases to tsconfig.json and vite.config.js (@app/*, @features/*, @shared/*, @domain/*, @styles/*, and kept @/* as fallback).
  • Extracted UI orchestration/shell components from App into new modules: AppPanels, AppModals (in src/app/shell/AppPanels.jsx), StageShell (in src/app/shell/StageShell.jsx), and ToastProvider (in src/app/providers/ToastProvider.jsx), and updated App.jsx to use them.
  • Moved and centralized shared libs and UI primitives into src/shared/lib/* and src/shared/ui/*, moved pure domain music-theory modules into src/domain/*, and updated many store/hooks/components to use the new locations.
  • Added docs/project-structure.md documenting the new organization and import boundary rules.
  • Updated configuration and tooling entries: knip.json entry glob extended to include .{js,jsx,ts,tsx} tests, and many tests/files were relocated to mirror the new structure under src/tests/**.

Testing

  • Updated and ran the unit test suite via npm test which exercised the renamed modules and tests paths; the test suite completed successfully.
  • Performed a TypeScript check with tsc --noEmit against the updated tsconfig.json to validate path aliases and types; the typecheck completed successfully.
  • Sanity-checked the development build/resolution using the updated Vite aliases by starting a local dev server (npm run dev) and confirming the app bootstraps without missing-module errors.

Codex Task

@DMNerd DMNerd merged commit 79c6a1c into main May 17, 2026
2 checks passed
@DMNerd DMNerd deleted the codex/refactor-project-structure-by-feature-domain branch May 17, 2026 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant