Code Monkey home page Code Monkey logo

create-t3-app's People

Contributors

a4addel avatar ajcwebdev avatar asrvd avatar ayanavakarmakar avatar bai avatar barrybtw avatar c-ehrlich avatar dhravya avatar fedeorlandau avatar fernandoxu avatar finndore avatar g3root avatar github-actions[bot] avatar iaverages avatar idarklightning avatar jacobmgevans avatar joachimjusth avatar johnbakhmat avatar joshuakgoldberg avatar juliusmarminge avatar mwhite-22 avatar nexxeln avatar nramkissoon avatar nsttt avatar piotrekpkp avatar ronanru avatar sidwebworks avatar t3dotgg avatar theycallmecheng avatar zamiell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

create-t3-app's Issues

Adding project tooling to standardize contributions

Tools:

  • Changesets

    • Managing version numbers and changelogs. If the package is published on NPM, I think this is a good idea to include
  • Prettier

    • Formatting for all contributions to avoid 1000 line "trailing comma" git history
  • Eslint

    • Code linting to conform to a general standard. This is going to be very opinionated so we can go back and forth on this one for a bit in PR review
  • Husky

    • Trigger scripts on git actions
  • Lint-Staged

    • Rather than linting the entire project on each commit, only lint the staged folders

I think adding the above is a good step to "open-sourcing" the repo. We can also start to get into some CI/CD actions with each PR triggering a lint action before going to review.

Mantine templating

I tend to use mantine for all my projects, I've got a template based on the mantine next template that's got some pages for next auth too.
How would everyone feel if there was an option for that as an alternative to the base pages and tailwind.

Maybe you could isolate the mantine styles api as an option as well ๐Ÿค”

Adding in templates for a react native monorepo?

Thinking of new features we can push to enhance the cli, one that keeps popping up in discord is the ability to have tRPC in a monorepo with react native.

Should we have an option to emulate a structure like in zart?

option to provide project name as argv

Many CLI's allows you to include your name as a command-line-argument (argv), e.g. npm create-turbo <project_name>. It would be nice to support this too.

  • If name is provided as argv, that should be used and the name-prompt be skipped.
  • If no name is provided, the prompt should be displayed.

Adding TSUP as the compiler/bundler tool

Rather than using tsc to compile the TS to JS, and then running chmods to make sure the build is actually executable, TSUP does all of that and more.

Using esbuild under the hood, TSUP bundles and minifies the codebase, in a fraction of the time that the tsc compile was.

tsc tsup
2.10s .69s
1.76s .67s
1.72s .62s

Additionally, bundling the executable and minifying brings the distributable down to 8kb in total size, which I think will bring some awesome speed to npx create-t3-app for those with slower connection speeds.

LMK what you think. Got the PR tested and ready to go whenever you want it.

next-auth: better env.example

Is your feature request related to a problem? Please describe.
When choosing to use next-auth, the generated .env-example file does not include config values template of things typically used with next-auth, which leads to warnings when running the app.

Describe the solution you'd like
When next-auth is selected, .env-example files should include NEXTAUTH_SECRET= and NEXTAUTH_URL as memos to teach and/or remind users that these need to be set up.

Describe alternatives you've considered
While console warnings such as [next-auth][warn][NEXTAUTH_URL] and [next-auth][warn][NO_SECRET] might be considered a "good enough" alternative, this app already includes required config keys in .env-example for Prisma (even when user does not opt in on Prisma!) and Github.

Better README

I feel like the README for this project can be improved to look better and have more stuff about create-t3-app

`yarn create t3-app` crashes with Node 18 (next-auth or @next-auth/prisma-adapter incompatibility?)

Describe the bug
When running yarn create t3-app with Node 18, it crashes.
I am not the only person with this issue, see: https://github.com/nexxeln/create-t3-app/issues/57#issuecomment-1167801998

ce-personal@ChristophersAir Documents % yarn create t3-app
yarn create v1.22.17
[1/4] ๐Ÿ”  Resolving packages...
[2/4] ๐Ÿšš  Fetching packages...
[3/4] ๐Ÿ”—  Linking dependencies...
warning "create-t3-app > [email protected]" has unmet peer dependency "@babel/preset-env@^7.1.6".
[4/4] ๐Ÿ”จ  Building fresh packages...
success Installed "[email protected]" with binaries:
      - create-t3-app
