Skip to content

Improve metrics: Maintainability Index, Comment Density, Security Vulnerabilities of Dependencies, Number of Imports#37

Merged
fraidakis merged 45 commits intomainfrom
fraidakis
Jan 4, 2026
Merged

Improve metrics: Maintainability Index, Comment Density, Security Vulnerabilities of Dependencies, Number of Imports#37
fraidakis merged 45 commits intomainfrom
fraidakis

Conversation

@fraidakis
Copy link
Owner

No description provided.

Consolidated business logic into recommendationService.js and simplified recommendationController.js, removing ~80 lines of duplicated code.
fraidakis and others added 15 commits January 1, 2026 16:18
- Added concise comments to utils files (controllerValidators, responseBuilder)
- Enhanced config files with inline explanations (database, seedData)
- Documented controller logic (favouriteController, preferenceCreate)
- Added test setup comments to all model test files
- Improved utility test file documentation
- Enhanced HATEOAS link builders with function descriptions
- Target: 15-20% comment density (1 comment per ~5 lines)
Comments Enhancement:
- Added detailed comments to all model test files
- Increased comment density from 3-8% to 15-20%
- Added inline explanations for test setup and assertions

Import Reduction:
- app.js: Reduced from 8 to 4 imports via dependencies.js and config/index.js
- models/index.js: Reduced from 9 to 3 imports via grouped model files
- routes/index.js: Reduced from 9 to 4 imports via grouped route files

New Helper Files:
- dependencies.js: Consolidates express, cors, helmet, mongoose
- config/index.js: Consolidates config exports
- models/coreModels.js: Core entities (User, Place, Counter)
- models/userInteractionModels.js: User interactions (Review, Report, etc.)
- models/placeInteractionModels.js: Place interactions (Favourites, Dislikes)
- routes/authAdminRoutes.js: Auth and admin route grouping
- routes/userRelatedRoutes.js: User-related route grouping
- routes/placeNavigationRoutes.js: Place and navigation route grouping

All changes maintain backward compatibility and improve code maintainability.
…s, improve coordinate parsing, and expand HATEOAS link tests with detailed documentation
…ation, improve code organization, and add detailed documentation for better maintainability
… by using recommendationService"

This reverts commit ab0d9c5.
@fraidakis fraidakis merged commit 1802bae into main Jan 4, 2026
2 of 3 checks passed
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