Refactor: Reorganize project structure and consolidate server operations#75
Merged
cybervoid0 merged 7 commits intomasterfrom Sep 14, 2025
Merged
Refactor: Reorganize project structure and consolidate server operations#75cybervoid0 merged 7 commits intomasterfrom
cybervoid0 merged 7 commits intomasterfrom
Conversation
- Removed obsolete API routes and services related to inaccuracy reports. - Integrated new report fetching logic using async functions and Zod for validation. - Updated the ReportList component to utilize the new report fetching method and improved pagination handling. - Refactored the InaccuracyReport component to enhance form handling with Zod and improved UI components. - Cleaned up imports and improved overall code organization across several files.
- Removed the export of InaccuracyReportListDTO from api.ts to streamline type definitions and improve code organization.
- Removed unnecessary previewFeatures line from the Prisma schema generator for cleaner configuration.
- Moved image-related functions from services/fetch to lib/images/actions for better structure and maintainability. - Updated imports across various components to reflect the new location of image handling functions. - Removed obsolete API routes and types related to image uploads to streamline the codebase.
- Moved various queries and actions from the lib directory to the server directory for improved organization and clarity. - Updated import paths across multiple components to reflect the new structure. - Removed obsolete files related to barometers, brands, categories, conditions, and reports to streamline the codebase.
- Removed the obsolete deleteImagesFromStorage function and replaced it with a direct call to deleteImages for improved clarity and maintainability. - Updated the image fetching logic in deleteBarometer to select only the necessary URL field, enhancing performance and reducing data overhead.
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.
Refactor: Reorganize project structure and consolidate server operations
What
Major refactoring to improve project structure and organization:
lib/toserver/- Better reflects server-side nature of database operationsserver/directory/api/v2/reportand/api/v2/upload/imagesin favor of Server ActionsdriverAdapterspreview featureWhy
Ticket
Refactoring and code organization improvements
Files changed: 78 files with 670 additions and 933 deletions (net -263 lines)