Skip to content

Commit

Permalink
refactor: merge monorepo into next (#322)
Browse files Browse the repository at this point in the history
* chore(docs): updated readme to contain @next

* refactor: inject curried `runPkgManagerInstall` to package installers (#202)

* refactor: export curryable `runPkgManagerInstallOptions`

* refactor: inject curried `runPkgManagerInstall` to installers

* refactor: use curried function in installers

* fix: refactored calls that should have passed `devMode` flag

* fix: typo

* feat: migrate env + next config to esm (#205)

* chore: move lintstaged config into file (#217)

* fix: move gitignore rename call (#215)

* feat: add trpc inference helpers

* fix(#218): lock react-query to v3

* chore(release): 5.1.0

* fix: add missing trpc import

* chore(release): 5.1.1

* fix: handle pkg with version in noInstall mode (#220)

* fix: typo in readme

* feat: add db.sqlite-journal to gitignore (#221)

Co-authored-by: Shoubhit Dash <shoubhit2005@gmail.com>

* fix: typo - rename 'varibles' to 'variables' (#223)

* fix: missing DATABASE_URL (#222)

* chore(release): 5.2.0

* fix: update url in auth prisma schema

* chore(release): 5.2.1

* feat: add typesafe client side env variables (#209)

* feat: add typesafe client side env variables

* refactor: clean up type-safe client side env vars

* fix: add inferProcedureInput/Output imports in trpc utils

* refactor: client env validation

* refactor: run prettier

* refactor: clean up files and formatter func

* fix: validate public env vars are not in server schema

* fix: add ts-check to mjs files

Co-authored-by: Shoubhit Dash <shoubhit2005@gmail.com>

* fix: title being offset when using yarn/pnpm

* chore(release): bump beta version

* chore: bump Next.js to 12.2.3

* chore(release): bump beta version

* feat: improved logo typography (#238)

* chore: bump beta version

* fix: remove semicolon in _app.tsx with next-auth to avoid early return

* chore: bump beta version

* chore: add protected trpc router example (#194)

* chore: add link to community (#229)

* chore: add link to community info

* chore: add discord badge

* fix: t3 discord id

* fix: discord link on badge

Co-authored-by: Shoubhit Dash <shoubhit2005@gmail.com>

* docs(readme): add usage for beta and next version (#243)

* chore: add js files to format script (#244)

* chore: remove credentials provider (#246)

* refactor(cli): add module path aliasing (#247)

* feat: updating tailwind and postcss config's to use .cjs (#242)

Co-authored-by: Shoubhit Dash <shoubhit2005@gmail.com>
Co-authored-by: Julius Marminge <51714798+juliusmarminge@users.noreply.github.com>

* fix: clarify some comments and rename some files in env (#245)

* fix: clarify some comments and rename some files in env

* fix: filenames in installer

* fix: import in next.config

* fix: import after filechange

* fix: forgotten rename

Co-authored-by: Shoubhit Dash <shoubhit2005@gmail.com>

* chore(release): bump beta version

* fix: added JSDoc type to clientEnv in all env-schema (#240)

* chore(release): 5.3.0

* refactor(utils): remove unnecessary block (#252)

* chore: update favicon (#253)

* fix: missing next-auth types (#255)

fixes #254

* fix: height on small screens (#256)

* docs: expand t3-app README (#248)

* revert: extend regular next-auth module (#257)

* revert: extend regular next-auth module

* refactor: move typedefs to `src/types`

Co-authored-by: Shoubhit Dash <shoubhit2005@gmail.com>

* feat: add deployment strategy to generated README (#258)

* fix(docs): remove extra s in link

* feat: add deployment strategy to readme

* docs: add instructions on building docker image to readme (#265)

* Add instructions on building docker image

Following the same method given in NextJs examples

* fix: prettier check

run prettier format to fix formatting issues

* docs: small adjustments (#266)

* docs: add instructions on building docker image to readme (#265)

* Add instructions on building docker image

Following the same method given in NextJs examples

* fix: prettier check

run prettier format to fix formatting issues

* docs: small adjustments

* feat: set appName to directory on 'npx create-t3-app .' (#273)

* fix(prisma): make db changes for next-auth on mysql obvious (#275)

* chore(release): 5.4.0

* feat: make session.user.id non-nullable (#282)

* chore(release): 5.5.0

* docs: update tRPC v10 docs link (#291)

* fix: change ! reversion to equality in env validation (#293)

* feat: Include ct3a version as metadata in generated app (#305)

* fix: parse path returned from process.cwd() before using it (#303)

Co-authored-by: Shoubhit Dash <shoubhit2005@gmail.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>

* chore(release): 5.6.0

* chore: upload T3 logo to github (#311)

* chore: upload T3 logo to github

* chore: format

* chore: ignore package-lock (#315)

* chore: Publish Workflow and other Github enhancements (#308)

* chore: switch standard-version to changeset

* chore: add version workflow

* chore: issue forms and pr labeler

* chore: prettier

* chore: add missing credit

* chore: adjust some commands

* chore: update contributing guidelines

* chore: prettier

* chore: adjustments

* feat: add minimal ts-linter

* fix: lint warnings

* revert eslinter

* chore(ci): dont use reserved word `package`

* chore(ci): require -> import

* chore(ci): authenticate to npm

* chore: update pr-template

* chore(ci): next-release

* chore(ci): release workflow

* chore(ci): update scrips

* chore(ci): update release versioning

* chore(ci): update versioning scripts

* chore(ci): fix no-bin error

* feat: add base tslint (#317)

* chore(app): version bumps

* feat: add base linter for ts

* fix: test ignoring base

* fix: test setting root

* fix: test add parser

* fix: test disabling exclude

* chore: changeset

* chore(ci): test changeset with npx

* chore(ci): test npm

* chore(ci): give proper commit message and title

* chore(release): remove standard-version msg from changelog

* chore(release): version packages (#319)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* chore(release): public access

* refactor: turborepo with cli and www (#320)

* docs: add docs site built with Astro (#300)

* docs: add docs site built with Astro

* docs: prettier

Co-authored-by: Shoubhit Dash <shoubhit2005@gmail.com>

* refactor: make monorepo

* chore(fix): tailwindcss/typography peer deps

* refactor: docusaurus migration

* docs: styling

* fix: linting

* fix: typecheck

* fix: no typecheck www

* fix: restore tsconfig

* fix(ci): cache all node_modules

* fix: more caching

* fix: missing lint plugin

* fix(ci): cwd

* fix(ci): path

* docs: start on collection

* docs: headers

Co-authored-by: Kroucher <99768034+kroucher@users.noreply.github.com>
Co-authored-by: Shoubhit Dash <shoubhit2005@gmail.com>
Co-authored-by: sir-mr-bean <kroucher.1019@gmail.com>

* chore: set type module

* fix: typo in pub-script

* fix: create npmrc in cli pkg

* fix: path in version script

* refactor: turborepo next

Co-authored-by: Oscar Chic <oscarchicfarre@gmail.com>
Co-authored-by: Daniel Roe <daniel@roe.dev>
Co-authored-by: JLN13X <85513960+JLN13X@users.noreply.github.com>
Co-authored-by: Hauke Schnau <31801906+HaukeSchnau@users.noreply.github.com>
Co-authored-by: Azmi Makarima <94958349+amyisdev@users.noreply.github.com>
Co-authored-by: Christopher Ehrlich <ehrlich.christopher@gmail.com>
Co-authored-by: Shoubhit Dash <shoubhit2005@gmail.com>
Co-authored-by: Nicholas Ramkissoon <nicholas.ramkissoon01@gmail.com>
Co-authored-by: Vikrant Bhat <50735025+bhatvikrant@users.noreply.github.com>
Co-authored-by: Guillermo Antony Cava Nuñez <gcavanunez@gmail.com>
Co-authored-by: Abui <adjiem31@gmail.com>
Co-authored-by: John Daly <john.daly2@gmail.com>
Co-authored-by: Simon Green Kristensen <github@simon-green.dev>
Co-authored-by: XLS <fernandoxu9@gmail.com>
Co-authored-by: Omar López <zomars@me.com>
Co-authored-by: Krish <52761222+Krish120003@users.noreply.github.com>
Co-authored-by: cyremur <cyremur@users.noreply.github.com>
Co-authored-by: Samuel Gunter <samuelgunter3@gmail.com>
Co-authored-by: Khalil Omer <68179593+khalil-omer@users.noreply.github.com>
Co-authored-by: BWsix <itisbw62@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Kroucher <99768034+kroucher@users.noreply.github.com>
Co-authored-by: sir-mr-bean <kroucher.1019@gmail.com>
  • Loading branch information
1 parent 60f7bf8 commit d960c36
Show file tree
Hide file tree
Showing 125 changed files with 8,551 additions and 977 deletions.
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
"ignore": ["@ct3a/www"]
}
65 changes: 24 additions & 41 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,54 +1,37 @@
{
"$schema": "http://json.schemastore.org/eslintrc",
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json"
},
"plugins": ["@typescript-eslint", "import"],
"parser": "@typescript-eslint/parser", // Specifies the ESLint parser
"plugins": ["no-only-tests", "unicorn"],
"extends": [
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:@typescript-eslint/strict",
"plugin:import/recommended",
"plugin:import/typescript",
"prettier"
"plugin:@typescript-eslint/recommended", // Uses the recommended rules from the @typescript-eslint/eslint-plugin
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:prettier/recommended"
],
"env": {
"node": true,
"es6": true
"parserOptions": {
"ecmaVersion": 2018, // Allows for the parsing of modern ECMAScript features
"sourceType": "module", // Allows for the use of import
"project": "./tsconfig.eslint.json" // Allows for the use of rules which require parserServices to be generated
},
"rules": {
"no-shadow": 1,
"import/no-named-as-default": 0,
"import/no-named-as-default-member": 0,
"import/order": [
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"react/react-in-jsx-scope": "off",
"react/prop-types": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-floating-promises": "error",
"no-only-tests/no-only-tests": "error",
"unicorn/filename-case": [
"error",
{
"groups": [
"type",
"builtin",
"external",
"internal",
["parent", "sibling", "index"],
"unknown"
],
"newlines-between": "never",
"alphabetize": {
"order": "asc",
"caseInsensitive": true
},
"warnOnUnassignedImports": true
"case": "camelCase",
"ignore": ["\\.d\\.ts$"]
}
]
},
"settings": {
"import/resolver": {
"typescript": {
"alwaysTryTypes": true,
"project": "./tsconfig.json"
}
"react": {
"version": "18.2.0"
}
},
"ignorePatterns": ["node_modules/", "build/", "dist/"]
}
}
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
5 changes: 3 additions & 2 deletions .github/version-script-beta.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
import fs from "fs";
import { exec } from "child_process";

const pkgJsonPath = "cli/package.json";
try {
const pkg = JSON.parse(fs.readFileSync("package.json"));
const pkg = JSON.parse(fs.readFileSync(pkgJsonPath));
exec("git rev-parse --short HEAD", (err, stdout) => {
if (err) {
console.log(err);
process.exit(1);
}
pkg.version = "6.0.0-beta." + stdout.trim();
fs.writeFileSync("package.json", JSON.stringify(pkg, null, "\t") + "\n");
fs.writeFileSync(pkgJsonPath, JSON.stringify(pkg, null, "\t") + "\n");
});
} catch (error) {
console.error(error);
Expand Down
5 changes: 3 additions & 2 deletions .github/version-script-next.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
import fs from "fs";
import { exec } from "child_process";

const pkgJsonPath = "cli/package.json";
try {
const pkg = JSON.parse(fs.readFileSync("package.json"));
const pkg = JSON.parse(fs.readFileSync(pkgJsonPath));
exec("git rev-parse --short HEAD", (err, stdout) => {
if (err) {
console.log(err);
process.exit(1);
}
pkg.version = "6.0.0-next." + stdout.trim();
fs.writeFileSync("package.json", JSON.stringify(pkg, null, "\t") + "\n");
fs.writeFileSync(pkgJsonPath, JSON.stringify(pkg, null, "\t") + "\n");
});
} catch (error) {
console.error(error);
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/PR-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions/cache@v3
id: pnpm-cache
with:
path: node_modules
path: "**/node_modules"
key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node-
Expand All @@ -40,7 +40,7 @@ jobs:
- name: Load node_modules
uses: actions/cache@v3
with:
path: node_modules
path: "**/node_modules"
key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml') }}
- name: Restore ESLint Cache
uses: actions/cache@v3
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
- name: Load node_modules
uses: actions/cache@v3
with:
path: node_modules
path: "**/node_modules"
key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml') }}
- uses: pnpm/action-setup@v2.2.2
with:
Expand All @@ -93,7 +93,7 @@ jobs:
- name: Load node_modules
uses: actions/cache@v3
with:
path: node_modules
path: "**/node_modules"
key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml') }}
- uses: pnpm/action-setup@v2.2.2
with:
Expand All @@ -112,7 +112,7 @@ jobs:
- name: Load node_modules
uses: actions/cache@v3
with:
path: node_modules
path: "**/node_modules"
key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml') }}
- uses: pnpm/action-setup@v2.2.2
with:
Expand All @@ -123,5 +123,5 @@ jobs:
- run: pnpm build
# has to be scaffolded outside the CLI project so that no lint/tsconfig are leaking
# through. this way it ensures that it is the app's configs that are being used
- run: pnpm start -y ../ci-test-app
- run: cd cli && pnpm start -y ../../ci-test-app
- run: cd ../ci-test-app && pnpm build
2 changes: 1 addition & 1 deletion .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
run: node .github/version-script-beta.js

- name: Authenticate to NPM
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_ACCESS_TOKEN }}" > .npmrc
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_ACCESS_TOKEN }}" > cli/.npmrc

- name: Publish Beta to NPM
run: pnpm pub:beta
Expand Down
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
node_modules/
/.pnp
.pnp.js
package-lock.json
yarn.lock

# TESTING
/coverage
Expand Down Expand Up @@ -39,8 +41,11 @@ yarn-error.log*
tmp/
temp/
.eslintcache
.docusaurus

# MAC
._*
.DS_Store
Thumbs.db
Thumbs.db

.vscode
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
build/
dist/
dist/
.docusaurus
86 changes: 68 additions & 18 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,88 @@
# Contribution Guidelines

When contributing to `create-t3-app` whether on GitHub or in other community spaces:
When contributing to `create-t3-app`, whether on GitHub or in other community spaces:

- Be respectful, civil, and open-minded.
- Before opening a new pull request, try searching through the [issue tracker](https://github.com/nexxeln/create-t3-app/issues) for known issues or fixes.

## How to Contribute

1. [Open an issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/creating-an-issue) and describe the problem.
2. [Fork this repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo) to your own GitHub account, then [clone the repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) to your machine.
3. Follow the [README](https://github.com/nexxeln/create-t3-app#readme) to install the project.
4. Create a new branch and implement your changes.
### Prerequisites

> Note: We use `commitlint` to autoupdate the changelog and versioning.
>
> - Make sure you follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) guidelines when making commits.
> - Do not manually update the [changelog](./CHANGELOG.md) and version in the [package.json](./package.json).
In order to not waste your time implementing changes that has already been declined, or is generally not needed, start by [opening an issue](https://github.com/t3-oss/create-t3-app/issues/new/choose) describing the problem you would like to solve.

5. Open a pull request! All pull requests must be made to the `main` branch.
### Setup your environment

## Contributor Development Setup
_Some commands will assume you have the Github CLI installed, if you haven't, consider [installing it](https://github.com/cli/cli#installation), but you can always use the Web UI if you prefer that instead._

In order to contribute to this project, you will need to fork the repository:

```bash
gh repo fork t3-oss/create-t3-app
```

then, clone it to your local machine:

```bash
gh repo clone <your-github-name>/create-t3-app
```

This project uses [pnpm](https://pnpm.io) as its package manager. Install it if you haven't already:

```bash
# Install pnpm
npm install -g pnpm
```

# Install dependencies
Then, install the project's dependencies:

```bash
pnpm install
```

### Implement your changes

Now you're all setup and can start implementing your changes.

When you want to test your changes, run:

```bash
pnpm dev
```

# Initial build
pnpm run build
which will build and start the CLI.

# Start the package locally
pnpm start
When making commits, make sure to follow the [convential commit](https://www.conventionalcommits.org/en/v1.0.0/) guidelines, i.e. prepending the message with `feat:`, `fix:`, `chore:` etc...

### When you're done

Check that your code follows the project's style guidelines by running:

```bash
pnpm check
```

Please also make a manual, functional test of your changes.

If your change should appear in the changelog, i.e. it changes some behavior of either the CLI or the outputted application, it must be captured by `changeset` which is done by running

```bash
pnpm changeset
```

This contribution guide is inspired by the [Next.js contribution guide.](https://github.com/vercel/next.js/blob/canary/contributing.md)
and filling out the form with the appropriate information. Then, add the generated changeset to git:

```bash
git add ./changeset/*.md && git commit -m "chore: add changeset"
```

When all that's done, it's time to file a pull request to upstream:

```bash
gh pr create --web
```

and fill out the title and body appropriately. Again, make sure to follow the [convential commit](https://www.conventionalcommits.org/en/v1.0.0/) guidelines for your title.

## Credits

This documented was inspired by the contributing guidelines for [cloudflare/wrangler2](https://github.com/cloudflare/wrangler2/blob/main/CONTRIBUTING.md).
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align="center">
<img src="https://s6.imgcdn.dev/BJW4B.png" width="130" alt="Logo for T3" />
<img src="https://user-images.githubusercontent.com/95541290/184307358-ebf8be63-e434-49d9-8181-90269ad79599.png" width="130" alt="Logo for T3" />
</p>

<h1 align="center">
Expand Down Expand Up @@ -85,7 +85,7 @@ yarn create t3-app
pnpm dlx create-t3-app@latest
```

If you prefer using the [experimental v10 version of tRPC](https://github.com/trpc/trpc/blob/next/.tmp/v10-docs.md), use `create-t3-app@next`. Note that the alpha versions of tRPC that it uses may contain API changes. We will try our best to keep on top of these, please file an issue if we have missed something.
If you prefer using the [experimental v10 version of tRPC](https://alpha.trpc.io/), use `create-t3-app@next`. Note that the alpha versions of tRPC that it uses may contain API changes. We will try our best to keep on top of these, please file an issue if we have missed something.

An ongoing development branch, `create-t3-app@beta`, can be downloaded for the most recent changes. Expect bugs when using the `beta` branch and please open issues with reproductions when they occur.

Expand Down Expand Up @@ -149,7 +149,7 @@ We 💖 contributors! Feel free to contribute to this project but **please read
</p>

<p align="center">
<a rel="noopener noreferrer" target="_blank" href="https://vercel.com/?utm_source=t3-oss&utm_campaign=osss">
<a rel="noopener noreferrer" target="_blank" href="https://vercel.com/?utm_source=t3-oss&utm_campaign=oss">
<img height="34px" src="https://www.datocms-assets.com/31049/1618983297-powered-by-vercel.svg" alt="Powered by vercel">
</a>
</p>
Expand Down
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions cli/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Create T3 App CLI

This is the actual CLI which bootstraps the T3 App.
Loading

0 comments on commit d960c36

Please sign in to comment.