<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Amir Gazerani</title>
    <description>The latest articles on DEV Community by Amir Gazerani (@amirgazerani_dev).</description>
    <link>https://dev.to/amirgazerani_dev</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4232670%2F011c6b43-07c9-4faa-8017-6b343a4c1325.jpeg</url>
      <title>DEV Community: Amir Gazerani</title>
      <link>https://dev.to/amirgazerani_dev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/amirgazerani_dev"/>
    <language>en</language>
    <item>
      <title>Expo starter template for SDK 58: typed OpenAPI networking, a complete UI kit, built-in docs, and an npm package</title>
      <dc:creator>Amir Gazerani</dc:creator>
      <pubDate>Tue, 24 Nov 2026 11:41:29 +0000</pubDate>
      <link>https://dev.to/amirgazerani_dev/expo-starter-template-for-sdk-58-typed-openapi-networking-a-complete-ui-kit-built-in-docs-and-1k99</link>
      <guid>https://dev.to/amirgazerani_dev/expo-starter-template-for-sdk-58-typed-openapi-networking-a-complete-ui-kit-built-in-docs-and-1k99</guid>
      <description>&lt;p&gt;expo-starter-pack is an Expo starter template: a typed data layer, an auth-gated dashboard, a UI kit and a mock backend, already wired together so a new app starts from a working architecture. The SDK 58 update is out, and it changes a lot. This post covers what the starter is and everything that's new in this release.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start a project from the template
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx create-expo-app my-app --template @amirgazerani/expo-starter-pack
&lt;span class="nb"&gt;cd&lt;/span&gt; my-app
cp .env.example .env
npm install

npm run mock       &lt;span class="c"&gt;# terminal 1: mock API on port 4010&lt;/span&gt;
npx expo start     &lt;span class="c"&gt;# terminal 2: the app&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In &lt;code&gt;.env&lt;/code&gt;, set &lt;code&gt;EXPO_PUBLIC_API_DEV_URL&lt;/code&gt; to &lt;code&gt;http://&amp;lt;your-LAN-IP&amp;gt;:4010&lt;/code&gt; so a physical phone can reach the mock. GitHub's template button also works: &lt;code&gt;gh repo create my-app --template amirazerani-gif/expo-starter-pack --clone --private&lt;/code&gt;. I explained why I built it in &lt;a href="https://dev.to/amirgazerani_dev/this-is-how-i-start-a-new-project-in-expo-maybe-youll-like-it-too-2pm4"&gt;an earlier post&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's in the starter
&lt;/h2&gt;

&lt;p&gt;The networking is one &lt;code&gt;openapi-fetch&lt;/code&gt; client whose request and response types are generated from your OpenAPI spec, so no API type is written by hand. Server data lives in TanStack Query, with one hooks file per API resource, and Zustand holds app and UI state only, like the auth token. Auth keeps the token in SecureStore, a guard protects the &lt;code&gt;(dashboard)&lt;/code&gt; group, and an authenticated 401 signs the user out and clears the cache. Failed requests go through one &lt;code&gt;ApiError&lt;/code&gt; type and one error store and show up as toasts, with flags on a hook for screens that show errors inline. A local mock server runs the demo API, so the whole app works before a real backend exists.&lt;/p&gt;

&lt;p&gt;That's the base. This is what changed in the SDK 58 release.&lt;/p&gt;

&lt;h2&gt;
  
  
  Expo SDK 58 and React Native 0.88
&lt;/h2&gt;

&lt;p&gt;The starter now runs on Expo SDK 58 with React Native 0.88, React 19.3 and the New Architecture, with expo-router's typed routes. If you're still on SDK 57, that version stays available on GitHub under the &lt;code&gt;sdk-57&lt;/code&gt; tag.&lt;/p&gt;

&lt;h2&gt;
  
  
  Generate TanStack Query keys and mutations from the OpenAPI spec
&lt;/h2&gt;

&lt;p&gt;A commenter on r/expo suggested this: since the spec already knows every method and path, the query keys can come from it instead of hand-written key factories. That's how the starter works now, using &lt;code&gt;openapi-react-query&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Before, each resource had a factory I had to keep in sync with the backend:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;itemKeys&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;all&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"items"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;lists&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;itemKeys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;all&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"list"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;detail&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;number&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;itemKeys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;all&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"detail"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now keys and query options are derived from the method and path, and a create mutation looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;useCreateItem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;queryClient&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useQueryClient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nv"&gt;$api&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;useMutation&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"post"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"/v1/items"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;onSuccess&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
      &lt;span class="n"&gt;queryClient&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;invalidateQueries&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;queryKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;$api&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;queryOptions&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"get"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"/v1/items"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;queryKey&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;meta&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;skipGlobalError&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I invalidate with the same call I fetch with, and the mutation variables are the request itself: &lt;code&gt;mutate({ body, params })&lt;/code&gt;. When the backend renames a field, I regenerate the types and TypeScript lists every call that broke. I wrote up the details of how this works here: [LINK TO THE HASHNODE ARTICLE]&lt;/p&gt;

