This content originally appeared on DEV Community and was authored by Debugger Sensei
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
This content originally appeared on DEV Community and was authored by Debugger Sensei