├── .env.example
├── .eslintrc.js
├── .gitignore
├── .husky
├── commit-msg
└── pre-commit
├── .lintstagedrc
├── .npmrc
├── .prettierignore
├── README.md
├── apps
├── my-t3-app
│ ├── .eslintrc.cjs
│ ├── README.md
│ ├── next-env.d.ts
│ ├── next.config.mjs
│ ├── package.json
│ ├── postcss.config.cjs
│ ├── prettier.config.cjs
│ ├── public
│ │ └── favicon.ico
│ ├── src
│ │ ├── env.mjs
│ │ ├── pages
│ │ │ ├── _app.tsx
│ │ │ ├── api
│ │ │ │ ├── auth
│ │ │ │ │ └── [...nextauth].ts
│ │ │ │ └── trpc
│ │ │ │ │ └── [trpc].ts
│ │ │ └── index.tsx
│ │ ├── server
│ │ │ ├── api
│ │ │ │ ├── root.ts
│ │ │ │ ├── routers
│ │ │ │ │ └── example.ts
│ │ │ │ └── trpc.ts
│ │ │ └── auth.ts
│ │ ├── styles
│ │ │ └── globals.css
│ │ └── utils
│ │ │ └── api.ts
│ ├── tailwind.config.cjs
│ └── tsconfig.json
├── my-t3-drizzle
│ ├── .eslintrc.cjs
│ ├── .gitignore
│ ├── .npmrc
│ ├── README.md
│ ├── drizzle.config.ts
│ ├── next.config.mjs
│ ├── package.json
│ ├── pnpm-lock.yaml
│ ├── postcss.config.cjs
│ ├── prettier.config.cjs
│ ├── public
│ │ └── favicon.ico
│ ├── src
│ │ ├── env.mjs
│ │ ├── pages
│ │ │ ├── _app.tsx
│ │ │ ├── api
│ │ │ │ ├── auth
│ │ │ │ │ └── [...nextauth].ts
│ │ │ │ └── trpc
│ │ │ │ │ └── [trpc].ts
│ │ │ └── index.tsx
│ │ ├── server
│ │ │ ├── adapters
│ │ │ │ └── drizzleAdapter.ts
│ │ │ ├── api
│ │ │ │ ├── root.ts
│ │ │ │ ├── routers
│ │ │ │ │ └── example.ts
│ │ │ │ └── trpc.ts
│ │ │ └── auth.ts
│ │ ├── styles
│ │ │ └── globals.css
│ │ └── utils
│ │ │ └── api.ts
│ ├── tailwind.config.ts
│ └── tsconfig.json
└── web
│ ├── .eslintrc.js
│ ├── README.md
│ ├── next-env.d.ts
│ ├── next.config.js
│ ├── package.json
│ ├── postcss.config.cjs
│ ├── prettier.config.cjs
│ ├── public
│ ├── next.svg
│ └── vercel.svg
│ ├── src
│ └── app
│ │ ├── favicon.ico
│ │ ├── globals.css
│ │ ├── layout.tsx
│ │ └── page.tsx
│ ├── tailwind.config.cjs
│ └── tsconfig.json
├── commitlint.config.js
├── package.json
├── packages
├── config
│ ├── commitlint.config.js
│ ├── package.json
│ ├── postcss.config.js
│ ├── prettier.config.js
│ └── tailwind.config.js
├── drizzle
│ ├── .eslintrc.cjs
│ ├── drizzle.config.ts
│ ├── index.ts
│ ├── package.json
│ ├── prettier.config.cjs
│ ├── schemas
│ │ ├── auth.ts
│ │ ├── index.ts
│ │ └── schema.ts
│ └── tsconfig.json
├── eslint-config-custom
│ ├── index.js
│ └── package.json
├── prisma-orm
│ ├── index.ts
│ ├── package.json
│ ├── prisma
│ │ └── schema.prisma
│ └── tsconfig.json
├── tsconfig
│ ├── base.json
│ ├── nextjs.json
│ ├── package.json
│ └── react-library.json
├── ui
│ ├── package.json
│ ├── postcss.config.js
│ ├── prettier.config.js
│ ├── src
│ │ ├── components
│ │ │ ├── accordion.tsx
│ │ │ ├── button.tsx
│ │ │ └── index.ts
│ │ ├── index.tsx
│ │ └── layout
│ │ │ ├── gradient.tsx
│ │ │ ├── index.ts
│ │ │ └── page-head.tsx
│ ├── tailwind.config.js
│ └── tsconfig.json
└── utils
│ ├── cn.ts
│ ├── index.ts
│ ├── package.json
│ └── tsconfig.json
├── pnpm-lock.yaml
├── pnpm-workspace.yaml
├── prettier.config.js
└── turbo.json
/.env.example:
--------------------------------------------------------------------------------
1 | # Since the ".env" file is gitignored, you can use the ".env.example" file to
2 | # build a new ".env" file when you clone the repo. Keep this file up-to-date
3 | # when you add new variables to `.env`.
4 |
5 | # This file will be committed to version control, so make sure not to have any
6 | # secrets in it. If you are cloning this repo, create a copy of this file named
7 | # ".env" and populate it with your secrets.
8 |
9 | # When adding additional environment variables, the schema in "/src/env.mjs"
10 | # should be updated accordingly.
11 |
12 | # Node Envviorment
13 | NODE_ENV="development"
14 |
15 | # Prisma
16 | # https://www.prisma.io/docs/reference/database-reference/connection-urls#env
17 | DATABASE_URL="file:./db.sqlite"
18 |
19 | # Next Auth
20 | # You can generate a new secret on the command line with:
21 | # openssl rand -base64 32
22 | # https://next-auth.js.org/configuration/options#secret
23 | NEXTAUTH_SECRET=""
24 | NEXTAUTH_URL="http://localhost:3000"
25 |
26 | # Next Auth Discord Provider
27 | DISCORD_CLIENT_ID=""
28 | DISCORD_CLIENT_SECRET=""
29 |
30 | # Drizzle crediential
31 | DB_HOST="localhost"
32 | DB_USERNAME="root"
33 | DB_PASSWORD="password"
34 | DB_NAME="my_db"
35 |
--------------------------------------------------------------------------------
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | // This tells ESLint to load the config from the package `eslint-config-custom`
4 | extends: ['@retconned/eslint-config-custom'],
5 | settings: {
6 | next: {
7 | rootDir: ['apps/*/']
8 | }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | node_modules
5 | .pnp
6 | .pnp.js
7 |
8 | # testing
9 | coverage
10 |
11 | # next.js
12 | .next/
13 | out/
14 | dist/
15 | build
16 | next-env.d.ts
17 |
18 | # misc
19 | .DS_Store
20 | *.pem
21 |
22 | # debug
23 | npm-debug.log*
24 | yarn-debug.log*
25 | yarn-error.log*
26 | .pnpm-debug.log*
27 |
28 | # local env files
29 | .env.local
30 | .env.development.local
31 | .env.test.local
32 | .env.production.local
33 |
34 | # turbo
35 | .turbo
36 | .turbo_cache
37 |
38 | # vscode
39 | .vscode
40 |
41 |
42 | # env
43 | .env
--------------------------------------------------------------------------------
/.husky/commit-msg:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 | . "$(dirname -- "$0")/_/husky.sh"
3 |
4 | # Check ESLint Standards
5 | pnpm run check:commit:msg:staged ||
6 | (
7 | echo '👋 Hey you typed a wrong message! 👋
8 | Commitlint ensures you keep best practices by enforcing you to follow them!'
9 | false;
10 | )
11 |
12 | echo '🎉🎊🥳 Awesome, your commit rocks all over the place!'
13 |
--------------------------------------------------------------------------------
/.husky/pre-commit:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 | . "$(dirname -- "$0")/_/husky.sh"
3 |
4 | echo '💅 Styling, testing and building your project before committing'
5 |
6 | # Check ESLint Standards
7 | pnpm run lint:staged ||
8 | (
9 | echo '❌😱 Get that weak shit out of here!
10 | ESLint Check Failed. Make the required changes listed above, add changes and try to commit again.'
11 | false;
12 | )
13 |
14 | # Building...
15 | echo '🛠 Trying to build the code... '
16 |
17 | pnpm run build ||
18 | (
19 | echo '❌😱 Next build failed: View the errors above to see why.'
20 | false;
21 | )
22 |
23 | # If everything passes... Now we can check commit message
24 | echo '👨💻 Checking commit message '
25 |
--------------------------------------------------------------------------------
/.lintstagedrc:
--------------------------------------------------------------------------------
1 | {
2 | "**/*.{js,jsx,ts,tsx,json,css,scss,md}": ["pnpm run check:prettier:staged"]
3 | }
4 |
--------------------------------------------------------------------------------
/.npmrc:
--------------------------------------------------------------------------------
1 | auto-install-peers=true
2 | strict-peer-dependencies=false
3 | link-workspace-packages=
4 | public-hoist-pattern[]=*prisma*
5 |
--------------------------------------------------------------------------------
/.prettierignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | package-lock.json
3 | public
4 | build
5 | coverage
6 | .turbo
7 | .turbo_cache
8 | .next
9 | next-env.d.ts
10 | .vscode
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
Welcome to pnpm-turborepo-boilerplate 👋
2 |
3 | ## What's inside?
4 |
5 | This turborepo uses [pnpm](https://pnpm.io) as a package manager. It includes the following packages/apps:
6 |
7 | > ### Apps and Packages
8 |
9 | - `web`: a Next 13 [Next.js](https://nextjs.org/) app.
10 | - `t3-app`: a [T3 Stack](https://create.t3.gg/) project bootstrapped with create-t3-app.
11 | - `t3-drizzle`: a [T3 Stack](https://create.t3.gg/) project bootstrapped with create-t3-app & [Drizzle-orm](https://github.com/drizzle-team/drizzle-orm).
12 | - `ui`: a stub React component library shared throughout the monorepo.
13 | - `utils`: shared utils throughout the monorepo.
14 | - `prisma-orm`: Prisma instence / client used throughout the monorepo.
15 | - `drizzle`: Drizzle-orm & drizzle-kit used throughout the monorepo.
16 | - `eslint-config-custom`: `eslint` .
17 | - `tsconfig`: `tsconfig.json`'s used throughout the monorepo.
18 |
19 | Each package & app is 100% [TypeScript](https://www.typescriptlang.org/).
20 |
21 | > ### Utilities
22 |
23 | This turborepo has some additional tools already setup for you:
24 |
25 | - [TypeScript](https://www.typescriptlang.org/) for static type checking
26 | - [ESLint](https://eslint.org/) for code linting
27 | - [Prettier](https://prettier.io) for code formatting
28 | - [Pretty-quick](https://github.com/azz/pretty-quick) runs prettier over changed files
29 | - [Prisma](https://github.com/prisma/prisma) Prisma is a next-generation Typescript ORM
30 | - [Drizzle](https://github.com/drizzle-team/drizzle-orm) Drizzle ORM is a TypeScript ORM for SQL databases
31 |
32 | For git integration it has also:
33 |
34 | - [Conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) for improving commits
35 | - [Husky](https://github.com/typicode/husky) for improving commits
36 |
37 | > ### Prerequisites
38 |
39 | - pnpm
40 | - node >=18.4.0
41 |
--------------------------------------------------------------------------------
/apps/my-t3-app/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // eslint-disable-next-line @typescript-eslint/no-var-requires
2 | const path = require("path");
3 |
4 | /** @type {import("eslint").Linter.Config} */
5 | const config = {
6 | overrides: [
7 | {
8 | extends: [
9 | "plugin:@typescript-eslint/recommended-requiring-type-checking",
10 | ],
11 | files: ["*.ts", "*.tsx"],
12 | parserOptions: {
13 | project: path.join(__dirname, "tsconfig.json"),
14 | },
15 | },
16 | ],
17 | parser: "@typescript-eslint/parser",
18 | parserOptions: {
19 | project: path.join(__dirname, "tsconfig.json"),
20 | },
21 | plugins: ["@typescript-eslint"],
22 | extends: ["next/core-web-vitals", "plugin:@typescript-eslint/recommended"],
23 | rules: {
24 | "@typescript-eslint/consistent-type-imports": [
25 | "warn",
26 | {
27 | prefer: "type-imports",
28 | fixStyle: "inline-type-imports",
29 | },
30 | ],
31 | "@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
32 | },
33 | };
34 |
35 | module.exports = config;
36 |
--------------------------------------------------------------------------------
/apps/my-t3-app/README.md:
--------------------------------------------------------------------------------
1 | # Create T3 App
2 |
3 | This is a [T3 Stack](https://create.t3.gg/) project bootstrapped with `create-t3-app`.
4 |
5 | ## What's next? How do I make an app with this?
6 |
7 | 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.
8 |
9 | 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.
10 |
11 | - [Next.js](https://nextjs.org)
12 | - [NextAuth.js](https://next-auth.js.org)
13 | - [Prisma](https://prisma.io)
14 | - [Tailwind CSS](https://tailwindcss.com)
15 | - [tRPC](https://trpc.io)
16 |
17 | ## Learn More
18 |
19 | To learn more about the [T3 Stack](https://create.t3.gg/), take a look at the following resources:
20 |
21 | - [Documentation](https://create.t3.gg/)
22 | - [Learn the T3 Stack](https://create.t3.gg/en/faq#what-learning-resources-are-currently-available) — Check out these awesome tutorials
23 |
24 | You can check out the [create-t3-app GitHub repository](https://github.com/t3-oss/create-t3-app) — your feedback and contributions are welcome!
25 |
26 | ## How do I deploy this?
27 |
28 | 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.
29 |
--------------------------------------------------------------------------------
/apps/my-t3-app/next-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
4 | // NOTE: This file should not be edited
5 | // see https://nextjs.org/docs/basic-features/typescript for more information.
6 |
--------------------------------------------------------------------------------
/apps/my-t3-app/next.config.mjs:
--------------------------------------------------------------------------------
1 | /**
2 | * Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation.
3 | * This is especially useful for Docker builds.
4 | */
5 | !process.env.SKIP_ENV_VALIDATION && (await import("./src/env.mjs"));
6 |
7 | /** @type {import("next").NextConfig} */
8 | const config = {
9 | reactStrictMode: true,
10 | transpilePackages: ["@retconned/ui","@retconned/prisma-orm"],
11 | /**
12 | * If you have the "experimental: { appDir: true }" setting enabled, then you
13 | * must comment the below `i18n` config out.
14 | *
15 | * @see https://github.com/vercel/next.js/issues/41980
16 | */
17 | i18n: {
18 | locales: ["en"],
19 | defaultLocale: "en",
20 | },
21 | };
22 | export default config;
23 |
--------------------------------------------------------------------------------
/apps/my-t3-app/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "my-t3-app",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "build": "next build",
7 | "dev": "next dev",
8 | "postinstall": "prisma generate --schema=../../packages/prisma-orm/prisma/schema.prisma",
9 | "lint": "next lint",
10 | "start": "next start"
11 | },
12 | "dependencies": {
13 | "@retconned/ui": "workspace:*",
14 | "@retconned/utils": "workspace:*",
15 | "@next-auth/prisma-adapter": "^1.0.5",
16 | "@tanstack/react-query": "^4.20.2",
17 | "@trpc/client": "^10.9.0",
18 | "@trpc/next": "^10.9.0",
19 | "@trpc/react-query": "^10.9.0",
20 | "@trpc/server": "^10.9.0",
21 | "next": "^13.2.1",
22 | "next-auth": "^4.19.0",
23 | "react": "18.2.0",
24 | "react-dom": "18.2.0",
25 | "superjson": "1.9.1",
26 | "zod": "^3.20.6"
27 | },
28 | "devDependencies": {
29 | "@retconned/config": "workspace:*",
30 | "@retconned/eslint-config-custom": "workspace:*",
31 | "@retconned/tsconfig": "workspace:*",
32 | "@retconned/prisma-orm": "workspace:*",
33 | "@types/eslint": "^8.21.1",
34 | "@types/node": "^18.14.0",
35 | "@types/prettier": "^2.7.2",
36 | "@types/react": "^18.0.28",
37 | "@types/react-dom": "^18.0.11",
38 | "@typescript-eslint/eslint-plugin": "^5.53.0",
39 | "@typescript-eslint/parser": "^5.53.0",
40 | "autoprefixer": "^10.4.7",
41 | "eslint": "^8.34.0",
42 | "eslint-config-next": "^13.2.1",
43 | "postcss": "^8.4.14",
44 | "prettier": "^2.8.1",
45 | "prettier-plugin-tailwindcss": "^0.2.1",
46 | "prisma": "^4.9.0",
47 | "tailwindcss": "^3.2.0",
48 | "typescript": "^4.9.5"
49 | },
50 | "ct3aMetadata": {
51 | "initVersion": "7.8.0"
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/apps/my-t3-app/postcss.config.cjs:
--------------------------------------------------------------------------------
1 | module.exports = require('@retconned/config/postcss.config')
2 |
--------------------------------------------------------------------------------
/apps/my-t3-app/prettier.config.cjs:
--------------------------------------------------------------------------------
1 | module.exports = require("@retconned/config/prettier.config");
2 |
--------------------------------------------------------------------------------
/apps/my-t3-app/public/favicon.ico:
--------------------------------------------------------------------------------
1 | h 6 ( � 00 h&