Skip to main content

πŸ—οΈ Shipnative Project Structure

Shipnative is a monorepo - a single repository containing multiple apps and shared packages. This guide explains how the codebase is organized so you can navigate and extend your project effectively.

What You Cloned

When you run git clone https://github.com/shipnativeapp/shipnative.git, you get this structure:
shipnative/                      # ← This is the monorepo (what you cloned)
β”‚
β”œβ”€β”€ apps/
β”‚   β”œβ”€β”€ app/                     # React Native mobile app (Expo)
β”‚   └── web/                     # Landing page (Next.js)
β”‚
β”œβ”€β”€ packages/                    # Shared code between apps
β”‚
β”œβ”€β”€ vibe/                        # AI context files for vibecoding
β”‚   β”œβ”€β”€ SERVICES.md             # Service architecture overview
β”‚   └── MOCK_SERVICES.md        # How mock mode works
β”‚
β”œβ”€β”€ *.md                         # Developer documentation
β”‚   β”œβ”€β”€ README.md               # Main readme
β”‚   β”œβ”€β”€ SUPABASE.md            # Auth & database setup
β”‚   β”œβ”€β”€ MONETIZATION.md        # Payments setup
β”‚   β”œβ”€β”€ ANALYTICS.md           # Analytics setup
β”‚   └── ...                     # More feature guides
β”‚
β”œβ”€β”€ package.json                 # Monorepo root
β”œβ”€β”€ turbo.json                   # Turborepo configuration
└── yarn.lock                    # Dependency lock file
This is what matters to you as a Shipnative customer. Everything else you might see in external documentation or development setups is for Shipnative’s internal development and maintenance.

The Two Main Apps

πŸ“± Mobile App (apps/app/)

Your primary React Native application. This is where you’ll spend most of your time building features.
apps/app/
β”‚
β”œβ”€β”€ app/                         # Source code
β”‚   β”œβ”€β”€ screens/                # Screen components
β”‚   β”œβ”€β”€ components/             # Reusable UI components
β”‚   β”œβ”€β”€ navigators/             # React Navigation setup
β”‚   β”œβ”€β”€ stores/                 # Global state (Zustand)
β”‚   β”œβ”€β”€ services/               # External services (Supabase, RevenueCat, etc.)
β”‚   β”‚   └── mocks/              # Mock implementations
β”‚   β”œβ”€β”€ hooks/                  # Custom React hooks
β”‚   β”œβ”€β”€ utils/                  # Helper functions
β”‚   β”œβ”€β”€ theme/                  # Design system
β”‚   β”‚   └── unistyles.ts        # Theme configuration
β”‚   β”œβ”€β”€ config/                 # App configuration
β”‚   └── app.tsx                 # App entry point
β”‚
β”œβ”€β”€ assets/                      # Images, fonts, etc.
β”œβ”€β”€ .env                         # API keys (git-ignored)
β”œβ”€β”€ app.json                     # Expo configuration
β”œβ”€β”€ index.tsx                    # Entry point
└── package.json                 # App dependencies
Key folders to know:
Pre-built components like Button, Card, TextField, etc. Use these instead of building from scratch.
import { Button, Card, Text } from '@/components'
Zustand stores for app-wide state like authentication and subscriptions.
import { useAuthStore } from '@/stores/authStore'

const { user, signIn, signOut } = useAuthStore()
Service clients for Supabase, RevenueCat, PostHog, etc. Automatically uses mocks when API keys are missing.
import { supabase } from '@/services/supabase'
Unistyles theme with colors, spacing, typography. Always use theme values instead of hardcoding.
import { useUnistyles } from 'react-native-unistyles'

const { theme } = useUnistyles()
theme.colors.primary
theme.spacing.md

🌐 Landing Page (apps/web/)

A Next.js application for your app’s marketing website.
apps/web/
β”‚
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app/                    # Next.js App Router pages
β”‚   β”œβ”€β”€ components/             # React components
β”‚   └── lib/                    # Utilities
β”‚
β”œβ”€β”€ public/                      # Static assets
└── package.json                 # Web app dependencies

