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/hooks/ - Auth Hooks
app/hooks/ - Auth Hooks
Native auth hooks for each backend, plus a unified hook.
app/stores/ - Global State
app/stores/ - Global State
Zustand stores for app-wide state like subscriptions and preferences.
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.
Convex Backend (convex/)
If using Convex, your backend functions live at the root level:
Marketing Page (apps/web/)
A Vite + React application for your app’s marketing/landing page.
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 |
The AI Documentation System (Layered Context)
Shipnative uses a Layered Context architecture. This ensures that AI agents get the right amount of information at the right time, minimizing “token waste.”1. Discovery Layer (AGENTS.md)
Follows the AGENTS.md standard. These are “Front Desk” files that agents read first to understand the directory structure and constraints.
- Root:
shipnative/AGENTS.md - Mobile:
apps/app/AGENTS.md - Web:
apps/web/AGENTS.md
2. Specification Layer (vibe/ folders)
These are the “Brain” of the project, containing deep-dive technical specs.
- App Logic:
apps/app/vibe/(Styling, Architecture, Screen Templates) - Infrastructure:
vibe/(Service architecture, Mock mode, Convex patterns)
3. Tech Stack Rules (in AGENTS.md)
The root AGENTS.md contains the tech stack rules (e.g., “Always use Unistyles”) that agents must follow.
Configuration Files
Root Level
package.json- Monorepo dependencies and scriptsturbo.json- Turborepo build configurationtsconfig.json- TypeScript configurationAGENTS.md- AI context (tech stack, directory map).cursorrules- Points to AGENTS.md
App Level (apps/app/)
app.json- Expo configuration (app name, bundle ID, etc.).env- Environment variables (API keys, backend provider)package.json- App-specific dependenciestsconfig.json- TypeScript configuration
Convex Level (convex/)
schema.ts- Convex database schemaauth.ts- Auth configuration
How the Monorepo Works
Turborepo manages the monorepo. When you run commands from the root: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/screens/ 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 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 add backend logic?
Where do I add backend logic?
Supabase: Use the Supabase client in
apps/app/app/services/supabase.ts or create Edge Functions.Convex: Add functions to convex/. Create queries, mutations, and actions as needed.Where do I modify auth?
Where do I modify auth?
Supabase: Check
apps/app/app/hooks/supabase.ts for the useSupabaseAuth hook.Convex: Check apps/app/app/hooks/convex.ts for the useConvexAuth hook.Backend-agnostic: Use apps/app/app/hooks/useAppAuth.ts for components that work with either backend.
