You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+59Lines changed: 59 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,6 +65,65 @@ To use the Google Calendar import and export feature, you need to set up your ow
65
65
66
66
Note: `credentials.json` and `token.json` are excluded from version control for security reasons.
67
67
68
+
## Google Calendar Setup
69
+
70
+
StudySmart can import your existing calendar events as commitments and export your study schedule back to Google Calendar. This feature is optional — the app works fully without it.
71
+
72
+
Note: This setup only needs to be done once. After the first authentication, `token.json` is created automatically and you won't need to repeat these steps.
73
+
74
+
### Step 1 — Create a Google Cloud project
75
+
76
+
1. Go to [console.cloud.google.com](https://console.cloud.google.com) and sign in with your Google account
77
+
2. Click the project dropdown at the top left → **New Project**
78
+
3. Give it a name (`StudySmart`) → click **Create**
79
+
4. Wait a moment for the project to be created, then make sure it is selected in the dropdown at the top
80
+
81
+
### Step 2 — Enable the Google Calendar API
82
+
83
+
1. In the left sidebar go to **APIs & Services** → **Library**
84
+
2. Search for **Google Calendar API**
85
+
3. Click on it → click **Enable**
86
+
87
+
### Step 3 — Configure the OAuth consent screen
88
+
89
+
1. In the left sidebar go to **APIs & Services** → **OAuth consent screen**. On newer versions of Google Cloud Console this may appear as **Google Auth Platform** → **Audience** under project configuration
90
+
2. Choose **External** as user type → click **Create**
91
+
3. Fill in the required fields:
92
+
-**App name**: StudySmart
93
+
-**User support email**: your Gmail address
94
+
-**Developer contact email**: your Gmail address
95
+
4. Click **Save and Continue** through the **Scopes** step — no changes needed here
96
+
5. Go to **Audience** → scroll down to **Test users** → click **Add users** → add your Gmail address → click **Add**
97
+
6. Click **Save and Continue** → **Back to Dashboard**
98
+
99
+
> 💡 You must add your own Gmail as a test user — otherwise Google will block authentication with an "access denied" error even though you created the project.
100
+
101
+
### Step 4 — Create OAuth credentials
102
+
103
+
1. In the left sidebar go to **APIs & Services** → **Credentials** (use the search bar at the top if you can't find it)
4. Give it a name (e.g. `StudySmart Desktop`) → click **Create**
107
+
5. A popup will appear — click **Download JSON**
108
+
6. Rename the downloaded file to exactly `credentials.json`
109
+
7. Place `credentials.json` in the root of the StudySmart repository (the same folder as `pyproject.toml`)
110
+
111
+
### Step 5 — First time authentication
112
+
113
+
1. Run the app from the repo root:
114
+
```bash
115
+
cd path/to/StudySmart
116
+
python src/study_smart/app.py
117
+
```
118
+
2. Add your exams in the **📚 My Exams** tab
119
+
3. Go to **⏰ My Schedule** tab → click **📅 Import from Google Calendar**
120
+
4. A browser window will open asking you to sign in with Google — select your Google account
121
+
5. You will see a warning: **"Google hasn't verified this app"** — this is expected! Click **Continue** → **Go to StudySmart (unsafe)**. This warning appears because the app is in testing mode and has not gone through Google's full verification process, which is designed for apps published to the general public. For a personal locally-run study tool, testing mode is completely safe.
122
+
6. Click **Allow** to grant calendar access
123
+
7. The browser will show a success message — you can close the browser tab and return to the app
124
+
8. A `token.json` file is automatically created in the repo root — this stores your authentication so you won't need to log in again next time
0 commit comments