[######################################################################################################] 265/265Welcome to the create-t3-app !
โœ” What will your project be called? โ€ฆ node-18-crash
โœ” Will you be using JavaScript or TypeScript? โ€บ TypeScript
Good choice! Using TypeScript!
โœ” Would you like to use Tailwind? โ€ฆ No / Yes
โœ” Would you like to use tRPC? โ€ฆ No / Yes
โœ” Would you like to use Prisma? โ€ฆ No / Yes
โœ” Would you like to use Next Auth? โ€ฆ No / Yes
Scaffolding in: /Users/ce-personal/Documents/node-18-crash...
Using: yarn


node-18-crash scaffolded successfully.

Installing packages...
  Installing tailwind...
  Successfully installed tailwind.
  Installing trpc...
  Successfully installed trpc.
  Installing prisma...
  Successfully installed prisma.
  Installing nextAuth...
Error: Command failed: yarn add  next-auth @next-auth/prisma-adapter
error [email protected]: The engine "node" is incompatible with this module. Expected version "^12.19.0 || ^14.15.0 || ^16.13.0". Got "18.4.0"
error Found incompatible module.

    at ChildProcess.exithandler (node:child_process:389:12)
    at ChildProcess.emit (node:events:537:28)
    at maybeClose (node:internal/child_process:1091:16)
    at Socket.<anonymous> (node:internal/child_process:449:11)
    at Socket.emit (node:events:537:28)
    at Pipe.<anonymous> (node:net:747:14) {
  code: 1,
  killed: false,
  signal: null,
  cmd: 'yarn add  next-auth @next-auth/prisma-adapter',
  stdout: 'yarn add v1.22.17\n' +
    '[1/4] Resolving packages...\n' +
    '[2/4] Fetching packages...\n' +
    'info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.\n',
  stderr: 'error [email protected]: The engine "node" is incompatible with this module. Expected version "^12.19.0 || ^14.15.0 || ^16.13.0". Got "18.4.0"\n' +
    'error Found incompatible module.\n'
}
โœจ  Done in 45.85s.

It seems there is an incompatibility between either next-auth or @next-auth/prisma-adapter and node 18?

The app still builds to some extent, and it is possible to run. Here is the console output when running it:

ce-personal@ChristophersAir node-18-crash % yarn dev
yarn run v1.22.17
$ next dev
warn  - Port 3000 is in use, trying 3001 instead.
ready - started server on 0.0.0.0:3001, url: http://localhost:3001

warn - No utility classes were detected in your source files. If this is unexpected, double-check the `content` option in your Tailwind CSS configuration.
warn - https://tailwindcss.com/docs/content-configuration
wait  - compiling...
event - compiled client and server successfully in 914 ms (125 modules)
Attention: Next.js now collects completely anonymous telemetry regarding usage.
This information is used to shape Next.js' roadmap and prioritize features.
You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
https://nextjs.org/telemetry

To Reproduce
Steps to reproduce the behavior:

  1. Install Node 18
  2. yarn create t3-app, choose defaults (yes) for everything

This is on an M1 MacBook Air running MacOS 12, Yarn 1.22.17, Node 18.4.0

Screenshots
This is a screenshot of the app running after the installer crashed.
image

Take the name as an arg

So I was creating a new project with create-t3-app and (like other create-x-apps), I used the project name in the main command itself
image

I think, this should automatically set the project name, so it doesn't have to be asked again

Packages fail to install

Describe the bug
After selecting packages to install it fails and shows this error

Aborting installation...
Error: ENOENT: no such file or directory, lstat 'template/base'

To Reproduce
Steps to reproduce the behavior:

  1. npx create-t3-app@latest
  2. Select any packages
  3. See the error

Expected behavior
Packages should be installed

Screenshots
ss

CLI broke after ESM support

Describe the bug
It broke.
To Reproduce

npx create-t3-app@latest

error:

Object.defineProperty(exports, "__esModule", { value: true });
                      ^

ReferenceError: exports is not defined in ES module scope
This file is being treated as an ES module because it has a '.js' file extension and '/home/shoubhit/.npm/_npx/586e525dab4a761f/node_modules/create-t3-app/package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.

Screenshots
screenshot

Erroneously selects yarn just because I have it installed

I have Yarn installed for mostly react native stuff, for some reason create-t3-app always picks it. Would love to be able to pick between yarn, npm and pnpm, but would be cool with it auto-selecting which I "ran it with" as well

Git fails to innitialize with create t3-app

Describe the bug
When I run the create yarn create t3-app
After choosing my preferred options, the scaffold builds successfully, however during the build, it attempts to initialise git and it fails.
Git can be initialised manually later by running git init after the build

To Reproduce
Steps to reproduce the behaviour:

  • Run yarn create t3-app
  1. See error โœ– Failed: could not initialise git

Expected behaviour
The git initialisation should not fail

Additional information

  • I am on a linux distro i.e Zorin Os
  • I have git installed

Screenshots
t3

feat: run create-t3-app in existing projects to add missing parts

Functionality to run create-t3-app in an existing t3 project to add a missing feature, ie. Next Auth, if it wasn't included in original project init.

Adds to the "only use what is needed" axiom while continuing to use t3 boilerplate when enhancements are required.

Wrong answer, using TypeScript instead...

When choosing, 'Javascript' on the question 'Will you be using JavaScript or TypeScript?', an error of 'Wrong answer, using Typescript instead...' is displayed and 'Typescript' is automatically chosen.

Steps to reproduce the behavior:

  1. npx create-t3-app@latest
  2. Choose desired project name
  3. Select Javascript as being the preferred language.

Expected, the project to be scaffolded in Javascript.

2022-07-05-09-43-21

2022-07-05-09-44-03

Using Macbook Pro M1 Max with node v16.15.1

pretty print title and welcome message

Is your feature request related to a problem? Please describe.
The current welcome message looks a bit like an error. I suggest adjusting the styles to make it more "welcoming".
CleanShot 2022-06-27 at 21 55 39@2x

Describe the solution you'd like
For example, the CLI for initializing a turborepo looks like this:
CleanShot 2022-06-27 at 21 49 53@2x

Describe alternatives you've considered
The chosen styling is absolutely up for debate to fit the t3 theme and the proposed new logo

Doesn't show correct package manager in the install prompt

Describe the bug
While using the cli, in the installation prompt it doesn't say the package manager the user is using, but if you say yes, it actually doesn't use npm and uses the correct package manager.
To Reproduce

  1. Run this pnpm dlx [email protected]
  2. The fourth prompt will say Would you like us to run npm install? instead of pnpm

Expected behavior
It should mention the correct package manager in the prompt.
Screenshots
ss

install each package separately

as discussed in #15, I have started playing around with the thought of having each package installed separately and thus not requiring to build templates for every possible package-combination.

current progress can be found here

feedback is welcome

Paths support in tsconfig

Is your feature request related to a problem? Please describe.
Currently all imports in scaffold are in a shape of ../../server/..something, which makes it clunky and harder to read, in my opinion. I don't really know what others think on this point.

Describe the solution you'd like
Would you accept a PR changing the tsconfig.json in template and respective file to use something like @server/db/..etc instead of ../../server/..etc?

Describe alternatives you've considered
Keep as is if there is a good reason why paths aliases aren't worth the scaffold

What about docker file?

Some devs pref use docker env in local machines. what about to add Docker option with (trpc, tailwind, etc) ?

Updating package.json away from Nexxel Repository

Describe the bug
Right now in current package.json

  "repository": {
    "type": "git",
    "url": "https://github.com/nexxeln/create-t3-app.git"
  },

This needs to be updated to the new url

To Reproduce
Steps to reproduce the behavior:

  1. Run this '...'
  2. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Adding git (and no-install) prompt

Is your feature request related to a problem? Please describe.

  • I noticed when creating a new Astro project that they have prompts for installing dependencies and initializing the git repo. I find this easier than having to remember a flag to provide.

Describe the solution you'd like

  • Adding in prompts similar to the ones below (we currently don't support no-install but eventually we probably should):
    CleanShot 2022-07-06 at 01 18 17

Describe alternatives you've considered

  • We have flags right now but for new users that doesn't know they exist or even old users who just forget to provide them, a prompt seems easier and more intuitive.

project-name can no longer be used to change directory

Describe the bug
It is no longer possible to scaffold your app outside of the CWD due to the CLI's validator.

To Reproduce
Steps to reproduce the behavior:

  1. Run the CLI npx create-t3-app
  2. Under project name, enter a path, e.g. apps/web.
  3. The CLI's validator will warn that the name is not valid, see screenshots below.

Expected behavior
The app should scaffold with the name web under the apps directory.

Screenshots
CleanShot 2022-06-28 at 17 58 40
CleanShot 2022-06-28 at 18 00 39

Test issue

Describe the bug
A very bad bug that will eat you

To Reproduce
First step: Find the bug

  1. Run this '...'
  2. See error

Expected behavior
Bug shouldn't eat you

Screenshots
screenshots of bugs eating me

Layout shifting caused by block's changing size on hover

Describe the bug
When the browser is in full-screened (via F11 or just stretched window at all screen) you can point the mouse to the right corner of the screen
And because tRPC block scales up on hover, scrollbars appear and deactivate hover. And this will be repeated.

To Reproduce

  • Make page/browser to full screen
  • Point your mouse to right-center point

Expected behavior
To have x-paddings for these blocks or do not trigger scrollbar appearing

Screenshots
bug

Add option to overwrite directory when not empty

If I create a project named : new, and this directory already exists but is empty it should proceed with creating the project.

If I create a project named: new, and this directory has file in it it should ask if I want to overwrite and continue

Update package to conform to ESM standards

I feel like this is probably a good idea. Especially as some of the packages we are using have already moved to pure ESM and we need to peg to an older version to continue using them.

Having TSUP #43 already merged makes this a lot easier too.

Thoughts?

Github Actions: TypeScript Coverage Report

I'm following some efforts related to Github Actions (#66, #70) and I would like to know if delivering Actions options is very opinionated? I was thinking that a good option to start with Actions would be to add a TypeScript Coverage Report, agree with T3 Axioms and I believe it is light and not very optative, besides bringing a base to be extended for each users their favorite actions.

Related content:

Add default project name

Enhancement

Add a default project name on prompt so I can just enter and proceed to next step

`yarn create t3-app` crashes (on Yarn 3)

Describe the bug
When running yarn create t3-app and saying yes to everything my M1 mac eventually crashes while trying to install prisma. This has happened twice in a row now. I include M1 because it might be ARM mac specific.

To Reproduce

M1 Macbook Air
Installed through nvm
node 18.4.0
yarn 3.2.1

  1. Run this '...'

yarn create t3-app

Say yes to everything.

Wait

  1. See error

The terminal hung while installing prisma, eventually crashing my whole laptop. The emergency mac Force Quit Applications modal appeared, spinning beachball I closed the terminal, then everything else while my laptop crawled along, then it restarted itself.

I've included the error details I received on restart.

I'll retry this again tomorrow and record a video on my phone.

panic(cpu 0 caller 0xfffffe002eac3a94): userspace watchdog timeout: no successful checkins from WindowServer in 149 seconds
service: logd, total successful checkins since load (1218 seconds ago): 119, last successful checkin: 0 seconds ago
service: WindowServer, total successful checkins since load (1188 seconds ago): 101, last successful checkin: 149 seconds ago
service: opendirectoryd, total successful checkins since load (1218 seconds ago): 118, last successful checkin: 0 seconds ago

Debugger message: panic
Memory ID: 0xff
OS release type: User
OS version: 21F79
Kernel version: Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:29 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T8101
Fileset Kernelcache UUID: 6761FE24D814CDDD6BDA1ADB023146F8
Kernel UUID: B747B891-04EC-3617-95EC-05E037610520
iBoot version: iBoot-7459.121.3
secure boot?: YES
Paniclog version: 13
KernelCache slide: 0x00000000267fc000
KernelCache base:  0xfffffe002d800000
Kernel slide:      0x0000000026fa4000
Kernel text base:  0xfffffe002dfa8000
Kernel text exec slide: 0x000000002708c000
Kernel text exec base:  0xfffffe002e090000
mach_absolute_time: 0x6f651c1f0
Epoch Time:        sec       usec
  Boot    : 0x62b9e73a 0x000c5373
  Sleep   : 0x00000000 0x00000000
  Wake    : 0x00000000 0x00000000
  Calendar: 0x62b9ec13 0x0006859c

Zone info:
  Zone map: 0xfffffe10000b8000 - 0xfffffe30000b8000
  . VM    : 0xfffffe10000b8000 - 0xfffffe14ccd84000
  . RO    : 0xfffffe14ccd84000 - 0xfffffe166671c000
  . GEN0  : 0xfffffe166671c000 - 0xfffffe1b333e8000
  . GEN1  : 0xfffffe1b333e8000 - 0xfffffe20000b4000
  . GEN2  : 0xfffffe20000b4000 - 0xfffffe24ccd80000
  . GEN3  : 0xfffffe24ccd80000 - 0xfffffe2999a4c000
  . DATA  : 0xfffffe2999a4c000 - 0xfffffe30000b8000
  Metadata: 0xfffffe74f7e6c000 - 0xfffffe74ffe6c000
  Bitmaps : 0xfffffe74ffe6c000 - 0xfffffe7502a70000

CORE 0 recently retired instr at 0xfffffe002e2259d4
CORE 1 recently retired instr at 0xfffffe002e226fb0
CORE 2 recently retired instr at 0xfffffe002e226fb0
CORE 3 recently retired instr at 0xfffffe002e226fb0
CORE 4 recently retired instr at 0xfffffe002e226fb4
CORE 5 recently retired instr at 0xfffffe002e226fb4
CORE 6 recently retired instr at 0xfffffe002e226fb4
CORE 7 recently retired instr at 0xfffffe002e226fb4
CORE 0 PVH locks held: None
CORE 1 PVH locks held: None
CORE 2 PVH locks held: None
CORE 3 PVH locks held: None
CORE 4 PVH locks held: None
CORE 5 PVH locks held: None
CORE 6 PVH locks held: None
CORE 7 PVH locks held: None
CORE 0 is the one that panicked. Check the full backtrace for details.
CORE 1: PC=0xfffffe002e1d43a4, LR=0xfffffe002e1d3ba8, FP=0xfffffe750c56bd10
CORE 2: PC=0xfffffe002e21c628, LR=0xfffffe002e21c3cc, FP=0xfffffe750dcabe20
CORE 3: PC=0x00000001046cc2e0, LR=0x00000001046ccce4, FP=0x000000016b73d930
CORE 4: PC=0xfffffe002e11e9e0, LR=0xfffffe002e11e9dc, FP=0xfffffe750c82bf00
CORE 5: PC=0xfffffe002e11e9e0, LR=0xfffffe002e11e9dc, FP=0xfffffe750cdcbf00
CORE 6: PC=0xfffffe002e11e9e0, LR=0xfffffe002e11e9dc, FP=0xfffffe750d1fbf00
CORE 7: PC=0xfffffe002e11e9dc, LR=0xfffffe002e11e9dc, FP=0xfffffe750c52bf00
Compressor Info: 101% of compressed pages limit (BAD) and 67% of segments limit (OK) with 38 swapfiles and OK swap space
Total cpu_usage: 102156909
Thread task pri cpu_usage
0xfffffe1ffec5f1c0 watchdogd 97 4067
0xfffffe1fffff31c0 kernel_task 91 3051756
0xfffffe1fffa1e8a0 kernel_task 91 3050345
0xfffffe1fff028100 thermalmonitord 37 15853
0xfffffe1ffef370c0 watchdogd 31 20852

Panicked task 0xfffffe1b33452108: 23 pages, 4 threads: pid 308: watchdogd
Panicked thread: 0xfffffe1ffec5f1c0, backtrace: 0xfffffe750c7fb170, tid: 3024
		  lr: 0xfffffe002e0e9100  fp: 0xfffffe750c7fb1e0
		  lr: 0xfffffe002e0e8dc8  fp: 0xfffffe750c7fb250
		  lr: 0xfffffe002e22d5c8  fp: 0xfffffe750c7fb270
		  lr: 0xfffffe002e21f878  fp: 0xfffffe750c7fb2e0
		  lr: 0xfffffe002e21d524  fp: 0xfffffe750c7fb3a0
		  lr: 0xfffffe002e0977f8  fp: 0xfffffe750c7fb3b0
		  lr: 0xfffffe002e0e8a50  fp: 0xfffffe750c7fb750
		  lr: 0xfffffe002e0e8a50  fp: 0xfffffe750c7fb7c0
		  lr: 0xfffffe002e90e5d4  fp: 0xfffffe750c7fb7e0
		  lr: 0xfffffe002eac3a94  fp: 0xfffffe750c7fb800
		  lr: 0xfffffe002eac3258  fp: 0xfffffe750c7fb820
		  lr: 0xfffffe002eac1d30  fp: 0xfffffe750c7fb940
		  lr: 0xfffffe002e86e390  fp: 0xfffffe750c7fbad0
		  lr: 0xfffffe002e1ed880  fp: 0xfffffe750c7fbbf0
		  lr: 0xfffffe002e0ef538  fp: 0xfffffe750c7fbc90
		  lr: 0xfffffe002e0c11fc  fp: 0xfffffe750c7fbcf0
		  lr: 0xfffffe002e0dc258  fp: 0xfffffe750c7fbd80
		  lr: 0xfffffe002e212994  fp: 0xfffffe750c7fbe50
		  lr: 0xfffffe002e21d8b4  fp: 0xfffffe750c7fbf10
		  lr: 0xfffffe002e0977f8  fp: 0xfffffe750c7fbf20
      Kernel Extensions in backtrace:
         com.apple.driver.AppleARMWatchdogTimer(1.0)[9E823012-9D79-3DE0-BF0B-8C290E00CA6D]@0xfffffe002eabf450->0xfffffe002eac3f33
            dependency: com.apple.driver.AppleARMPlatform(1.0.2)[12D5CDCA-8B0E-3783-8FEC-D4761DA26B1E]@0xfffffe002ea74db0->0xfffffe002eabf44b

last started kext at 908871355: com.apple.driver.driverkit.serial	6.0.0 (addr 0xfffffe002de80510, size 3416)
loaded kexts:
com.apple.filesystems.autofs	3.0
com.apple.driver.AppleTopCaseHIDEventDriver	5450.8
com.apple.driver.AppleBiometricServices	1
com.apple.driver.CoreKDL	1
com.apple.driver.AppleALSColorSensor	1.0.0d1
com.apple.driver.AppleAOPVoiceTrigger	140.1
com.apple.driver.DiskImages.ReadWriteDiskImage	493.0.0
com.apple.driver.DiskImages.UDIFDiskImage	493.0.0
com.apple.driver.DiskImages.RAMBackingStore	493.0.0
com.apple.driver.DiskImages.FileBackingStore	493.0.0
com.apple.driver.BCMWLANFirmware4378.Hashstore	1
com.apple.driver.SEPHibernation	1
com.apple.driver.AppleThunderboltIP	4.0.3
com.apple.driver.AppleUSBDeviceNCM	5.0.0
com.apple.driver.AppleSmartBatteryManager	161.0.0
com.apple.driver.AppleFileSystemDriver	3.0.1
com.apple.nke.l2tp	1.9
com.apple.filesystems.tmpfs	1
com.apple.AppleEmbeddedSimpleSPINORFlasher	1
com.apple.filesystems.lifs	1
com.apple.filesystems.apfs	1934.121.2
com.apple.IOTextEncryptionFamily	1.0.0
com.apple.filesystems.hfs.kext	583.100.10
com.apple.security.BootPolicy	1
com.apple.BootCache	40
com.apple.AppleFSCompression.AppleFSCompressionTypeZlib	1.0.0
com.apple.AppleFSCompression.AppleFSCompressionTypeDataless	1.0.0d1
com.apple.driver.AppleSmartIO2	1
com.apple.driver.ApplePMP	1
com.apple.driver.AppleCS42L83Audio	550.3
com.apple.driver.ApplePMPFirmware	1
com.apple.driver.AppleSPMIPMU	1.0.1
com.apple.driver.AppleTAS5770LAmp	550.3
com.apple.driver.AppleDPDisplayTCON	1
com.apple.driver.AppleAVE2	550.16.0
com.apple.driver.AppleMobileDispH13G-DCP	140.0
com.apple.driver.AppleT8020SOCTuner	1
com.apple.driver.AppleT8103CLPCv3	1
com.apple.driver.AppleAVD	564
com.apple.driver.AppleJPEGDriver	4.8.1
com.apple.AGXG13G	190.20
com.apple.driver.AudioDMAController-T8103	150.1
com.apple.driver.usb.AppleSynopsysUSB40XHCI	1
com.apple.driver.AppleSerialShim	1
com.apple.driver.AppleEventLogHandler	1
com.apple.driver.AppleS5L8960XNCO	1
com.apple.driver.AppleT8103PMGR	1
com.apple.driver.AppleS8000AES	1
com.apple.driver.AppleS8000DWI	1.0.0d1
com.apple.driver.AppleInterruptController	1.0.0d1
com.apple.driver.AppleT8020DART	1
com.apple.driver.AppleBluetoothModule	1
com.apple.driver.AppleSamsungSerial	1.0.0d1
com.apple.driver.AppleBCMWLANBusInterfacePCIe	1
com.apple.driver.AppleS5L8920XPWM	1.0.0d1
com.apple.driver.AppleS5L8940XI2C	1.0.0d2
com.apple.driver.AppleSPIMC	1
com.apple.driver.AppleT8101	1
com.apple.driver.AppleM68Buttons	1.0.0d1
com.apple.iokit.IOUserEthernet	1.0.1
com.apple.driver.usb.AppleUSBUserHCI	1
com.apple.iokit.IOKitRegistryCompatibility	1
com.apple.iokit.EndpointSecurity	1
com.apple.driver.AppleDiskImages2	126.100.13
com.apple.AppleSystemPolicy	2.0.0
com.apple.nke.applicationfirewall	402
com.apple.kec.InvalidateHmac	1
com.apple.kec.AppleEncryptedArchive	1
com.apple.driver.driverkit.serial	6.0.0
com.apple.kext.triggers	1.0
com.apple.iokit.IOAVBFamily	1040.6
com.apple.plugin.IOgPTPPlugin	1040.3
com.apple.iokit.IOEthernetAVBController	1.1.0
com.apple.driver.AppleHIDKeyboard	228.2
com.apple.driver.AppleHSBluetoothDriver	5450.8
com.apple.driver.IOBluetoothHIDDriver	9.0.0
com.apple.driver.AppleActuatorDriver	5450.14
com.apple.driver.AppleMultitouchDriver	5450.14
com.apple.driver.AppleMesaSEPDriver	100.99
com.apple.iokit.IOBiometricFamily	1
com.apple.driver.AppleAOPAudio	150.2
com.apple.driver.DiskImages.KernelBacked	493.0.0
com.apple.driver.AppleSEPHDCPManager	1.0.1
com.apple.driver.AppleTrustedAccessory	1
com.apple.iokit.AppleSEPGenericTransfer	1
com.apple.driver.AppleXsanScheme	3
com.apple.driver.usb.networking	5.0.0
com.apple.driver.AppleBTM	1.0.1
com.apple.driver.AppleThunderboltUSBDownAdapter	1.0.4
com.apple.driver.AppleThunderboltPCIDownAdapter	4.1.1
com.apple.driver.AppleThunderboltDPInAdapter	8.5.1
com.apple.driver.AppleThunderboltDPAdapterFamily	8.5.1
com.apple.driver.AppleConvergedIPCOLYBTControl	1
com.apple.driver.AppleConvergedPCI	1
com.apple.driver.AppleBluetoothDebug	1
com.apple.driver.AppleHIDTransportSPI	5450.4
com.apple.driver.AppleHIDTransport	5450.4
com.apple.driver.AppleInputDeviceSupport	5450.4
com.apple.driver.AppleDCPDPTXProxy	1.0.0
com.apple.nke.ppp	1.9
com.apple.driver.DCPDPFamilyProxy	1
com.apple.driver.AppleSPU	1
com.apple.driver.AppleBSDKextStarter	3
com.apple.driver.AppleDiagnosticDataAccessReadOnly	1.0.0
com.apple.filesystems.hfs.encodings.kext	1
com.apple.iokit.IONVMeFamily	2.1.0
com.apple.driver.AppleNANDConfigAccess	1.0.0
com.apple.AGXFirmwareKextG13GRTBuddy	190.20
com.apple.AGXFirmwareKextRTBuddy64	190.20
com.apple.driver.AppleCSEmbeddedAudio	550.3
com.apple.driver.AppleDialogPMU	1.0.1
com.apple.driver.AppleStockholmControl	1.0.0
com.apple.driver.AppleHPM	3.4.4
com.apple.driver.AppleEmbeddedAudio	550.3
com.apple.iokit.AppleARMIISAudio	140.2
com.apple.driver.DCPAVFamilyProxy	1
com.apple.driver.AppleSPMI	1.0.1
com.apple.iokit.IOMobileGraphicsFamily-DCP	343.0.0
com.apple.iokit.IOMobileGraphicsFamily	343.0.0
com.apple.driver.AppleDCP	1
com.apple.driver.AppleFirmwareKit	1
com.apple.driver.ApplePassthroughPPM	3.0
com.apple.driver.AppleSART	1
com.apple.driver.AppleH13CameraInterface	6.51.1
com.apple.driver.AppleH10PearlCameraInterface	17.0.6
com.apple.driver.AppleH11ANEInterface	5.65.2
com.apple.iokit.IOGPUFamily	35.29
com.apple.driver.AppleUSBXDCIARM	1.0
com.apple.driver.AppleUSBXDCI	1.0
com.apple.iokit.IOUSBDeviceFamily	2.0.0
com.apple.driver.usb.AppleSynopsysUSBXHCI	1
com.apple.driver.usb.AppleUSBXHCI	1.2
com.apple.driver.AppleEmbeddedUSBHost	1
com.apple.driver.usb.AppleUSBHub	1.2
com.apple.driver.usb.AppleUSBHostCompositeDevice	1.2
com.apple.driver.AppleT8103TypeCPhy	1
com.apple.driver.ApplePMGR	1
com.apple.driver.AppleARMWatchdogTimer	1
com.apple.driver.usb.AppleUSBHostPacketFilter	1.0
com.apple.driver.AppleDisplayCrossbar	1.0.0
com.apple.iokit.IODisplayPortFamily	1.0.0
com.apple.driver.AppleTypeCPhy	1
com.apple.driver.AppleThunderboltNHI	7.2.81
com.apple.driver.AppleT8103PCIeC	1
com.apple.iokit.IOThunderboltFamily	9.3.3
com.apple.driver.ApplePIODMA	1
com.apple.driver.AppleT8103PCIe	1
com.apple.driver.AppleMultiFunctionManager	1
com.apple.driver.AppleBluetoothDebugService	1
com.apple.driver.AppleBCMWLANCore	1.0.0
com.apple.iokit.IO80211Family	1200.12.2b2
com.apple.driver.IOImageLoader	1.0.0
com.apple.driver.AppleOLYHAL	1
com.apple.driver.corecapture	1.0.4
com.apple.driver.AppleEmbeddedPCIE	1
com.apple.driver.AppleMCA2-T8103	640.5
com.apple.driver.AppleEmbeddedAudioLibs	140.1
com.apple.driver.AppleFirmwareUpdateKext	1
com.apple.driver.AppleGPIOICController	1.0.2
com.apple.driver.AppleFireStormErrorHandler	1
com.apple.driver.AppleMobileApNonce	1
com.apple.iokit.IOTimeSyncFamily	1040.3
com.apple.driver.DiskImages	493.0.0
com.apple.iokit.IOGraphicsFamily	597
com.apple.iokit.IOBluetoothSerialManager	9.0.0
com.apple.iokit.IOBluetoothHostControllerUSBTransport	9.0.0
com.apple.iokit.IOBluetoothHostControllerUARTTransport	9.0.0
com.apple.iokit.IOBluetoothHostControllerTransport	9.0.0
com.apple.driver.IOBluetoothHostControllerPCIeTransport	9.0.0
com.apple.iokit.IOBluetoothFamily	9.0.0
com.apple.driver.FairPlayIOKit	68.16.0
com.apple.iokit.CSRBluetoothHostControllerUSBTransport	9.0.0
com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport	9.0.0
com.apple.driver.AppleSSE	1.0
com.apple.driver.AppleSEPKeyStore	2
com.apple.driver.AppleUSBTDM	533.120.2
com.apple.iokit.IOUSBMassStorageDriver	210.120.3
com.apple.iokit.IOPCIFamily	2.9
com.apple.iokit.IOSCSIBlockCommandsDevice	456.121.3
com.apple.iokit.IOSCSIArchitectureModelFamily	456.121.3
com.apple.driver.AppleIPAppender	1.0
com.apple.driver.AppleFDEKeyStore	28.30
com.apple.driver.AppleEffaceableStorage	1.0
com.apple.driver.AppleCredentialManager	1.0
com.apple.driver.KernelRelayHost	1
com.apple.iokit.IOUSBHostFamily	1.2
com.apple.driver.AppleUSBHostMergeProperties	1.2
com.apple.driver.usb.AppleUSBCommon	1.0
com.apple.driver.AppleSMC	3.1.9
com.apple.driver.RTBuddy	1.0.0
com.apple.driver.AppleEmbeddedTempSensor	1.0.0
com.apple.driver.AppleARMPMU	1.0
com.apple.iokit.IOAccessoryManager	1.0.0
com.apple.driver.AppleOnboardSerial	1.0
com.apple.iokit.IOSkywalkFamily	1.0
com.apple.driver.mDNSOffloadUserClient	1.0.1b8
com.apple.iokit.IONetworkingFamily	3.4
com.apple.iokit.IOSerialFamily	11
com.apple.driver.AppleSEPManager	1.0.1
com.apple.driver.AppleA7IOP	1.0.2
com.apple.driver.IOSlaveProcessor	1
com.apple.driver.AppleBiometricSensor	2
com.apple.iokit.IOHIDFamily	2.0.0
com.apple.iokit.CoreAnalyticsFamily	1
com.apple.AUC	1.0
com.apple.iokit.IOAVFamily	1.0.0
com.apple.iokit.IOHDCPFamily	1.0.0
com.apple.iokit.IOCECFamily	1
com.apple.iokit.IOAudio2Family	1.0
com.apple.driver.AppleIISController	140.1
com.apple.driver.AppleAudioClockLibs	140.1
com.apple.driver.AppleM2ScalerCSCDriver	265.0.0
com.apple.iokit.IOSurface	302.14
com.apple.driver.IODARTFamily	1
com.apple.security.quarantine	4
com.apple.security.sandbox	300.0
com.apple.kext.AppleMatch	1.0.0d1
com.apple.driver.AppleMobileFileIntegrity	1.0.5
com.apple.security.AppleImage4	4.2.0
com.apple.kext.CoreTrust	1
com.apple.iokit.IOCryptoAcceleratorFamily	1.0.1
com.apple.driver.AppleARMPlatform	1.0.2
com.apple.iokit.IOStorageFamily	2.1
com.apple.iokit.IOSlowAdaptiveClockingFamily	1.0.0
com.apple.iokit.IOReportFamily	47
com.apple.kec.pthread	1
com.apple.kec.Libm	1
com.apple.kec.corecrypto	12.0



** Stackshot Succeeded ** Bytes Traced 1320529 (Uncompressed 3900192) **

React Redux and Redux Toolkit

So, in my opinion, according to a guy who only uses tailwind option, t3 is unnecessary for me. So I think that redux boilerplate could be a good idea as an new option

Consider setting tabWidth option in .prettierrc

Is your feature request related to a problem? Please describe.

  • The project does not have a default tabWidth setting in the .prettierrc file, which appears to allow for a local user's indentation settings to override the in-place indentation when editing files.
  • This override behaviour is annoying when contributing because conveniences such as "format on save" will run using my editor's default settings (i.e. in VS Code) which causes other lines to be formatted even though I'm only change one line.

Describe the solution you'd like
I surmise that adding "tabWidth": <some preferred project value> (see configuration here) would alleviate this annoyance.

Describe alternatives you've considered
Alternative solutions would also include creating a .vscode folder in the project root and setting indentation there, but that would not affect users who contribute through Vim, Neovim, Sublime, etc.

Add Options for Tailwind Plugins

I love tailwind but I am not a fan of full react component style libraries. Tailwind plugins are the perfect middle ground. (DaisyUI etc)

A lot of tiny big wins

Table of contents

Background

I'm the creator of tRPC and Internet-friend of @theobr.

https://twitter.com/alexdotjs/status/1545036195331055616

I've been maintaining this repo for over a year and I've kept updating it with many tiny big details over time which represents how I do things in production.

Areas of improvements

Safe environment variables

Environment variables should be validated when a project is built. Having the wrong env vars is a very common production issue that is hellish as you usually don't notice it straight-away. It's better to just crash the build if something's wrong.

Zod to the rescue!

Type-safety

You can have next.config.js typesafe.

https://github.com/trpc/examples-next-prisma-starter/blob/main/next.config.js

If you use publicRuntimeConfig, you can have that inferred in a typesafe manner: https://github.com/trpc/examples-next-prisma-starter/blob/main/src/utils/publicRuntimeConfig.ts

Continuous Integration

It's very time consuming to setup CI with a proper DB, Playwright, testing, build, etc. Most production projects need it.

See https://github.com/trpc/examples-next-prisma-starter/blob/main/.github/workflows/main.yml

E2E testing

Playwright is amazing.

Note that this and next one is pointless if you don't also setup CI.

Integration testing

Note: I hate unit testing & I would never propose using that anywhere, however....

... testing your API is nice. And a lot quicker to write tests around that than it is to write 10 different E2E tests for all the edge-cases.

This uses a real database and your actual API boundary to test things.

Example:

https://github.com/trpc/examples-next-prisma-starter/blob/main/src/server/routers/post.test.ts

Relevant files:

Scripts

  • Shortcuts for nuking your DB, etc. I'm lazy and I don't wanna remember / go to Prisma docs every time I use a command.
  • Migrate DB automatically as part of build
  • Seed scripts:
    • One seed script for production that has your "fixtures" in your DB, stuff you always want in your app regardless of env
    • One seed script for Prisma in development to quickly bootstrap an environment
  • clean script to remove ./next, clear jest, etc

https://github.com/trpc/trpc/blob/04c3330e4c05a4a22e8e098a0c7a2ae4b4f7c282/examples/next-prisma-starter/package.json#L6-L23

VSCode extensions and settings

Prompts you to install things when you open the folder in VSCode.

tRPC inference helpers

https://github.com/trpc/examples-next-prisma-starter/blob/a07a8d1bd1ed4a9af4fd7cd6130ee92383082419/src/utils/trpc.ts#L34-L48

Describe alternatives you've considered

Using my own starter project. I'll probably continue to do so, but I'd still like to see some more cherries taken from it.

Ending notes

Do whatever you want with this, feel free to write in the #help-channel on https://trpc.io/discord if something is confusing. My GitHub notifications are very noisy so it's likely I'll miss it if you @ me here.

Add console log telling me where i'm scaffolding

Enhancement:

Add a log telling me where im scaffolding

if I create a new project named: test-project in /workspace

Return before "using: yarn" :

"Scaffolding in /Users/John/workspace/test-project"

Next-auth 'secret' key missing

Next-auth 'secret' key missing.
Whenever you start a t3 application with next-auth and start it up, in development it will keep yelling in console that you're missing a 'secret' key.

Solution
I thought it might be possible to generate a 504-bit WPA Key or something during build time and just built it into the config or .env file? What do you think

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.