Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Made it follow create-t3-turbo #96

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
# This file will be committed to version control, so make sure not to have any secrets in it.
# If you are cloning this repo, create a copy of this file named `.env` and populate it with your secrets.

# We use dotenv to load Prisma from Next.js' .env file
# @see https://www.prisma.io/docs/reference/database-reference/connection-urls
DATABASE_URL=file:./db.sqlite
# The database URL is used to connect to your PlanetScale database.
DB_HOST=aws.connect.psdb.cloud
DB_NAME=YOUR_DB_NAME
DB_USERNAME=
DB_PASSWORD=pscale_pw_

# CLERK is used for authentication and authorization in the app
# @see https://dashboard.clerk.dev for your Clerk API keys
Expand Down
15 changes: 0 additions & 15 deletions .eslintrc.cjs

This file was deleted.

13 changes: 13 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:base"],
"packageRules": [
{
"matchPackagePatterns": ["^@acme/"],
"enabled": false
}
],
"updateInternalDeps": true,
"rangeStrategy": "bump",
"automerge": true
}
83 changes: 40 additions & 43 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,58 +5,55 @@ on:
branches: ["*"]
push:
branches: ["main"]
merge_group:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}

# You can leverage Vercel Remote Caching with Turbo to speed up your builds
# @link https://turborepo.org/docs/core-concepts/remote-caching#remote-caching-on-vercel-builds
env:
FORCE_COLOR: 3
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: ${{secrets.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY}}
CLERK_SECRET_KEY: ${{secrets.CLERK_SECRET_KEY}}


jobs:
build-lint:
env:
DATABASE_URL: file:./db.sqlite
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup
uses: ./tooling/github/setup

- name: Copy env
shell: bash
run: cp .env.example .env

- name: Lint
run: pnpm lint && pnpm lint:ws

format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup
uses: ./tooling/github/setup

- name: Format
run: pnpm format

typecheck:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Setup pnpm
uses: pnpm/[email protected]

- name: Setup Node 18
uses: actions/setup-node@v3
with:
node-version: 18

- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install deps (with cache)
run: pnpm install

- name: Next.js cache
uses: actions/cache@v3
with:
path: ${{ github.workspace }}apps/nextjs/.next/cache
key: ${{ runner.os }}-${{ runner.node }}-${{ hashFiles('**/pnpm-lock.yaml') }}-nextjs

- name: Build, lint and type-check
run: pnpm turbo build lint type-check

- name: Check workspaces
run: pnpm manypkg check
- uses: actions/checkout@v4

- name: Setup
uses: ./tooling/github/setup

- name: Typecheck
run: pnpm typecheck
11 changes: 7 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,20 @@ node_modules
# testing
coverage

# database
prisma/db.sqlite
prisma/db.sqlite-journal

# next.js
.next/
out/
next-env.d.ts

# nitro
.nitro/
.output/

# expo
.expo/
dist/
expo-env.d.ts
apps/expo/.gitignore

# production
build
Expand Down
7 changes: 0 additions & 7 deletions .npmrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,4 @@
# The symbolic links of pnpm break the rules of Expo monorepos.
# @link https://docs.expo.dev/guides/monorepos/#common-issues
node-linker=hoisted

# In order to cache Prisma correctly
public-hoist-pattern[]=*prisma*

# FIXME: @prisma/client is required by the @acme/auth,
# but we don't want it installed there since it's already
# installed in the @acme/db package
strict-peer-dependencies=false
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20.10
12 changes: 0 additions & 12 deletions .prettierrc.cjs

This file was deleted.

7 changes: 4 additions & 3 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"recommendations": [
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint",
"bradlc.vscode-tailwindcss",
"Prisma.prisma"
"expo.vscode-expo-tools",
"esbenp.prettier-vscode",
"yoavbls.pretty-ts-errors",
"bradlc.vscode-tailwindcss"
]
}
13 changes: 13 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Next.js",
"type": "node-terminal",
"request": "launch",
"command": "pnpm dev",
"cwd": "${workspaceFolder}/apps/nextjs/",
"skipFiles": ["<node_internals>/**"]
}
]
}
12 changes: 5 additions & 7 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"eslint.rules.customizations": [{ "rule": "*", "severity": "warn" }],
"typescript.tsdk": "node_modules/typescript/lib"
"eslint.workingDirectories": [
{
"mode": "auto"
}
]
}
Loading