Giter VIP home page Giter VIP logo

glue-tackle's Introduction

Tackle

Tackle is an opinionated task management app, which helps Jay tackle all the stuff he has to do, elegantly and efficiently.

Initial setup

  • import this repo to clone it (click on the + sign at the top right side of the page)
  • duplicate .env.glue and rename to .env

Add glue remote

git remote add glue https://github.com/jay-joo-code/glue-root.git
git fetch --all
git switch -c glue-master glue/master

Scripts

Pushing specific commits to Glue root

$ git checkout glue-master
$ git cherry-pick <commit-hash>
$ git push

Setting upstream to glue/master

$ git branch -u glue/master

Push to glue/master

git push glue glue-master:master

Integrations

Database

  1. Create a new Prisma Data Platform project
  2. Follow the steps to create a new project.
  3. Copy paste the connection strings:
  • DATABASE_URL=postgres://...?connection_limit=10&connect_timeout=30&pool_timeout=30&socket_timeout=30
  • DATABASE_URL_PROD=prisma://...

Google auth

  1. Go to Google Cloud Console
  2. Create a new project
  3. Configure OAuth Consent Screen
  • no scopes necessary for basic authentication
  1. Create an OAuth Client ID https://console.cloud.google.com/apis/credentials

Google Analytics

  • Glue components track usage by default (button click, input focus, debounced input value, etc)
  • Setting the NEXT_PUBLIC_GA_IDenv variable is required (usage tracking is enforced for Glue apps)
  • If GA reports don't show up, give it 2 days. It takes time for the usage report data to show up.

Error tracking (Sentry)

  1. Create a new Sentry project 2. Create a new project under Jay Joo Org (do not create a new org or Sentry account) 3. Select Next.js 4. Select alert me on every issue for Issue Alerts 5. Select all for Performance Alerts 6. Update project name 7. Add NEXT_PUBLIC_SENTRY_DSN to env variable (only required in production)

Notes

  • Errors will only be sent to Sentry if env variable BUILD_ENV is set to production
  • I should not create a new Sentry account or org, because the [email protected] Vercel account won't be able to integrate with a different Sentry account or org
  • I also can't create multiple Vercel accounts to bypass this issue, because their phone number verification only allows for 1 account per phone number
  • I could bypassing it by creating a new Github account and sign up a new Vercel account with that Github account, but honestly it's way too much work

Deployment (Vercel)

  1. Make sure I have a Sentry project set up
  2. Create a new Vercel account with the project email
    1. Creating a new project in the same account leads to a sentry integration bug.
  3. Create a new Vercel project
    1. Make sure to add all environment variables
    2. DATABASE_URL_PROD should be saved as DATABASE_URL. All other env vars have the same name as the local env vars.
    3. Add ?schema=public&connection_limit=1 at the end of the DATABASE_URL env variable to prevent the too many database connections error.
    4. Add &schema=public&connection_limit=1 instead if it's not the first url query.
  4. Vercel project > Settings > Integrations > Browse Marketplace > Add Sentry integration (follow through the steps in the popup window)
  5. Check that Sentry env variables were automatically added.
  6. Redeploy (build should succeed)
  7. (If you haven't yet) Add Vercel production endpoint to OAuth providers' redirect URLs.

Notes

Better Uptime (preventing cold starts)

  • a limitation of serverless functions is that they are super slow if the function hasn't been used in a while. this is known as a cold start
  • too keep the load speeds of important pages low, we need to keep the lambda functions for those pages "warm"
  • Better Uptime is used to periodically ping the page to keep the corresponding lambda function warm
  1. Create a Better Uptime account with the project email
  2. Add the pages that are important to the web app, such as frequently visited pages or conversion pages

glue-tackle's People

Contributors

jay-joo-code avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.