&lt;p&gt;Some mutations still need to shape the request, so writing them by hand stays supported, with the same conventions. Login is the example: it adds the device name and stores the token, which &lt;code&gt;$api.useMutation&lt;/code&gt; can't express:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;useLogin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;useMutation&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;mutationFn&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;JsonBody&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="s2"&gt;"/v1/auth/login"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"post"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
      &lt;span class="nf"&gt;unwrap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;POST&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"/v1/auth/login"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;device_name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;DEVICE_NAME&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;body&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;onSuccess&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;useAuthStore&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setSession&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;token&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;meta&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;skipGlobalError&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The rule is simple: if the screen can pass the request as it is, use &lt;code&gt;$api.useMutation&lt;/code&gt;. If the hook adds or changes something, write it by hand. The typing and the error handling are the same either way.&lt;/p&gt;

&lt;h2&gt;
  
  
  A complete Expo UI kit
&lt;/h2&gt;

&lt;p&gt;The UI kit is the biggest visual change. It now has 15 components: buttons (solid, outline, ghost and gradient), inputs, text areas, switches, checkboxes, radio groups, chips, badges, avatars, cards, dropdowns, modals and toasts. Modals come as center, bottom sheet, fullscreen and side drawer.&lt;/p&gt;

&lt;p&gt;What matters more is that everything a component used to decide for itself is now set in one place:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Theme.&lt;/strong&gt; Colors, radius and spacing live in one tokens file, with light and dark mode picked from the device. To rebrand the app, you edit that file.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Typography.&lt;/strong&gt; One file controls fonts. You list your font files, map them to the four weights (regular, medium, semibold, bold), and pick a default family. You can define several families, and body text, button labels and field labels each get their own default weight. Changing the font of the whole app is one setting, and no component names a font.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sizes.&lt;/strong&gt; Every control shares one scale (sm, md, lg), so a md button and a md input are the same height. The numbers live in one file, so making the whole kit a bit bigger is one edit, and any single component can still override its size.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I also replaced &lt;code&gt;sonner-native&lt;/code&gt; with an in-app toast. It's a small store, so &lt;code&gt;toast.error()&lt;/code&gt; works from anywhere and not only inside components. It supports swipe to dismiss, a countdown bar and deduplication, and modals mount their own toast host so toasts show above them.&lt;/p&gt;

&lt;h2&gt;
  
  
  An Expo starter that documents itself
&lt;/h2&gt;

&lt;p&gt;The Home tab documents every component with its props, an import line and live variants. The Data tab explains the networking, mutations, how the token is stored and how errors are handled. A demo dashboard shows an infinite list, create and delete, and a profile form with inline validation errors, and each section names the file it's built from.&lt;/p&gt;

&lt;p&gt;When you start a real project, you remove all of it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run strip-example -- --dry-run   &lt;span class="c"&gt;# preview, changes nothing&lt;/span&gt;
npm run strip-example                &lt;span class="c"&gt;# strip it, type-checking before and after&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The script deletes the example folders and any API resource nothing imports afterwards, leaves a Hello world home screen and an empty dashboard under the same auth guard, and removes the Data tab. It shows the full plan and asks first, and it won't run unless your git working tree is clean.&lt;/p&gt;

&lt;h2&gt;
  
  
  Published on npm
&lt;/h2&gt;

&lt;p&gt;The starter is now an npm package, &lt;code&gt;@amirgazerani/expo-starter-pack&lt;/code&gt;, so &lt;code&gt;create-expo-app --template&lt;/code&gt; can start a project directly. The GitHub template button still works too.&lt;/p&gt;

&lt;h2&gt;
  
  
  Requirements and what it assumes
&lt;/h2&gt;

&lt;p&gt;You need Node 22.13 or newer, and an iOS simulator, an Android emulator or a device with a development build. For Android native builds you also need JDK 17 and &lt;code&gt;ANDROID_HOME&lt;/code&gt; set.&lt;/p&gt;

&lt;p&gt;The template assumes a Laravel-style JSON API (&lt;code&gt;{ message, data }&lt;/code&gt; envelopes, &lt;code&gt;meta&lt;/code&gt; pagination, 422 validation errors). If yours is different, the README lists the files to change. The dashboard has route groups and a guard but no role logic, so if your backend has roles, you read the role from the user query and redirect. The mock backend returns canned responses and stores nothing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Repo: &lt;a href="https://github.com/amirazerani-gif/expo-starter-pack" rel="noopener noreferrer"&gt;github.com/amirazerani-gif/expo-starter-pack&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;npm: &lt;a href="https://www.npmjs.com/package/@amirgazerani/expo-starter-pack" rel="noopener noreferrer"&gt;@amirgazerani/expo-starter-pack&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you try it, tell me how it goes. If you like it, a star on the repo helps. If you have a suggestion, open an issue.&lt;/p&gt;

