Skip to content

Repository files navigation

universal-template

Cross-platform Expo starter for Platform Blocks — one codebase that ships native iOS and Android apps and a statically rendered, SEO-ready website. Website-style pages with shared header navigation, per-route meta tags, and flash-free dark mode.

Use this template

Click Use this template on GitHub to create your own repository from it, or scaffold directly:

npx create-expo-app@latest my-app --template https://github.com/platform-blocks/universal-template

Get started

npm install
npx expo start

Press i for iOS simulator, a for Android emulator, or w for web.

Build the website:

npx expo export --platform web

Every route in app/ becomes its own prerendered HTML file in dist/ — deployable to any static host (GitHub Pages, Netlify, Vercel, ...).

What's inside

  • @platform-blocks/ui with all required peer dependencies installed
  • Website-style pages — a landing page and about page with a shared SiteHeader, navigable natively on mobile and as real URLs on the web
  • Per-route SEOexpo-router/head sets each page's title and meta description in the static export
  • Flash-free dark mode — a pre-hydration script in app/+html.tsx applies the visitor's saved theme before first paint; the ThemeToggle cycles light → dark → auto and persists
  • Jest (jest-expo) with an example component test, ESLint, TypeScript strict, EAS build profiles stubbed

Scripts

Script What it does
npm start Start the Expo dev server
npm test Run the Jest test suite
npm run lint Lint with ESLint
npm run typecheck Type-check with tsc --noEmit

Learn more

License

MIT

About

Cross-platform Expo starter for Platform Blocks — native iOS/Android apps and a statically rendered website from one codebase

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages