Refactor: Move auth-related files into com.medtrack.auth package (feature-based structure)

Offen
#215 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
25/100
Issue-Typ
Refactoring
Klarheit
Größtenteils klar
Aktivitätsstatus
Ruhig
Tech-Stack
java, spring-boot

Rechercherichtung

The issue lists nine auth files to move into a com.medtrack.auth package: UserController, UserService, User, UserRepository, LoginRequest, AuthResponse, JwtUtil, JwtAuthFilter and SecurityConfig. It also names HospitalService and DataInitializer as importers to update. Done means the project builds with mvn clean install and the register and login endpoints still respond. The issue describes a MedTrack backend that does not match this repository, so confirm the target code exists before starting.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Currently all backend files are organized layer-wise (controller/, service/, model/, repository/, etc.), mixing all members' code together in the same top-level packages.
This PR moves all Member 1 (Auth & Security) files into a dedicated auth package with its own internal layer structure, for better modularity:
com.medtrack.auth/
├── controller/ → UserController.java
├── service/ → UserService.java
├── model/ → User.java
├── repository/ → UserRepository.java
├── dto/ → LoginRequest.java, AuthResponse.java
├── security/ → JwtUtil.java, JwtAuthFilter.java
└── config/ → SecurityConfig.java
Changes made:

Moved 9 files from com.medtrack.{model,repository,dto,service,controller,security,config} → com.medtrack.auth.*
Updated package declarations in all moved files
Updated internal imports within the auth package
Fixed external imports in files that reference User.java / UserRepository.java / JwtUtil.java / JwtAuthFilter.java / SecurityConfig.java:

HospitalService.java — import com.medtrack.model.User; → import com.medtrack.auth.model.User;
DataInitializer.java — same User import updated

No functional/logic changes — this is a pure package reorganization. No API endpoints, URLs, or request/response formats are affected.
Frontend impact: None. All @RequestMapping / @PostMapping URL paths remain unchanged (/api/user/register, /api/user/login), so AuthService.js and HttpService.js require no changes.
Verification:

Project builds clean (mvn clean install)
All existing endpoints tested (register, login)
No broken imports across other members' files

Note for team: If anyone is currently working on a branch that imports com.medtrack.model.User or other moved classes, please pull latest and update your imports to com.medtrack.auth.* accordingly before merging your own PR, to avoid conflicts.

Vorherrschende Sprache
Java
Sterne
6
Forks
22
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus harness/ff-java-server-sdk

Alle Issues in harness/ff-java-server-sdk

Ähnliche Issues

Weitere Issues zu Java

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.