Skip to content

Refactor project structure and improve modularity across services#36

Merged
Skyfay merged 5 commits into
devfrom
refactor
Apr 26, 2026
Merged

Refactor project structure and improve modularity across services#36
Skyfay merged 5 commits into
devfrom
refactor

Conversation

@Skyfay
Copy link
Copy Markdown
Owner

@Skyfay Skyfay commented Apr 26, 2026

No description provided.

Skyfay added 5 commits April 26, 2026 16:14
Refactor: break up large adapter and config/restore files into focused submodules. Adapter definitions were moved from a single definitions.ts into src/lib/adapters/definitions/{shared,database,storage,notification,index}. Config and restore logic was reworked into a config/ and restore/ service surface (facade) with export/import/parse/restore-pipeline helpers and the main service now delegating to those modules. Also moved PermissionPicker into src/components/permissions/ and updated references, adjusted Vault tabs ordering/default, and updated the changelog. These changes improve modularity and maintainability while preserving the public-facing APIs.
Move many loose modules from src/lib into grouped subfolders (crypto/, logging/, auth/, rate-limit/, execution/, server/) and add index barrels to preserve compatibility. Update import paths across the codebase (~470 changes), including source files, API routes, actions, docs and tests to reference the new locations (e.g. logger -> logging/logger, errors -> logging/errors, access-control/permissions/download-tokens -> auth/, queue-manager -> execution/queue-manager, scheduler/shutdown/startup-checks/env-validation -> server/, checksum/compression/stream -> crypto/). Update documentation and changelog entries to reflect the reorganization. This is a refactor to improve code organization and navigation; public APIs remain unchanged via the new barrels.
Large refactor that groups loose files into focused subfolders and moves many services into topical namespaces (e.g. services/auth, services/backup, services/config, services/notifications, services/sso, services/storage, services/system, services/user, services/jobs). Also split config and restore services into facade-style modules (config/config-service, restore/restore-service) and updated internal imports throughout source, tests and docs (~570 import path updates). Adjusted related code, tests, and docs to point to the new paths and preserved public APIs to avoid breaking consumers. This change improves project structure and discoverability.
Move numerous modules from src/app/actions into feature subfolders (auth, backup, settings, storage, audit) and rename src/types.ts -> src/types/index.ts. Update import paths across components, pages, and tests to the new locations (e.g., encryption -> backup/encryption, user/group/api-key/oidc -> auth/*). Adjust tests: make action-file collection recursive and update mocked paths. Update changelog entry to reflect the reorganization. Public APIs remain unchanged.
Drop unused access-control alias imports and tidy backup action files. Removed the unused `checkPermission as _checkPermission` import from encryption.ts and upload.ts, deleted a 43-line developer thought-stream comment and a redundant `await getUserPermissions()` call from uploadAvatar(), and clarified that avatar upload is gated by session ownership (no new role check added).

Also updated the dead-code agent doc to reflect the current project layout (expanded globs/subdirs and explicit schema/component locations) and added a brief entry to the changelog documenting these removals. These changes clean up dead/unused code and comments without altering runtime authorization behavior.
@Skyfay Skyfay merged commit 853272a into dev Apr 26, 2026
1 check passed
@Skyfay Skyfay deleted the refactor branch April 26, 2026 15:24
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.

1 participant