create-t3-app icon indicating copy to clipboard operation
create-t3-app copied to clipboard

feat!: new folder structure

Open juliusmarminge opened this issue 2 years ago • 6 comments

Ref: https://github.com/t3dotgg/rewire-t3-app/pull/2

also restructured internally so the adding are now structured like a mirror of the generated project, instead of being grouped all in one per dep

TODO: Edit https://create.t3.gg/en/folder-structure

juliusmarminge avatar Dec 06 '22 21:12 juliusmarminge

🦋 Changeset detected

Latest commit: 0f503deae0d7802aede970fa3f6cc87708418197

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
create-t3-app Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

changeset-bot[bot] avatar Dec 06 '22 21:12 changeset-bot[bot]

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
create-t3-app ⬜️ Ignored (Inspect) Jan 2, 2023 at 7:07PM (UTC)

vercel[bot] avatar Dec 06 '22 21:12 vercel[bot]

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟢 Performance 100
🟢 Accessibility 100
🟢 Best practices 100
🟠 SEO 86
🟠 PWA 54

Lighthouse ran on https://create-t3-app-git-folder-structure-t3-oss.vercel.app/

github-actions[bot] avatar Dec 06 '22 21:12 github-actions[bot]

A new create-t3-app prerelease is available for testing. You can install this latest build in your project with:

npx [email protected]

github-actions[bot] avatar Dec 06 '22 22:12 github-actions[bot]

Love this

My bad on the old comment for the private procedure, rewrite:


/**
 * Protected (authed) procedure
 *
 * If you want a query or mutation to ONLY be accessible to logged in users, use
 * this. It verifies the session is valid and guarantees ctx.session.user is not
 * null
 *
 * @see https://trpc.io/docs/procedures
 */
export const protectedProcedure = t.procedure.use(enforceUserIsAuthed);


t3dotgg avatar Dec 06 '22 22:12 t3dotgg

I posted this reply on theo's repo early today and just noticed this pull request on the ct3a repo. Just an observation based on my own experience modifying the t3 folder structure

Do you think it would be too much tree shaking to move db.ts and auth.ts to a new folder (utils or something) and remove the api/? 

server/
    utils/   other name?
        db.ts
        auth.ts
    routes/
        auth.ts
        example.ts
    root.ts
    trpc.ts

I always make this change to all my T3 scaffolded apps because I want server/ to focus on my api routes and have everything else as a complement. Your server is t3-focused in this approach, and if your utils/ folder is too complex, it's good advice to use a monorepo because you may have multiple packages inside. 

Originally posted by @LucasAlda in https://github.com/t3dotgg/rewire-t3-app/issues/2#issuecomment-1341418521

LucasAlda avatar Dec 08 '22 04:12 LucasAlda

Purely out of curiosity, when do you think this proposal might land in main, if at all?

bai avatar Dec 19 '22 15:12 bai

Purely out of curiosity, when do you think this proposal might land in main, if at all?

Might push it out during the holidays

juliusmarminge avatar Dec 21 '22 19:12 juliusmarminge