-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* t3 env stuff * feat(create-turbo): apply official-starter transform * feat(create-turbo): apply package-manager transform * environment setup * move actions * checkout first * fix formatting * hmm * copy cooper vscode settings --------- Co-authored-by: Turbobot <[email protected]>
- Loading branch information
1 parent
ffdc12e
commit 8778baf
Showing
86 changed files
with
1,504 additions
and
7,806 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
POSTGRES_USER=user | ||
POSTGRES_PASSWORD=password |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.lockb binary diff=lockb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: "Lint" | ||
description: "Lint the project using Prettier" | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- uses: oven-sh/setup-bun@v1 | ||
with: | ||
bun-version: 1.1.27 | ||
|
||
- shell: bash | ||
run: bun install --frozen-lockfile | ||
|
||
- shell: bash | ||
run: bun format |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: "Lint" | ||
description: "Lint the project using ESLint" | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- uses: oven-sh/setup-bun@v1 | ||
with: | ||
bun-version: 1.1.27 | ||
|
||
- shell: bash | ||
run: bun install --frozen-lockfile | ||
|
||
- shell: bash | ||
run: | | ||
bun lint | ||
bunx sherif@latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: "Type-check" | ||
description: "Type-check the project using TSC" | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- uses: oven-sh/setup-bun@v1 | ||
with: | ||
bun-version: 1.1.27 | ||
|
||
- shell: bash | ||
run: bun install --frozen-lockfile | ||
|
||
- shell: bash | ||
run: bun typecheck |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Static Pull Request Checks | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
typecheck: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/typecheck | ||
|
||
format: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/format | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Dependencies | ||
node_modules | ||
|
||
# Local env files | ||
.env | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
# Testing | ||
coverage | ||
|
||
# Turbo | ||
.turbo | ||
|
||
# Vercel | ||
.vercel | ||
|
||
# Build Outputs | ||
.next/ | ||
out/ | ||
build | ||
dist | ||
|
||
# Debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Volumes | ||
volumes/* | ||
|
||
# Misc | ||
.DS_Store | ||
*.pem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"recommendations": [ | ||
"dbaeumer.vscode-eslint", | ||
"esbenp.prettier-vscode", | ||
"yoavbls.pretty-ts-errors", | ||
"bradlc.vscode-tailwindcss" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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": "bun dev", | ||
"cwd": "${workspaceFolder}/apps/web/", | ||
"skipFiles": ["<node_internals>/**"] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true, | ||
"eslint.rules.customizations": [{ "rule": "*", "severity": "warn" }], | ||
"eslint.useFlatConfig": true, | ||
"eslint.workingDirectories": [ | ||
{ "pattern": "apps/*/" }, | ||
{ "pattern": "packages/*/" }, | ||
{ "pattern": "tooling/*/" } | ||
], | ||
"prettier.ignorePath": ".gitignore", | ||
"tailwindCSS.experimental.classRegex": [ | ||
["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"], | ||
["cx\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"] | ||
], | ||
"tailwindCSS.experimental.configFile": "./tooling/tailwind/web.ts", | ||
"typescript.enablePromptUseWorkspaceTsdk": true, | ||
"typescript.preferences.autoImportFileExcludePatterns": [ | ||
"next/router.d.ts", | ||
"next/dist/client/router.d.ts" | ||
], | ||
"typescript.tsdk": "./node_modules/typescript/lib" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,92 @@ | ||
# Create T3 App | ||
# Good Dog Monorepo | ||
|
||
This is a [T3 Stack](https://create.t3.gg/) project bootstrapped with `create-t3-app`. | ||
This repository is a monorepo for the Good Dog Licensing project, managed with TurboRepo and Bun. | ||
|
||
## What's next? How do I make an app with this? | ||
## Table of Contents | ||
|
||
We try to keep this project as simple as possible, so you can start with just the scaffolding we set up for you, and add additional things later when they become necessary. | ||
- [Good Dog Monorepo](#good-dog-monorepo) | ||
- [Table of Contents](#table-of-contents) | ||
- [Structure](#structure) | ||
- [Getting Started](#getting-started) | ||
- [Prerequisites](#prerequisites) | ||
- [Installation](#installation) | ||
- [Running Scripts](#running-scripts) | ||
|
||
If you are not familiar with the different technologies used in this project, please refer to the respective docs. If you still are in the wind, please join our [Discord](https://t3.gg/discord) and ask for help. | ||
## Structure | ||
|
||
- [Next.js](https://nextjs.org) | ||
- [NextAuth.js](https://next-auth.js.org) | ||
- [Prisma](https://prisma.io) | ||
- [Drizzle](https://orm.drizzle.team) | ||
- [Tailwind CSS](https://tailwindcss.com) | ||
- [tRPC](https://trpc.io) | ||
The repository is organized as follows: | ||
|
||
## Learn More | ||
- **apps/**: Contains the main applications. | ||
- **db/**: Database-related scripts and configurations. | ||
- **web/**: The web application built with Next.js. | ||
- **packages/**: Contains shared packages. | ||
- **trpc/**: tRPC-related code. | ||
- **ui/**: UI components and utilities. | ||
- **tooling/**: Contains configuration and tooling for the project. | ||
- **eslint/**: ESLint configurations. | ||
- **github/**: GitHub Actions and workflows. | ||
- **prettier/**: Prettier configurations. | ||
- **tailwind/**: Tailwind CSS configurations. | ||
- **typescript**: TypeScript configurations. | ||
- **.vscode/**: Contains Visual Studio Code settings and recommended extensions. | ||
- **node_modules/**: Contains installed dependencies. | ||
- **package.json**: Contains project metadata and scripts. | ||
- **tsconfig.json**: Contains TypeScript configuration. | ||
- **README.md**: The main documentation file for the project. | ||
|
||
To learn more about the [T3 Stack](https://create.t3.gg/), take a look at the following resources: | ||
## Getting Started | ||
|
||
- [Documentation](https://create.t3.gg/) | ||
- [Learn the T3 Stack](https://create.t3.gg/en/faq#what-learning-resources-are-currently-available) — Check out these awesome tutorials | ||
### Prerequisites | ||
|
||
You can check out the [create-t3-app GitHub repository](https://github.com/t3-oss/create-t3-app) — your feedback and contributions are welcome! | ||
- [Node.js](https://nodejs.org/) >= 20 | ||
- [Bun](https://bun.sh/) >= 1.1.27 | ||
- [Docker](https://www.docker.com/) >= 20.10.7 | ||
|
||
## How do I deploy this? | ||
### Installation | ||
|
||
Follow our deployment guides for [Vercel](https://create.t3.gg/en/deployment/vercel), [Netlify](https://create.t3.gg/en/deployment/netlify) and [Docker](https://create.t3.gg/en/deployment/docker) for more information. | ||
1. Clone the repository: | ||
|
||
```sh | ||
git clone [email protected]:sandboxnu/good-dog-licensing.git | ||
cd good-dog | ||
``` | ||
|
||
2. Install dependencies: | ||
|
||
```sh | ||
bun install | ||
``` | ||
|
||
3. Create env file | ||
|
||
```sh | ||
cp .env.example .env | ||
``` | ||
|
||
4. Start the dev enviornment: | ||
|
||
```sh | ||
bun dev | ||
``` | ||
|
||
### Running Scripts | ||
|
||
The following scripts are available in the root `package.json`: | ||
|
||
- `build`: Build all packages and applications. | ||
- `clean`: Clean all `node_modules` and Turbo cache. | ||
- `db:up`: Start the database. | ||
- `db:down`: Stop the database. | ||
- `db:push`: Push database schema changes. | ||
- `db:generate`: Generate database client. | ||
- `db:migrate`: Run database migrations. | ||
- `db:studio`: Open the database Studio. | ||
- `dev`: Start all the development apps. | ||
- `dev:web`: Start only the web app. | ||
- `format`: Check code formatting. | ||
- `format:fix`: Fix code formatting. | ||
- `lint`: Run linting. | ||
- `lint:fix`: Fix linting issues. | ||
- `typecheck`: Run TypeScript type checks. | ||
- `shad-add`: Add a new UI component using Shadcn. | ||
- `generate:package`: Generate a new package. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
version: "3.8" | ||
|
||
services: | ||
postgres: | ||
image: postgres:15 | ||
restart: always | ||
environment: | ||
POSTGRES_DB: "good-dog" | ||
POSTGRES_USER: "${POSTGRES_USER:-username}" | ||
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD:-password}" | ||
volumes: | ||
- ../../volumes/postgres:/var/lib/postgresql/data | ||
ports: | ||
- "${POSTGRES_PORT:-5432}:5432" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import baseConfig from "@good-dog/eslint/base"; | ||
|
||
/** @type {import('typescript-eslint').Config} */ | ||
export default [ | ||
{ | ||
ignores: [], | ||
}, | ||
...baseConfig, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"name": "@good-dog/db", | ||
"version": "0.0.0", | ||
"private": true, | ||
"type": "module", | ||
"scripts": { | ||
"dev": "docker-compose -f compose.yml up", | ||
"up": "docker-compose -f compose.yml up -d", | ||
"down": "docker-compose -f compose.yml down", | ||
"clean": "rm -rf .turbo node_modules", | ||
"format": "prettier --check . --ignore-path ../../.gitignore" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; | ||
|
||
@layer base { | ||
:root { | ||
--background: 0 0% 100%; | ||
--foreground: 222.2 47.4% 11.2%; | ||
|
||
--muted: 210 40% 96.1%; | ||
--muted-foreground: 215.4 16.3% 46.9%; | ||
|
||
--popover: 0 0% 100%; | ||
--popover-foreground: 222.2 47.4% 11.2%; | ||
|
||
--border: 214.3 31.8% 91.4%; | ||
--input: 214.3 31.8% 91.4%; | ||
|
||
--card: 0 0% 100%; | ||
--card-foreground: 222.2 47.4% 11.2%; | ||
|
||
--primary: 222.2 47.4% 11.2%; | ||
--primary-foreground: 210 40% 98%; | ||
|
||
--secondary: 210 40% 96.1%; | ||
--secondary-foreground: 222.2 47.4% 11.2%; | ||
|
||
--accent: 210 40% 96.1%; | ||
--accent-foreground: 222.2 47.4% 11.2%; | ||
|
||
--destructive: 0 100% 50%; | ||
--destructive-foreground: 210 40% 98%; | ||
|
||
--ring: 215 20.2% 65.1%; | ||
|
||
--radius: 0.5rem; | ||
} | ||
|
||
.dark { | ||
--background: 224 71% 4%; | ||
--foreground: 213 31% 91%; | ||
|
||
--muted: 223 47% 11%; | ||
--muted-foreground: 215.4 16.3% 56.9%; | ||
|
||
--accent: 216 34% 17%; | ||
--accent-foreground: 210 40% 98%; | ||
|
||
--popover: 224 71% 4%; | ||
--popover-foreground: 215 20.2% 65.1%; | ||
|
||
--border: 216 34% 17%; | ||
--input: 216 34% 17%; | ||
|
||
--card: 224 71% 4%; | ||
--card-foreground: 213 31% 91%; | ||
|
||
--primary: 210 40% 98%; | ||
--primary-foreground: 222.2 47.4% 1.2%; | ||
|
||
--secondary: 222.2 47.4% 11.2%; | ||
--secondary-foreground: 210 40% 98%; | ||
|
||
--destructive: 0 63% 31%; | ||
--destructive-foreground: 210 40% 98%; | ||
|
||
--ring: 216 34% 17%; | ||
|
||
--radius: 0.5rem; | ||
} | ||
} | ||
|
||
@layer base { | ||
* { | ||
@apply border-border; | ||
} | ||
body { | ||
@apply bg-background text-foreground; | ||
font-feature-settings: | ||
"rlig" 1, | ||
"calt" 1; | ||
} | ||
} |
Oops, something went wrong.