This project is a Spring Boot Maven application that uses the Firebase Admin SDK to connect to Firestore.
FirebaseConfig initializes Firebase using this service account JSON file:
C:\Users\Pranjal Pal\Downloads\chat-app-1e086-firebase-adminsdk-fbsvc-7dce8e839d.json
The project uses:
com.google.firebase:firebase-admin:9.2.0
Request body:
{
"username": "alice",
"email": "alice@example.com",
"password": "secret123"
}Stores the user in Firestore collection users.
Request body:
{
"email": "alice@example.com",
"password": "secret123"
}Checks the credentials against Firestore. On success, returns the list of all users.
Returns all users from Firestore collection users.
Request body:
{
"senderId": "user-id-1",
"receiverId": "user-id-2",
"text": "Hello"
}Stores the message in Firestore collection messages.
Returns all messages sent or received by the given user.
User:id,username,email,passwordMessage:id,senderId,receiverId,text,timestamp
Requirements:
- Java 17
- Maven 3.9+
Build:
mvn clean packageRun:
mvn spring-boot:runThe API starts on http://localhost:8080.