Skip to content

Commit

Permalink
Add Google Search Console integration (#164)
Browse files Browse the repository at this point in the history
* Add Google search query report

* Show google search query stuff only when needed

* Update backend dependencies

* Update frontend dependencies

* Update env var stuff

* Fix tests

* Update index.tsx

* Handle revoked and expired tokens
  • Loading branch information
th0th committed Mar 18, 2023
1 parent e183483 commit 489e597
Show file tree
Hide file tree
Showing 79 changed files with 1,860 additions and 648 deletions.
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ CLICKHOUSE_USER=poeticmetric
# DOCKER COMPOSE
#COMPOSE_PROJECT_NAME=poeticmetric-development

# GOOGLE
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=

# MAILPIT
MAILPIT_BASE_URL=https://mailpit.dev.poeticmetric.com

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ jobs:
with:
build-args: |
BASE_URL=${{ vars.FRONTEND_BASE_URL }}
GOOGLE_CLIENT_ID=${{ vars.GOOGLE_CLIENT_ID }}
HOSTED=true
NODE_RED_BASE_URL=${{ secrets.NODE_RED_BASE_URL }}
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: 19.7.0
node-version: 19.8.1

# TODO: Delete this step when https://github.com/reviewdog/action-eslint/issues/152 is resolved.
- name: Install custom npm version
Expand Down Expand Up @@ -118,7 +118,7 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: 19.7.0
node-version: 19.8.1

- id: restore-npm-cache
name: Restore npm cache
Expand All @@ -144,6 +144,7 @@ jobs:
- env:
DEBUG: ${{ vars.DEBUG }}
FRONTEND_BASE_URL: ${{ vars.FRONTEND_BASE_URL }}
GOOGLE_CLIENT_ID: ${{ vars.GOOGLE_CLIENT_ID }}
REST_API_BASE_URL: ${{ vars.REST_API_BASE_URL }}
STRIPE_PUBLISHABLE_KEY: ${{ secrets.STRIPE_PUBLISHABLE_KEY }}
STRIPE_SECRET_KEY: ${{ secrets.STRIPE_SECRET_KEY }}
Expand Down Expand Up @@ -182,6 +183,7 @@ jobs:
- env:
DEBUG: ${{ vars.DEBUG }}
FRONTEND_BASE_URL: ${{ vars.FRONTEND_BASE_URL }}
GOOGLE_CLIENT_ID: ${{ vars.GOOGLE_CLIENT_ID }}
REST_API_BASE_URL: ${{ vars.REST_API_BASE_URL }}
STRIPE_PUBLISHABLE_KEY: ${{ secrets.STRIPE_PUBLISHABLE_KEY }}
STRIPE_SECRET_KEY: ${{ secrets.STRIPE_SECRET_KEY }}
Expand Down
33 changes: 23 additions & 10 deletions backend/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ go 1.20

require (
github.com/RussellLuo/validating/v3 v3.0.0-beta.1
github.com/brianvoe/gofakeit/v6 v6.20.1
github.com/bsm/redislock v0.9.0
github.com/brianvoe/gofakeit/v6 v6.20.2
github.com/bsm/redislock v0.9.1
github.com/dchest/uniuri v1.2.0
github.com/getsentry/sentry-go v0.18.0
github.com/getsentry/sentry-go v0.19.0
github.com/go-errors/errors v1.4.2
github.com/gocarina/gocsv v0.0.0-20230226133904-70c27cb2918a
github.com/gofiber/contrib/fibersentry v1.0.2
Expand All @@ -20,16 +20,20 @@ require (
github.com/redis/go-redis/v9 v9.0.2
github.com/robfig/cron/v3 v3.0.1
github.com/stretchr/testify v1.8.2
github.com/stripe/stripe-go/v74 v74.9.0
github.com/stripe/stripe-go/v74 v74.11.0
github.com/tdewolff/minify/v2 v2.12.4
golang.org/x/crypto v0.6.0
golang.org/x/crypto v0.7.0
golang.org/x/oauth2 v0.6.0
golang.org/x/sync v0.1.0
google.golang.org/api v0.113.0
gorm.io/driver/clickhouse v0.5.0
gorm.io/driver/postgres v1.4.8
gorm.io/gorm v1.24.5
gorm.io/driver/postgres v1.5.0
gorm.io/gorm v1.24.7-0.20230306060331-85eaf9eeda11
)

require (
cloud.google.com/go/compute v1.18.0 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
github.com/ClickHouse/ch-go v0.51.2 // indirect
github.com/ClickHouse/clickhouse-go/v2 v2.6.0 // indirect
github.com/andybalholm/brotli v1.0.4 // indirect
Expand All @@ -38,6 +42,10 @@ require (
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/go-faster/city v1.0.1 // indirect
github.com/go-faster/errors v0.6.1 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect
github.com/googleapis/gax-go/v2 v2.7.1 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
Expand All @@ -60,17 +68,22 @@ require (
github.com/savsgio/gotils v0.0.0-20220530130905-52f3993e8d6d // indirect
github.com/segmentio/asm v1.2.0 // indirect
github.com/shopspring/decimal v1.3.1 // indirect
github.com/stretchr/objx v0.5.0 // indirect
github.com/tdewolff/parse/v2 v2.6.4 // indirect
github.com/tinylib/msgp v1.1.6 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasthttp v1.44.0 // indirect
github.com/valyala/tcplisten v1.0.0 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/otel v1.11.2 // indirect
go.opentelemetry.io/otel/trace v1.11.2 // indirect
go.uber.org/atomic v1.10.0 // indirect
golang.org/x/exp v0.0.0-20220314205449-43aec2f8a4e7 // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/text v0.7.0 // indirect
golang.org/x/net v0.8.0 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 // indirect
google.golang.org/grpc v1.53.0 // indirect
google.golang.org/protobuf v1.29.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 489e597

Please sign in to comment.