ποΈ 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 rungit clone https://github.com/shipnativeapp/shipnative.git, you get this structure:
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.
app/components/ - UI Components
app/components/ - UI Components
Pre-built components like
Button, Card, TextField, etc. Use these instead of building from scratch.app/stores/ - Global State
app/stores/ - Global State
Zustand stores for app-wide state like authentication and subscriptions.
app/services/ - External APIs
app/services/ - External APIs
Service clients for Supabase, RevenueCat, PostHog, etc. Automatically uses mocks when API keys are missing.
app/theme/ - Design System
app/theme/ - Design System
Unistyles theme with colors, spacing, typography. Always use theme values instead of hardcoding.
π Landing Page (apps/web/)
A Next.js application for your appβs marketing website.
π Documentation Files
The root directory contains markdown documentation for developers:| File | Purpose |
|---|---|
README.md | Quick start and overview |
SUPABASE.md | Authentication & database setup |
MONETIZATION.md | RevenueCat payments setup |
ANALYTICS.md | PostHog & Sentry setup |
NOTIFICATIONS.md | Push notifications setup |
DEPLOYMENT.md | App store deployment guide |
TROUBLESHOOTING.md | Common issues and solutions |
DESIGN_SYSTEM.md | Design tokens and patterns |
BACKEND.md | Database 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 stateTECH_STACK.md- Technologies used and decisions madeSTYLE_GUIDE.md- Code patterns and conventionsARCHITECTURE.md- App architecture detailsSCREEN_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
.cursorrules to understand your project structure and generate appropriate code.
π§ Configuration Files
Root Level
package.json- Monorepo dependencies and scriptsturbo.json- Turborepo build configurationtsconfig.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 dependenciestsconfig.json- TypeScript configuration
π How the Monorepo Works
Turborepo manages the monorepo. When you run commands from the root:π¦ Packages (Shared Code)
Thepackages/ folder contains shared utilities that both apps can use. As you build, you might add shared types, utilities, or components here.
π― 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
Where do I add a new screen?
Where do I add a new screen?
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
Where do I create a new component?
Where do I create a new component?
Add it to
apps/app/app/components/. Export it from apps/app/app/components/index.ts so others can import it easily.Where do I add global state?
Where do I add global state?
Create a Zustand store in
apps/app/app/stores/. Follow the pattern in existing stores like authStore.ts or subscriptionStore.ts.Where do I customize the theme?
Where do I customize the theme?
Edit
apps/app/app/theme/unistyles.ts. This file defines colors, spacing, typography, shadows, and all design tokens.Where do I modify API calls?
Where do I modify API calls?
Check
apps/app/app/services/ for service clients. Each service has its own file (e.g., supabase.ts, revenuecat.ts, posthog.ts).