Skip to content

⚛️💻📱Typesafe setup to build fullstack expo universal native apps

License

Notifications You must be signed in to change notification settings

bidah/uni-stack

Repository files navigation

typesafe setup to build fullstack expo universal native apps.


Usage

Starter installation

Create a new project with option to select your prefered UI library with:

npx create-uni-app

Set .env file

Rename .env.sample to .env

mv .env.sample .env

Configure your Prisma Client

⚠️ you will get a TypeError: ExpoResponse is not a constructor error if you don't do this before running the server

npm run prisma:generate

Run web app and API

npm run web

This spins up the web app with expo router API routes

Run native apps

In a separate terminal run

npm run start

In the same window hit I in your keyboard to launch IOS simulator or A for Android emulator

Tech stack

  • Expo v50
  • Typescript v5
  • Prisma v5.9
  • tRPC v11
  • Expo Router v3
  • UI
    • Nativewind v4
    • Tamagui
    • gluestack-ui
  • SQLite database

Prisma

SQLite database comes with two tables users, and posts for you to try out the setup.

To generate and instantiate Prisma Client run:

npm run prisma:generate

The db push command pushes the state of your Prisma schema file to the database without using migrations.

npm run prisma:push

Explore and manipulate your data with a web UI

npm run prisma:studio

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

About Author

Rodrigo Figueroa

Follow Rodrigo Figueroa, creator of uni-stack for updates on the project and universal app development on x/twitter

Credits

  • Nader Dabit for RN-AI and using it's CLI setup as a template to build uni-stack CLI.
  • Nishan for expo-trpc starter that served as inspiration to build this setup.
  • Nate Birdman from Tamagui for testing this modified version of the Tamagui Expo Router starter and fixing various issues.
  • Sanket Sahu from Gluestack for being the first to join the conversation about the project and offer his support.

License

MIT

About

⚛️💻📱Typesafe setup to build fullstack expo universal native apps

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published