This project is a Chrome extension that allows users to track job applications and save them to a Google Spreadsheet. This README provides a step-by-step guide to set up the Google Cloud project and the folder structure for the extension.
- Prerequisites
- Folder Structure
- Google Cloud Setup
- Building the Extension
- Loading the Extension in Chrome
- A Google account to access Google Cloud Console.
- New Google Spreadsheet.
- A Chrome Browser :)
The folder structure for the extension is as follows:
job-hunt/
├── manifest.json # Chrome extension manifest file
├── popup.html # HTML file for the popup
├── popup.js # JavaScript file for popup logic
├── background.js # Background script for handling requests
├── styles.css # CSS file for styling the popup
├── icons
|----icon16.png # Icon for the extension
|----icon48.png # Icon for the extension
|----icon128.png # Icon for the extension
└── README.md # This README file
Follow these steps to set up your Google Cloud project:
-
Create a New Project:
- Go to the Google Cloud Console.
- Click on the project dropdown in the top menu and select "New Project".
- Enter a project name (e.g., "Job Application Tracker") and click "Create".
-
Enable the Google Sheets API:
- In the Google Cloud Console, navigate to
APIs & Services
>Library
. - Search for "Google Sheets API" and click on it.
- Click the "Enable" button.
- In the Google Cloud Console, navigate to
-
Create OAuth 2.0 Credentials:
- Navigate to
APIs & Services
>Credentials
. - Click on "Create Credentials" and select "OAuth client ID".
- If prompted, configure the consent screen:
- Select "External" and click "Create".
- Fill in the required fields (app name, user support email, etc.) and save.
- After configuring the consent screen, continue creating the OAuth client ID:
- Select "Chrome App" as the application type.
- Enter your extension's ID (you can leave it blank for now).
- Click "Create".
- Copy the generated client ID and paste it into the
.env
file in the format:CLIENT_ID=YOUR_CLIENT_ID.apps.googleusercontent.com
- Navigate to
-
Set Authorized JavaScript Origins:
- In the OAuth 2.0 Client ID settings, add the following URI to the "Authorized JavaScript origins":
chrome-extension://YOUR_EXTENSION_ID
- Replace
YOUR_EXTENSION_ID
with the actual ID of your extension (you can find this after loading the extension in Chrome).
- In the OAuth 2.0 Client ID settings, add the following URI to the "Authorized JavaScript origins":
-
Add Scopes:
- Make sure to include the necessary scopes in your
manifest.json
:"scopes": [ "https://www.googleapis.com/auth/spreadsheets" ]
- Make sure to include the necessary scopes in your
Make sure to replace your CLIENT_ID in manifest.json
- Open Chrome and go to
chrome://extensions/
. - Enable "Developer mode" in the top right corner.
- Click on "Load unpacked" and select your project directory (
job-hunt
). - Once load, copy your extension-id from chrome://extensions to google cloud console's client id.
- Your extension should now be loaded and ready to use!
This project is licensed under the MIT License. See the LICENSE file for details.