-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
Description
Currently, all user-added subjects and attendance data are lost when the user closes or refreshes the application. We need to implement a persistence layer to save and retrieve this data. We will use the Google Sheets API as a free, cloud-based database to store user data in their own Google account.
✅ Acceptance Criteria
- Setup GCP: Create a Google Cloud Platform project, enable the Google Sheets API, and get OAuth 2.0 client credentials.
- Implement Google Auth: Add a Google Sign-In flow that requests the
https://www.googleapis.com/auth/spreadsheetsscope. - Sheet Creation: Programmatically create a new Google Sheet named
Bunkify Datain a user's Drive on their first login. - Develop CRUD Functions:
- Create: When a user adds a new subject, append a new row to the sheet.
- Read: On app load, fetch all rows to populate the UI.
- Update: When a user edits a subject or marks attendance, update the corresponding cell(s).
- Delete: When a user deletes a subject, delete the corresponding row.
- Integrate with Frontend: Replace all local state management with API calls to the new Google Sheets service.
💻 Tech Stack & Guidelines
- Use the official Google API client library for JavaScript (
gapi). - Ensure all data transactions are asynchronous to prevent UI blocking.
- Implement proper error handling for API failures.