Restructure the Utils Folder #212
Labels
Cleanup
Tasks for removing clutter and improving project structure.
🌱Nice-to-Have
Enhancements, Refactors, UI tweaks, or non-critical optimizations
Milestone
The utilities in the project are currently scattered and inconsistent, making them hard to
locate and maintain. This issue focuses on organizing utilities into domain-focused files and
creating a centralized export point for easier imports.
Tasks
Create domain-specific utility files:
fileUtils.ts
: File-related utilities (size conversion, extensions).dateUtils.ts
: Date formatting and manipulation functions.validators.ts
: Input and form validators.stringUtils.ts
: String manipulation helpers.Add an
index.ts
in theutils/
folder to re-export all utilities.Remove redundant or outdated utility functions.
Locate and add new utility functions used across the application (e.g., name splitting, file size formatting) to the appropriate utility files.
Update all imports across the project to use the reorganized structure.
Proposed Directory Structure
Guidelines
✅ Keep utility files small and focused on a single concern.
✅ Centralize exports to avoid deep import paths.
✅ Remove unused functions to prevent bloat.
Benefits
✅ Faster navigation through organized files.
✅ Easier to maintain and extend utilities.
✅ Cleaner imports (e.g.,
import { formatFileSize } from '@/utils';
).The text was updated successfully, but these errors were encountered: