- Spring Boot
- Android (Jetpack Compose)
- Kotlin
I want my Spring Boot backend to send FCM notifications when an order status changes.
Before writing code, I'd like to understand the recommended project structure.
For example:
- Where should Firebase initialization be placed?
- Should I create a dedicated NotificationService?
- Where should the service account JSON be stored?
- How should the FirebaseMessaging instance be configured?
I'm not asking how to send a notification itself—I want to understand the recommended architecture for integrating FCM into a Spring Boot project.