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

Đang mở
#215 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
25/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
java, spring-boot
Lĩnh vực
authentication, backend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Java
Star
6
Fork
22
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của harness/ff-java-server-sdk

Tất cả issue của harness/ff-java-server-sdk

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.