Sign inSign up

gcleaves/sheet-api

By gcleaves

•Updated over 1 year ago

This project is a simple API for a Google Sheet. See https://github.com/gcleaves/sheet-api

Image
0

439

gcleaves/sheet-api repository overview

⁠Sheets API

See See https://github.com/gcleaves/sheet-api⁠

This project is a simple API for a Google Sheet. It is built upon Nest.js in the backend and Nuxt in the frontend. Configuration is stored in MySQL. Authentication is handled by Google OAUTH2.

Write commands are queued in Redis and executed sequentially to avoid rate limit issues. Therefore this service is not suitable for high volume use with realtime read consistency. In other words, a write command will not be reflected in the read command until the write command is executed, which may take a few seconds.

⁠Setup

  1. Clone this repo.
  2. Set up a Google Cloud project⁠. Set user type to Internal in OAuth consent screen if you want to restrict access to a specific domain.
  3. Create a Google service account⁠ and download the JSON file.
  4. Leave the JSON file in the root of the repo so that the docker-compose.yml file can copy it into the backend container.
  5. Edit the .env file with your MySQL credentials and Google Cloud project credentials and other settings.
  6. Run docker compose up -d to start the service, which will automatically build the container and start MySQL and Redis.

⁠Usage

  1. Visit the frontend at http://localhost:3000.
  2. Log in with your Google account. Add a new sheet.
  3. Give it a descriptive name.
  4. Enter the exact sheet id. You can find it in the url of the Google Sheet: httpw://docs.google.com/spreadsheets/d/1OIoMOgtddeREFeDenx2b2BQnIsLeHa6yQm37eBhQEX8/edit?gid=0#gid=0
  5. Share the Google Sheet with the email address of your service account.
  6. Recommended: enter a random string to protect read access.
  7. Recommended: enter a random string to protect write access.
  8. Click "Submit".

⁠API

See https://localhost:3000/app/docs⁠

Tag summary

Content type

Image

Digest

sha256:2f8a48676…

Size

93.8 MB

Last updated

over 1 year ago

docker pull gcleaves/sheet-api