pax-react-native-starter icon indicating copy to clipboard operation
pax-react-native-starter copied to clipboard

Set up this repo as a real app

Open pax-k opened this issue 2 years ago • 3 comments

Some CI/CD flows fail because I haven't configured the necessary secrets for Expo and Chromatic. This isn't the goal of this starter, as it's expected from people who fork this repo to do this themselves in their own repos. But to prove that everything works as described in the docs, I should create Expo & Chromatic demo projects and treat this repo as a real app. This way, all CI/CD flows can be demonstrated correctly (green checkmarks, release tags, everybody happy).

pax-k avatar Mar 08 '23 07:03 pax-k

Publishing it to NPM could also be an idea, since people seem to like to install things that way, and you can track downloads. https://moiva.io/?npm=@sourcetoad/tamagui-react-native+create-t3-app&github=chamatt/create-kaol-app+chen-rn/cua+ebg1223/create-t3-turbolito+lunatiquecoder/luna+pax-k/pax-react-native-starter+t3-oss/create-t3-turbo (repos are from the overview I've gathered here: https://dev.to/this-is-learning/the-different-strategies-to-building-a-cross-platform-app-3p56 )

redbar0n avatar Mar 08 '23 14:03 redbar0n

Hey @redbar0n! Thanks for your feedback! Actually you have a pretty good idea. I could even offer something like 'npm create pax-starter', same way Tamagui or T3 does https://create.t3.gg/

I will take a look and hope to push it over the weekend 🍻

Do you feel you need something specific for this CLI scaffolding tool?

Regarding the article, I read it before starting working on this project ✌🏻 Came to the conclusion that Expo + Tamagui + RNW is a good pick. What's you take on this?

create-t3-turbo is also a strong stack. I'm thinking how to implement supabase + trpc + prisma in my stack also (including ci/cd)

To be honest I would ask the user to pick between native, web, or cross-platform (both). This requires separate templates, but i'll do the work

pax-k avatar Mar 08 '23 18:03 pax-k

Hey @redbar0n! Thanks for your feedback! Actually you have a pretty good idea. I could even offer something like 'npm create pax-starter', same way Tamagui or T3 does https://create.t3.gg/

Nice :D I'm glad to have been of help.

I will take a look and hope to push it over the weekend 🍻

Awesome! No need to rush for my part, though.

Do you feel you need something specific for this CLI scaffolding tool?

No, can't think of anything. I'm not in the market at the moment. Just keeping tabs on the options, and throwing out hopefully helpful suggestions where I can.

Regarding the article, I read it before starting working on this project ✌🏻

Oh cool! I'm glad it reached some. I felt it didn't get a lot of exposure/traction. Where did you come across it? My guess is in the Discord chat for Tamagui?

Came to the conclusion that Expo + Tamagui + RNW is a good pick. What's you take on this?

Yeah, it is also my recommendation, as mentioned in the article. PS: Tamagui doesn't depend on RNW any longer, but supersedes it (while staying compatible with its API surface). Since it does some things at compile time what RNW would do at runtime, from what I've understood.

My current favorite starter repo with that tech is create-universal-app but I'd favor some modifications to it. First and foremost around auth (where Zitadel with Passkey/FIDO2 login would be the ideal cross-platform and future-oriented auth solution, according to my research).

In the future, when vite-plugin-ssr (aka. Vike) lands it's V1 design, then I'd be keen on a setup that uses that instead of NextJS, since it would be based on Vite instead of Webpack and give more architectural control (like for i18n and modularity in general). I know Nate of Tamagui is also keen on that, and has done some promising experiments to that effect. But for now NextJS is probably the safest bet.

create-t3-turbo is also a strong stack. I'm thinking how to implement supabase + trpc + prisma in my stack also (including ci/cd)

Yeah, it's a very popular alternative. But I'm excited about Garph + garph/gqty instead of tRPC, because it works similarly, but you then "get a GraphQL API for free".

Also see Theo's recent criticism of Prisma. I'd consider EdgeDB instead of an ORM like Prisma, to skip the translation layer (and potential impedance mismatch) in the code, for performance. Or Kysely and kysely-planetscale, like Theo mentions. Not sure what's best for Supabase, but Prisma is proven tech, so if you already know it it's probably fine to use.

To be honest I would ask the user to pick between native, web, or cross-platform (both). This requires separate templates, but i'll do the work

If your goal is to give a web development experience, even for native, then maybe it is just as well to focus on cross-platform, alternatively give people the option to eject if they need native-only. But if they know that they are going native-only from the start, then maybe they wouldn't / shouldn't use this starter repo in the first place.

In all, I can see you've put a lot of work and effort into this starter repo! 👏 I've already added it to my article, and summarised it as:

pax-react-native-starter is a monorepo that in addition to the aforementioned tech, also has Storybook, Jest, and Turborepo integration set up. It aims to give you a rapid web development workflow even when developing for React Native: build features using a browser, deploy to Chromatic/Storybook for review by team members, and CI/CD deploy with Github Actions and Expo EAS.

Feel free to suggest further important points of differentiation.

One suggestion could be to mention something in the Readme about the things you didn't add to this starter repo, and why, like auth, for instance.

redbar0n avatar Mar 09 '23 14:03 redbar0n