Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(RFC): sync example apps to separate repos #1126

Closed
juliusmarminge opened this issue Jan 26, 2023 · 13 comments
Closed

feat(RFC): sync example apps to separate repos #1126

juliusmarminge opened this issue Jan 26, 2023 · 13 comments
Labels
📌 area: ci Relates to CI / GitHub Actions 🌟 enhancement New feature or request 👨‍👦‍👦free for all Anyone is free to take on this issue and file a PR 💬 discussion Issue needs further discussion before decision

Comments

@juliusmarminge
Copy link
Member

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

Currently, we have https://t3.new which opens a fresh t3-app in Codesandbox - but it doesn't sync up to new releases.

I'm thinking we could build some apps automatically on each release that would then be subtree'd down to separate repos which could then be forked on CodeSandbox / Stackblitz. It would also make it quite easy to browse how a t3-app looks without needing to run the CLI.

Describe the solution you'd like to see

I think we'd need to have each app in the main monorepo workspace like examples/* and then when we publish new releases, git subtree them down to separate repos so that they are kept up to date.

tRPC does something similar:
Workspace: https://github.com/trpc/trpc/tree/main/examples/next-minimal-starter
Subtree workflow: https://github.com/trpc/trpc/blob/main/.github/workflows/subtree.yml
Repo: https://github.com/trpc/examples-next-minimal-starter

Then, we could update the https://t3.new to accept some query params for what packages you would like to use and it would launch that repo in CodeSandbox/Stackblitz accordingly:

  • https://t3.new?prisma&next-auth
  • https://t3.new?prisma&trpc&tailwind
  • etc...

Describe alternate solutions

Technically, we wouldn't need both example workspaces and separate repos - but I'm unsure how to do one without the other? We could only do workspace and launch Stackblitz from the example/* directory - although then they wouldn't have lockfiles which would cause long installation times 🤔

Open to suggestions on the implementation.

Additional information

I think we can switch to Stackblitz since the swc issue seems to be fixed there now.

@juliusmarminge juliusmarminge added 🌟 enhancement New feature or request 💬 discussion Issue needs further discussion before decision 👨‍👦‍👦free for all Anyone is free to take on this issue and file a PR 📌 area: ci Relates to CI / GitHub Actions labels Jan 26, 2023
@harshsinghatz
Copy link

For this we would first have to create different repos for all the individual repositories and then we can git subtree them down right?
Have we created them yet or is it yet to be created?

@juliusmarminge
Copy link
Member Author

juliusmarminge commented Feb 19, 2023

For this we would first have to create different repos for all the individual repositories and then we can git subtree them down right? Have we created them yet or is it yet to be created?

Nope - haven't created them yet but that can be done if someone takes a stab at it

@harshsinghatz
Copy link

I can pick this but repos should be created as i won't have the access to that!

@juliusmarminge
Copy link
Member Author

I can pick this but repos should be created as i won't have the access to that!

Lets try first with just having them in the monorepo and see if we need separate repos for them later?

@harshsinghatz
Copy link

Sure

@mqshaikh8
Copy link
Contributor

mqshaikh8 commented Aug 29, 2023

Hey y'all,
Are you(@harshsinghatz ) taking care of this? I would love to try to work on this too. @juliusmarminge

@c-ehrlich
Copy link
Member

this is from half a year ago, so feel free to pick it up.

@mqshaikh8
Copy link
Contributor

Hey @juliusmarminge ,
I created a repo with some examples, Do we want people to have access to the code? I was thinking of making an app that could push people to something like stackblitz so people can have access to the code? Let me know what you think

https://github.com/mqshaikh8/t3_examples

@juliusmarminge
Copy link
Member Author

juliusmarminge commented Sep 6, 2023

The initial plan was probably to have them generated inside the repo which would allow us to easily share stackblitz links like https://stackblitz.com/github/t3-oss/create-t3-app/tree/main/examples/with-drizzle-trpc-tailwind or something

@mqshaikh8
Copy link
Contributor

I just wanted to kind of generate a a sample, I am going to fork the repo and create those examples there.

@mqshaikh8
Copy link
Contributor

Hi @juliusmarminge,
I created a pull request with the examples. Let me know if there is something I should change. (sorry if the pr is weird, This is my first open source pr)
#1573

@mqshaikh8
Copy link
Contributor

Hi @juliusmarminge,
I created a pull request with the examples. It lets people pick the different combinations and view them on stackblitz.
#1576

@mqshaikh8
Copy link
Contributor

mqshaikh8 commented Oct 15, 2023

Should I close this? I am not sure what the process is @juliusmarminge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📌 area: ci Relates to CI / GitHub Actions 🌟 enhancement New feature or request 👨‍👦‍👦free for all Anyone is free to take on this issue and file a PR 💬 discussion Issue needs further discussion before decision
Projects
None yet
Development

No branches or pull requests

4 participants