MrDemonWolf App
Architecture

Navigation

Expo Router file-based routing, tab layout, and platform-specific navigation.

Navigation

The app uses Expo Router with file-based routing. All route files live under src/app/.

Root Layout

src/app/_layout.tsx is the root layout. It wraps the app with:

  • QueryClientProvider — React Query client
  • SettingsProvider — Global settings context
  • Stack — Root stack navigator
  • Theme configuration

Tab Navigation

The app has 5 tabs organized under src/app/(tabs)/:

TabRoute GroupScreen
About(index)Profile with avatar, social links, bio
Blog(blog)Blog list + bookmarks
Portfolio(portfolio)Portfolio showcase
Contact(contact)Contact form
Settings(settings)App settings

Platform-Specific Tab Layouts

Tab layouts differ between iOS and Android:

iOS (_layout.tsx):

  • Uses NativeTabs component
  • SF Symbols for tab icons
  • Tab persistence via useSegments()

Android (_layout.android.tsx):

  • Uses Tabs component
  • MaterialIcons for tab icons
  • Same persistence logic

Tab Persistence

The last visited tab is saved to AsyncStorage via the settings context. On cold launch, the app restores the previously active tab using useSegments().

Route Table

RouteFileDescription
About(tabs)/(index)/index.tsxProfile screen
Blog List(tabs)/(blog)/index.tsxInfinite scroll blog list
Blog Postblog/[id].tsxBlog post detail
Bookmarks(tabs)/(blog)/bookmarks.tsxSaved blog posts
Portfolio(tabs)/(portfolio)/index.tsxPortfolio list
Portfolio Itemportfolio/[id].tsxPortfolio detail
Contact(tabs)/(contact)/index.tsxContact form
Settings(tabs)/(settings)/index.tsxApp settings

Deep Linking

Push notification taps navigate to specific screens using Expo Router's deep linking:

  • Blog posts: router.push(`/blog/${postId}`)
  • Portfolio items: router.push(`/portfolio/${postId}`)

The notification response handler in use-notifications.ts extracts post_id and post_type from the notification data (snake_case keys from TailSignal).

On this page