Skip to content

theodo-group/universal-app

Repository files navigation

create-universal-app

✨ Enabler repo to start a typesafe, universal Expo & Next.js app ✨

Get started with the by running npx create-universal-enabler-app my-app

And just like that, you now have an Expo + Next.js app that is styled with Tailwind CSS.

🍔 The Create Universal App Stack

The Create Universal App Stack is a universal web and native stack made by Theodo UK focused on developer experience, rapid development, and performance.

The core stack

  • Expo 50 for apps & TV.
  • NextJS 14 (With React Native Web components) for web.
  • Solito for shared navigation logic.
  • NativeWind for shared styling.
  • Turborepo monorepo to handle building our packages.

Enabler uses Next.js   Enabler uses Expo   Enabler is written in TypeScript

And optional extensions via CLI (Coming soon):

  • Graphql setup for client & NextJS backend API.
  • React Server Components for Next (with client side calls still working for Expo side)

Table of Contents

  1. Quickstart
  2. Archi Diagram
  3. Creating a custom package
  4. Installing new libraries
  5. Data fetching architecture
  6. Package structure

🏁 Quick start

  • Install dependencies at the root level: yarn
  • Build all packages with yarn build
    • When developing, you can run build-watch to get packages rebuilt on save
  • Next.js local dev: yarn web
    • Runs yarn next
  • Expo local dev:
    • First, build a dev client onto your device or simulator
      • cd apps/expo
      • Then, either expo run:ios, or eas build
    • After building the dev client, from the root of the monorepo...
      • yarn native (This runs expo start --dev-client)

Troubleshooting (Common Errors)

Tailwind.config.js error

Tailwind Config.js Error
  • If you get something like this, you've most likely not built the packages correctly - Try yarn build.

default export is not a React Component

Default Export React Component Error
  • Try starting the web/app clearing the cache - yarn web-clear-cache or yarn native -c

Archi Diagram

Archi Diagram