πŸ“„ Documentation Files

The root directory contains markdown documentation for developers:
FilePurpose
README.mdQuick start and overview
SUPABASE.mdAuthentication & database setup
MONETIZATION.mdRevenueCat payments setup
ANALYTICS.mdPostHog & Sentry setup
NOTIFICATIONS.mdPush notifications setup
DEPLOYMENT.mdApp store deployment guide
TROUBLESHOOTING.mdCommon issues and solutions
DESIGN_SYSTEM.mdDesign tokens and patterns
BACKEND.mdDatabase schema

πŸ€– AI Context Files (Two Vibe Folders)

Shipnative has two vibe folders with different purposes:

apps/app/vibe/ - App-Specific Context

These files teach AI about your app’s specific implementation:
  • CONTEXT.md - App features, architecture, current state
  • TECH_STACK.md - Technologies used and decisions made
  • STYLE_GUIDE.md - Code patterns and conventions
  • ARCHITECTURE.md - App architecture details
  • SCREEN_TEMPLATES.md - Screen implementation patterns

vibe/ (Root) - Project-Wide Context

These files cover project-wide infrastructure:
  • SERVICES.md - Overview of all external services (Supabase, RevenueCat, PostHog, Sentry)
  • MOCK_SERVICES.md - How mock mode works, customization guide, and mock data seeding
When you use the β€œgolden prompt”, AI assistants read both folders along with .cursorrules to understand your project structure and generate appropriate code.

πŸ”§ Configuration Files

Root Level

  • package.json - Monorepo dependencies and scripts
  • turbo.json - Turborepo build configuration
  • tsconfig.json - TypeScript configuration
  • .cursorrules - Rules for AI code assistants

App Level (apps/app/)

  • app.json - Expo configuration (app name, bundle ID, etc.)
  • .env - Environment variables (API keys)
  • package.json - App-specific dependencies
  • tsconfig.json - TypeScript configuration

πŸ”„ How the Monorepo Works

Turborepo manages the monorepo. When you run commands from the root:
yarn dev              # Runs the mobile app (Expo) in dev mode
yarn app:ios          # Runs mobile app on iOS
yarn web              # Runs the marketing landing page (apps/web)
yarn app:web          # Runs the Expo web build of the app
yarn build            # Builds all apps
Each app can also be run independently:
cd apps/app
yarn ios              # Run mobile app

cd apps/web
yarn dev              # Run landing page

πŸ“¦ Packages (Shared Code)

The packages/ folder contains shared utilities that both apps can use. As you build, you might add shared types, utilities, or components here.
packages/
└── (shared packages - currently minimal)

🎯 Where to Start

For Vibecoders

Start in apps/app/app/ - build screens and components. Let AI help you!

For Explorers

Browse apps/app/app/components/ to see what’s available, then check apps/app/app/(tabs)/ for screen examples.

πŸ” Finding What You Need

Add it to apps/app/app/screens/. Then register it in apps/app/app/navigators/AppNavigator.tsx or MainTabNavigator.tsx:
  • For main flow screens: Add to AppNavigator.tsx
  • For tab screens: Add to MainTabNavigator.tsx
  • Example: apps/app/app/screens/ProfileScreen.tsx
Add it to apps/app/app/components/. Export it from apps/app/app/components/index.ts so others can import it easily.
// In ProfileCard.tsx
export const ProfileCard = () => { ... }

// In index.ts
export * from "./ProfileCard"
Create a Zustand store in apps/app/app/stores/. Follow the pattern in existing stores like authStore.ts or subscriptionStore.ts.
Edit apps/app/app/theme/unistyles.ts. This file defines colors, spacing, typography, shadows, and all design tokens.
Check apps/app/app/services/ for service clients. Each service has its own file (e.g., supabase.ts, revenuecat.ts, posthog.ts).

Next Steps