Skip to content

Commit

Permalink
migrate scriptkit to its own repo
Browse files Browse the repository at this point in the history
  • Loading branch information
joelhooks committed Nov 29, 2023
0 parents commit 20c8aab
Show file tree
Hide file tree
Showing 1,215 changed files with 134,064 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
10 changes: 10 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
10 changes: 10 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
root: true,
// This tells ESLint to load the config from the package `eslint-config-custom`
extends: ['skill-recordings'],
settings: {
next: {
rootDir: ['apps/*/'],
},
},
}
26 changes: 26 additions & 0 deletions .github/label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
analytics:
- packages/analytics/*
- packages/analytics/**/*

utils:
- packages/auth/*
- packages/auth/**/*

admin:
- packages/core/*
- packages/core/**/*

users:
- packages/type/*
- packages/type/**/*

starter:
- apps/next-product-starter/*
- packages/next-product-starter/**/*

cypress:
- cypress/*
- cypress/**/*

repo:
- ./*
40 changes: 40 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Lint and Test
on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
test:
name: Lint and Test
runs-on: ubuntu-latest

env: # Leverage Turborepo Remote Caching
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
DATABASE_URL: ${{ secrets.DATABASE_URL }}
PRISMA_SKIP_POSTINSTALL_GENERATE: false # We do this manually for architecture reasons

steps:
- name: Checkout Repo
uses: actions/checkout@v3

- name: PNPM Setup
uses: pnpm/[email protected]
with:
version: 8.7.0
run_install: false

- name: Node Setup
uses: actions/setup-node@v3
with:
node-version: 18.16.0
cache: 'pnpm'

- name: Install dependencies
run: pnpm install

- name: Test & Lint
run: pnpm -- turbo run test lint
44 changes: 44 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Release

on:
push:
branches:
- main

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2

- name: Setup pnpm 8
uses: pnpm/action-setup@v2
with:
version: 8

- name: Setup Node.js 18.x
uses: actions/setup-node@v2
with:
node-version: 18.x

- name: Install Dependencies
run: pnpm i

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Send a Slack notification if a publish happens
if: steps.changesets.outputs.published == 'true'
# You can do something when a publish happens.
run: my-slack-bot send-notification --message "A new version of ${GITHUB_REPOSITORY} was published!"
19 changes: 19 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.turbo
node_modules
dist
.idea
.vercel
.pnpm-debug.log
.DS_Store
tsconfig.tsbuildinfo
.env

# build artifacts
apps/*/public/sitemap.xml
apps/*/public/sitemap-[0-99].xml
apps/*/public/robots.txt

