-
Notifications
You must be signed in to change notification settings - Fork 0
[EXTRACT] UserService - Rip user operations from monolith #45
Copy link
Copy link
Open
Description
🔪 Extraction Target
Extract all user-related operations from the 19,843-line index.mjs into a focused UserService class. No backward compatibility. Direct extraction.
📁 Methods to Extract
// All of these get ripped out and moved to UserService
getUsers()
getUser()
getUserFields()
createUser()
updateUser()
deleteUser()
getSelfUser()
// ... and any other user-related methods🎯 Definition of Done
- Create
services/UserService.jsextending BaseService - Extract ALL user methods from index.mjs
- File size < 500 lines (enforced by linter)
- All existing tests pass WITHOUT modification
- Add JSDoc comments for each method
- No deprecated methods or compatibility layers
- Update all imports/references in index.mjs
- Zero regression - identical functionality
⚡ Implementation
// services/UserService.js
export class UserService extends BaseService {
async getUsers() {
// Direct copy from index.mjs - no changes
}
async getUser(userId) {
// Direct copy from index.mjs - no changes
}
// ... rest of user methods
}🚫 NOT in Scope
- Backward compatibility
- Deprecation warnings
- Proxy methods in GrocyClient
- Changing method signatures
- Adding new features
💀 Breaking Changes
Yes. Update your imports.
Related to
Parent issue: #11
Reactions are currently unavailable