Refactor: Move auth-related files into com.medtrack.auth package (feature-based structure)
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
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của harness/ff-java-server-sdk
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 18/100
harness/ff-java-server-sdk#216 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 30/100
harness/ff-java-server-sdk#212 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
harness/ff-java-server-sdk#142 ·
Tất cả issue của harness/ff-java-server-sdk
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
NucleusFramework/Nucleus#1020 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 83/100
ajeetraina/awesome-docker-sbx#839 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
portfolio-performance/portfolio#6459 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
bufbuild/protovalidate-java#564 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 83/100
it-at-m/traegerportal#17 ·