Develop a real-time vocabulary quiz app using a full-stack Google strategy, leveraging Flutter for the frontend and Google Cloud Platform (Cloud Run, Firestore, and Firebase Authentication) for the backend to support real-time score updates and leaderboards.
-
Frontend:
- Flutter Application: Runs on iOS, Android, Desktop, and Web. Communicates with the backend through HTTPS and WebSocket.
-
Backends:
- Node.js Server: Hosted on Google Cloud Run. Manages API requests, WebSocket connections, and business logic.
- Firestore: Stores quiz data, user scores, and leaderboard information.
- Firebase Authentication: Manages user authentication.
-
GCP Components:
- Cloud Run: Deploys and scales the Node.js server.
- Firestore: Serves as the NoSQL database.
- Firebase Authentication: Provides secure user authentication.
-
Data Flow:
- User joins a quiz using a unique quiz ID.
- User submits answers via WebSocket.
- Backend calculates the score and updates Firestore.
- Real-time leaderboard updates are sent to all participants via WebSocket.
-
Frontend:
- Cross-platform UI.
- Handles user interactions, displays questions, and shows the leaderboard.
-
Backends:
- Controllers: Handle API requests and WebSocket connections.
- Services: Contains business logic (e.g., calculating scores, updating Firestore).
- Routes: Defines API endpoints.
-
GCP Components:
- Cloud Run: Executes the backend server in a containerized environment.
- Firestore: Stores data in a scalable NoSQL database.
- Firebase Authentication: Secures user authentication.
- Frontend: Flutter
- Backend: Node.js, Express, Socket.IO
- Database: Firestore
- Authentication: Firebase Authentication
- GCP Services: Cloud Run, Firestore, Firebase Authentication