Skip to content

Commit

Permalink
Merge pull request #1 from ErickCReis/app-router
Browse files Browse the repository at this point in the history
feat:wip: Migração app router
  • Loading branch information
ErickCReis authored Apr 29, 2024
2 parents 1511146 + 29029ae commit 6c8b059
Show file tree
Hide file tree
Showing 172 changed files with 10,454 additions and 11,964 deletions.
20 changes: 8 additions & 12 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,17 @@
# 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

# @see https://next-auth.js.org/configuration/options#nextauth_url
NEXTAUTH_URL=http://localhost:3000
# 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_'

# You can generate the secret via 'openssl rand -base64 32' on Unix
# @see https://next-auth.js.org/configuration/options#secret
NEXTAUTH_SECRET=supersecret
AUTH_SECRET='supersecret'

# Preconfigured Discord OAuth provider, works out-of-the-box
# @see https://next-auth.js.org/providers/discord
DISCORD_CLIENT_ID=
DISCORD_CLIENT_SECRET=

PLANETSCALE_SERVELESS_USERNAME=
PLANETSCALE_SERVELESS_PASSWORD=
AUTH_DISCORD_ID=''
AUTH_DISCORD_SECRET=''
50 changes: 0 additions & 50 deletions .eslintrc.js

This file was deleted.

84 changes: 40 additions & 44 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,57 +5,53 @@ on:
branches: ["*"]
push:
branches: ["main"]
merge_group:

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

# 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_TEAM: ${{ vars.TURBO_TEAM }}
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}

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:
- 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

# Normally, this would be done as part of the turbo pipeline - however since the Expo app doesn't depend on `@acme/db` it doesn't care.
# TODO: Free for all to find a better solution here.
- name: Generate Prisma Client
run: pnpm turbo db:generate

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

# FIXME: Add this back once we have an Expo SDK supporting React 18.2
# - name: Check workspaces
# run: pnpm manypkg check
- uses: actions/checkout@v4

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

- name: Format
run: pnpm format

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

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

- name: Typecheck
run: pnpm typecheck
12 changes: 7 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,19 @@ 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 All @@ -43,6 +44,7 @@ yarn-error.log*

# typescript
*.tsbuildinfo
dist/

# turbo
.turbo
11 changes: 0 additions & 11 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,12 +1 @@
# Expo doesn't play nice with pnpm by default.
# 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
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
20.12
11 changes: 8 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"eslint.rules.customizations": [{ "rule": "*", "severity": "warn" }],
"eslint.rules.customizations": [
{
"rule": "*",
"severity": "warn"
}
],
"typescript.tsdk": "node_modules/typescript/lib"
}
}
21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

Loading

0 comments on commit 6c8b059

Please sign in to comment.