Github
X
Hey devs π
Iβm currently working on a full-stack microservices project called QuickClinic β a modern, scalable healthcare booking platform built with Java + Spring Boot + React, using JWT, Kafka, Eureka, and Docker under the hood.
Hereβs a quick dev log of what Iβve built so far and some of the real issues I faced and solved π₯
β
Core Features Implemented So Far
π OAuth2 + JWT Authentication (login/signup via gateway + token-based access)
π§ββοΈ User Role System: Patients, Doctors, Admins (with secured routes)
π₯ Microservices Setup:
UserAuth Service (authentication + profile)
Gateway API (JWT verification + routing)
Service Registry (Spring Eureka)
π User Dashboard (React + Tailwind UI, animated hospital-themed design)
βοΈ User Operations: View, Update, Delete profile using secure endpoints
π Booking System (in progress) for appointments
π Spring Security Configuration using BCrypt + stateless sessions
βοΈ Client-side JWT Handling: Stored token, auto-injected in requests
πͺ² Bugs I Faced & Solved
- β 403 Forbidden on Login (Even Though Token Was Correct) Root Cause: DelegatingPasswordEncoder expects an encoded password with a prefix like {bcrypt}.
Fix: Added the prefix and properly encoded the stored password using PasswordEncoderFactories.
- β οΈ JWT Not Working via Gateway Issue: Gateway was rejecting JWT even though individual microservices accepted it.
Solved by: Correctly forwarding Authorization headers and applying token filter at Gateway level.
- π« React Fetch Error on /get-details Reason: Missing token in localStorage or token expiration.
Fix: Added secure token storage and toast-based error handling for 401 errors.
- π updateUserDetails Response Was Too Heavy Changed the API to return only a success message instead of full user object to reduce payload.
π‘ Lessons Learned
Stateless authentication can be tricky with Spring Security, especially across services.
Encoders matter! Prefixes like {bcrypt} arenβt optional.
JWT debugging needs both backend and frontend coordination.
You donβt need to return full objects after an update β just a clear success message does the job!
π οΈ Next Steps
Implement appointment booking module
Add Kafka messaging for logging, email, or async tasks
Dockerize each microservice and set up Docker Compose
Add admin panel, patient-doctor matching, and real-time notifications
π’ Final Thoughts
Iβm building this project not just to practice microservices, but to simulate a real production-grade system with all its complexity β and Iβm learning a ton on the way.
If you're into Spring Boot, microservices, and full-stack Java, letβs connect! I'd love to hear your feedback or collaborate π
Top comments (0)