</description>
      <category>reactnative</category>
      <category>typescript</category>
      <category>opensource</category>
      <category>mobile</category>
    </item>
    <item>
      <title>This is how I start a new project in Expo (maybe you’ll like it too)</title>
      <dc:creator>Amir Gazerani</dc:creator>
      <pubDate>Sat, 07 Nov 2026 19:35:40 +0000</pubDate>
      <link>https://dev.to/amirgazerani_dev/this-is-how-i-start-a-new-project-in-expo-maybe-youll-like-it-too-2pm4</link>
      <guid>https://dev.to/amirgazerani_dev/this-is-how-i-start-a-new-project-in-expo-maybe-youll-like-it-too-2pm4</guid>
      <description>&lt;p&gt;I build a lot of React Native apps, and sometimes I switch between three or four of them in a single day. Every one of them used to start the same way: spend two or three days (sometimes more) getting the basic shape before writing anything real. Routing, auth, API layer, types, error handling, theme, responsive UI. None of it is hard, but it's slow, and every project came out slightly different.&lt;/p&gt;

&lt;p&gt;So I made a template, &lt;a href="https://github.com/amirazerani-gif/expo-starter-pack" rel="noopener noreferrer"&gt;expo-starter-pack&lt;/a&gt;, and most of my apps now start from it. The whole idea is this: you clone it, set the environment and project config by following the instructions, and you start coding. That's it. Nothing else stands between you and the actual app.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's already configured
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Typing.&lt;/strong&gt; an &lt;code&gt;openapi-fetch&lt;/code&gt; client with request and response types generated from the OpenAPI spec. No more typing by hand.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data layer.&lt;/strong&gt; TanStack Query with a resource-based custom hook pattern, plus shared conventions and helpers (response unwrapping, pagination, error handling) already wired into the app.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Global error handling and logging.&lt;/strong&gt; One error type, one error store and toasts, with per-request flags to opt out.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Auth and role-based routing.&lt;/strong&gt; Public, auth-protected, and dashboard groups for role-based navigation, all configured and structured to expand.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Theme and UI kit.&lt;/strong&gt; A global theme with dark and light mode, plus a small responsive UI library built on &lt;code&gt;react-native-size-matters&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A mock server.&lt;/strong&gt; A local mock backend generated from the OpenAPI contract, so you can build and test screens, including login and the dashboard, before the real backend exists.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You write code into the architecture instead of spending days building it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why architecture matters more later
&lt;/h2&gt;

&lt;p&gt;Architecture doesn't look like a big deal while you're building because you're moving fast and everything is fresh. It gets painful when you start maintaining.&lt;/p&gt;

&lt;p&gt;Say you open an app six months from now to fix an error. If everything lives in a known place, you go straight to where the fix belongs. If every project was set up differently, you spend the first hour playing hide and seek with some random decisions that you, your AI agent, or your dev buddy made six months ago and nobody remembers. Who wrote this? Why is it done like this? Where does this call even go?&lt;/p&gt;

&lt;p&gt;The same thing happens when the backend developer changes a key without telling anyone. In a large app with no clear structure, you end up running around a pile of API layers, interfaces, and clients, trying to work out what's going to break. With one typed client and a generated schema, I re-run one command and TypeScript points at every call that no longer matches.&lt;/p&gt;

&lt;p&gt;For me it's a defined grid. Most of my projects use the same one (a few with unusual requirements are the exception), so every app is built the same way. I switch between apps all day, and I can open any of them and already know where things are.&lt;/p&gt;

&lt;h2&gt;
  
  
  The small conveniences
&lt;/h2&gt;

&lt;p&gt;The mock server is the one I like most. You build your screens against it without waiting for the real backend or hardcoding some static mess. It's like having the tools laid out before you start painting. The theme and the small UI library work the same way, none of that is a headache anymore. I figure we developers often run into similar problems, so other people might find it useful too.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I use it
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gh repo create my-app &lt;span class="nt"&gt;--template&lt;/span&gt; amirazerani-gif/expo-starter-pack &lt;span class="nt"&gt;--clone&lt;/span&gt; &lt;span class="nt"&gt;--private&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then I follow the README: set the env and config, point it at my API (or the mock), regenerate the types, and replace the demo resources with my real ones. Then I start coding.&lt;/p&gt;

&lt;h2&gt;
  
  
  Before you use it
&lt;/h2&gt;

&lt;p&gt;It's opinionated. It assumes a Laravel-style JSON API, because that's what most of my backends look like. If yours differs, no worries, the README lists the files to change. It's on Expo SDK 57 right now, and SDK 58 is on the way.&lt;/p&gt;

&lt;p&gt;Free and MIT licensed: &lt;a href="https://github.com/amirazerani-gif/expo-starter-pack" rel="noopener noreferrer"&gt;github.com/amirazerani-gif/expo-starter-pack&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you end up using it, let me know how it goes. &lt;a href="https://github.com/amirazerani-gif/expo-starter-pack/issues" rel="noopener noreferrer"&gt;Open an issue&lt;/a&gt;, drop a comment, or leave a star if you liked it.&lt;/p&gt;

</description>
      <category>reactnative</category>
      <category>template</category>
      <category>typescript</category>
      <category>expo</category>
    </item>
  </channel>
</rss>