# test results
apps/*/test-results

.eslintcache
23 changes: 23 additions & 0 deletions .graphqlconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "Testing Accessibility GraphQL Schema",
"projects": {
"testingaccessibility": {
"documents": [
"/apps/testingaccessibility/queries/**"
],
"extensions": {
"endpoints": {
"Hasura GraphQL Endpoint": {
"url": "http://localhost:8080/v1/graphql",
"headers": {
"user-agent": "JS GraphQL",
"x-hasura-role": "admin",
"x-hasura-admin-secret": "admin_secret"
},
"introspect": false
}
}
}
}
}
}
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

pnpm run pre-commit
11 changes: 11 additions & 0 deletions .kodiak.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# version is the only required field
version = 1

# the following settings can be omitted since they have defaults

[merge]
require_automerge_label = false
blacklist_labels = ["NO MERGE", "wip", "rfc"] # default: []
method = "rebase" # default: "merge", options: "merge", "squash", "rebase"
delete_branch_on_merge = true # default: false

1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18.16.0
3 changes: 3 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
strict-peer-dependencies=false
public-hoist-pattern[]=*prisma*
public-hoist-pattern[]=*playwright*
3 changes: 3 additions & 0 deletions .pscale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
org: skill-recordings
database: testing-accessibility
branch: gd-test
11 changes: 11 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
All Rights Reserved

Copyright (c) 2021-2022 Skill Recordings Inc.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
107 changes: 107 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# Skill Recordings Projects

This is an exploratory project using Turborepo and pnpm to create a monorepo working environment for multiple applications and a shared common core library (or set of libraries.

## Get Started

You'll need [PNPM](https://twitter.com/pnpmjs) installed.

pnpm is used here based on [significant performance gains](https://twitter.com/jaredpalmer/status/1422574985323950083?s=20) reported by Jared Palmer from a customer.

install pnpm:

```bash
npm i pnpm@latest -g
```

Install all dependencies (all apps and packages) and build all apps and packages

```bash
pnpm install
pnpm build
```

This will build (and cache) the library packages and applications.

You can start an app or package for development:

```bash
cd apps/{{appname}} && pnpm dev
```

```bash
cd packages/{{packagename}} && pnpm dev
```

## Adding a Project to Vercel

The build command needs to be scoped to the specific project so we aren't building all of the repos for every single run. The `-w` flag runs ppm in the root of the project so all projects are built.

`build`:

The entire repo, all apps and dependencies

```bash
pnpm -w build
```

A single app/package can be filtered (from the root of the repo)

```bash
pnpm -- turbo run build --filter="testingaccessibility"
```

The install command needs to also add `pnpm` and then run install.

`install`:

```bash
npm i pnpm -g && pnpm i
```

## Develop locally using vercel

Because of the way vercel handles monorepo projects, you can only have a single
project linked locally at a given time.

In the root of the project:

```bash
vercel link
vercel dev
```

Calling `vercel link` asks if you want to link the project (yes), has you pick the account (`skillrecordings`), and
finally you enter the project name for the project you are working on.

Repeat this process if you want to work on a different project.

## Tools Used

### Turborepo

> abstracting the complex configuration needed for most monorepos into a single cohesive build system
Turbo is the core of the developer experience that this playground is exploring and provides cohesive logical building of a monorepo that contains many apps and library packages.

It's a closed source paid product that we are excited to use and support.

### pnpm

> Fast, disk space efficient package manager
performant npm is just what it says it is and a modern evolution of npm/yarn etc that follows the same conventions and gives efficiency in a monorepo environment and can shave a lot of time off of builds.

### cypress

for integration and e2e testing!

## Resources

Here's a general tour of Turborepo from Jared:

[![Jared Palmer gives Joel a tour of Turborepo - Watch Video](https://cdn.loom.com/sessions/thumbnails/6be074dc590d44b192ab7e126f04c36b-with-play.gif)](https://www.loom.com/embed/6be074dc590d44b192ab7e126f04c36b)

Some good examples and background in [Jared's TSDX monorepo platground](https://github.com/jaredpalmer/tsdx-monorepo).

[![vercel logo](https://raw.githubusercontent.com/skillrecordings/turbo-playground/6d8af460a9630edea33cbbeef2a2309189f95a64/1618983297-powered-by-vercel.svg)](https://www.vercel.com/?utm_source=[skillrecordings]&utm_campaign=oss)
1 change: 1 addition & 0 deletions apps/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/skill-template
39 changes: 39 additions & 0 deletions apps/scriptkit/.env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
## 🛠️ DEVELOPMENT 🛠️ ##

# General Metadata
NEXT_PUBLIC_APP_NAME=scriptkit
NEXT_PUBLIC_SITE_TITLE="ScriptKit"
NEXT_PUBLIC_HOST=localhost
NEXTAUTH_URL=http://localhost:3035
NEXT_PUBLIC_URL=http://localhost:3035
NEXT_PUBLIC_SUPPORT_EMAIL=[email protected]
NEXT_PUBLIC_PARTNER_FIRST_NAME=John
NEXT_PUBLIC_PARTNER_LAST_NAME=Lindquist
NEXT_PUBLIC_PARTNER_TWITTER=twitterHandle
NEXT_PUBLIC_SEO_KEYWORDS="automation,scripting,scriptkit,script kit,scriptkit.com,script kit.com,scripting,scripting language,scripting languages,scripting language for developers,scripting lang"
NEXT_PUBLIC_PRODUCT_DESCRIPTION="ScriptKit is a scripting environment for developers. It's a way to automate your work and make your computer do things for you."

# App Features
LOG_VERIFICATION_URL=true
SKIP_EMAIL=true
SKIP_CK_TAGGING=true

# Google Analytics
NEXT_PUBLIC_GOOGLE_ANALYTICS=CHANGE_ME

# Transactional Email
EMAIL_SERVER_HOST=smtp.postmarkapp.com
EMAIL_SERVER_PORT=587

# ConvertKit Newsletter Form
NEXT_PUBLIC_CONVERTKIT_SIGNUP_FORM=5139233
NEXT_PUBLIC_CONVERTKIT_TOKEN=K_2k25ibJVKtBEG7n4_SrQ
NEXT_PUBLIC_CONVERTKIT_SUBSCRIBER_KEY=ck_subscriber_id
NEXT_PUBLIC_CONVERTKIT_ANSWER_URL=/api/skill/answer/convertkit
NEXT_PUBLIC_CONVERTKIT_SUBSCRIBE_URL=/api/skill/subscribe/convertkit
NEXT_PUBLIC_CONVERTKIT_GET_SUBSCRIBER_URL=/api/skill/subscriber/convertkit

# Sanity
NEXT_PUBLIC_SANITY_API_VERSION=2023-01-03
NEXT_PUBLIC_SANITY_PROJECT_ID=rgjexias
NEXT_PUBLIC_SANITY_DATASET_ID=production
Loading

0 comments on commit 20c8aab

Please sign in to comment.