📚 Boilerplate Documentation
Main Index
🚀 Quick Start
| Document | Description |
|---|
| QUICKSTART | ⭐ Start here - Quick changes in 5 minutes |
| FEATURES | 📱 Complete list of implemented features |
📐 Fundamental Guides
🔧 Reference Guides
| Document | Description |
|---|
| HOOKS | 🪝 Custom hooks and usage patterns |
| CONTEXTS | 🌐 Available contexts (Theme, I18n, App, Toast) |
| UTILS | 🔧 Utility functions (formatting, haptics, etc.) |
| TYPES | 📝 TypeScript reference |
| MOCKS | 🎭 Mock data for development |
| TESTING | 🧪 Unit tests, E2E tests with Jest and Maestro |
🔌 Integration Guides
🚀 Store Submission
🚀 Included Features
UI Components
| Component | Description | Location |
|---|
Button | Button with variants (primary, secondary, outline, ghost, gradient) | components/Button.tsx |
Card | Card with variants (default, horizontal, compact) | components/Card.tsx |
Input | Input field with validation | components/Input.tsx |
Avatar | Avatar with image or initials | components/Avatar.tsx |
SearchBar | Search bar with animation | components/SearchBar.tsx |
FilterModal | Animated filter modal | components/FilterModal.tsx |
SkeletonLoader | Animated loading placeholders | components/SkeletonLoader.tsx |
Toast | Temporary notifications | components/Toast.tsx |
EmptyState | Empty state with action | components/EmptyState.tsx |
CategoryChip | Selectable category chips | components/CategoryChip.tsx |
StatCard | Statistics card | components/StatCard.tsx |
SettingsRow | Settings row | components/SettingsRow.tsx |
IconButton | Icon-only button | components/IconButton.tsx |
Contexts and State
| Context | Description | Location |
|---|
AppContext | Main state (user, favorites, settings) | contexts/AppContext.tsx |
ThemeContext | Theme system (light/dark/system) | contexts/ThemeContext.tsx |
ToastContext | Toast notification system | contexts/ToastContext.tsx |
I18nContext | Internationalization and translations | contexts/I18nContext.tsx |
AuthContext | User authentication | contexts/AuthContext.tsx |
NotificationsContext | Push and local notifications | contexts/NotificationsContext.tsx |
AnalyticsContext | Event tracking and analytics | contexts/AnalyticsContext.tsx |
PurchasesContext | In-app purchases with RevenueCat | contexts/PurchasesContext.tsx |
Screens (Tabs)
| Screen | Description | Route |
|---|
| Home | Dashboard with stats and recent items | /(tabs)/(home) |
| Explore | Item list with search and filters | /(tabs)/explore |
| Favorites | Items saved as favorites | /(tabs)/favorites |
| Activity | Activity feed | /(tabs)/activity |
| Messages | Messaging system | /(tabs)/messages |
| Profile | User profile and settings | /(tabs)/profile |
Screens (Modals/Stack)
| Screen | Description | Route |
|---|
| Item Detail | Item details | /(tabs)/(home)/item-detail |
| Edit Profile | Edit user profile | /(tabs)/profile/edit-profile |
| Chat | Individual conversation | /(tabs)/messages/[chatId] |
| Notifications | Notifications list | /notifications |
| Onboarding | Welcome screen | /onboarding |
🛠️ Quick Modification Guide
Add a New Screen
import { View, Text, StyleSheet } from 'react-native';
import { useTheme } from '@/contexts/ThemeContext';
export default function MyTabScreen() {
const { colors } = useTheme();
return (
<View style={[styles.container, { backgroundColor: colors.background }]}>
<Text style={[styles.title, { color: colors.text }]}>My Tab</Text>
</View>
);
}
const styles = StyleSheet.create({
container: { flex: 1, padding: 16 },
title: { fontSize: 24, fontWeight: 'bold' },
});
import { Stack } from 'expo-router';
export default function MyTabLayout() {
return (
<Stack>
<Stack.Screen name="index" options={{ title: 'My Tab' }} />
</Stack>
);
}
<Tabs.Screen
name="my-tab"
options={{
title: 'My Tab',
tabBarIcon: ({ color, size }) => <Icon size={size} color={color} />,
}}
/>
Show a Toast
const { showToast } = useToast();
showToast('Success message', 'success');
showToast('There was an error', 'error');
Change Theme
const { setTheme, isDark, colors } = useTheme();
setTheme('dark');
Change Language
const { setLanguage, t, language } = useI18n();
setLanguage('en');
const text = t.common.save;
Favorites
const { toggleFavorite, isFavorite } = useApp();
toggleFavorite(itemId);
const isFav = isFavorite(itemId);
Navigation
const router = useRouter();
router.push('/explore');
router.push({ pathname: '/(tabs)/(home)/item-detail', params: { id: '123' } });
router.back();
📂 File Structure
├── app/ # Screens and navigation (Expo Router)
│ ├── (tabs)/ # Tab navigation
│ │ ├── (home)/ # Home tab with internal stack
│ │ ├── explore/ # Explore tab
│ │ ├── favorites/ # Favorites tab
│ │ ├── activity/ # Activity tab
│ │ ├── messages/ # Messages tab
│ │ └── profile/ # Profile tab
│ ├── _layout.tsx # Root layout
│ ├── notifications.tsx # Notifications modal
│ └── onboarding.tsx # Welcome screen
├── components/ # Reusable components
├── contexts/ # Global state (Context + React Query)
├── constants/ # Colors, spacing, configuration
├── mocks/ # Test data for development
├── types/ # TypeScript definitions
├── utils/ # Helper functions
└── docs/ # This documentation
🔧 Useful Scripts
npx expo start
npx expo start -c
npx tsc --noEmit
npx eslint .
📖 Learning Path
If you're new:
- ⭐ Start with QUICKSTART - Learn to make basic changes
- 📱 Read FEATURES - Discover all features
- 🏗️ Review ARCHITECTURE - Understand the structure
For development:
- 🧩 Check COMPONENTS - Available components
- 🪝 Learn HOOKS - Custom hooks
- 🌐 Understand CONTEXTS - State system
- ✨ Follow ADDING_FEATURES - Add features
For reference:
- 📝 Types: TYPES - TypeScript reference
- 🔧 Utils: UTILS - Utility functions
- 🎭 Mocks: MOCKS - Development data
- 🧪 Testing: TESTING - Unit and E2E tests
For integrations:
- 🔐 See AUTHENTICATION - User system
- 🗄️ See DATABASE - Persistence and databases
- 💰 See PAYMENTS - Monetization with subscriptions
- 🔔 See NOTIFICATIONS - Push notifications
- 📊 See ANALYTICS - Analytics and tracking
- 🤖 See AI - AI features
- 🌍 See I18N - Translations and localization
- 🔗 See DEEP_LINKING - Deep links configuration
- 🐛 See ERROR_TRACKING - Error tracking setup
For store submission:
- 📱 See STORE_SUBMISSION - Submit to stores
- 🎨 See STORE_ASSETS - Create store assets
📊 Documentation Summary
| Category | Documents | Purpose |
|---|
| Start | QUICKSTART, FEATURES | Get started quickly |
| Architecture | ARCHITECTURE, NAVIGATION, STATE_MANAGEMENT | Understand structure |
| Development | COMPONENTS, HOOKS, CONTEXTS, ADDING_FEATURES | Create features |
| Reference | TYPES, UTILS, MOCKS, STYLING, TESTING | Quick reference |
| Integration | AUTH, DATABASE, PAYMENTS, NOTIFICATIONS, ANALYTICS, AI, I18N, DEEP_LINKING, ERROR_TRACKING | Connect services |
| Store | STORE_SUBMISSION, STORE_ASSETS | Publish to stores |
Total: 25 reference documents