đ Boilerplate Documentation
Main Index
đ Quick Start
| Document | Description |
|---|---|
| QUICKSTART | â Start here - Quick changes in 5 minutes |
| FEATURES | đ± Complete list of implemented features |
đ Fundamental Guides
| Document | Description |
|---|---|
| ARCHITECTURE | Project structure, patterns and conventions |
| COMPONENTS | Complete guide to reusable components |
| STATE_MANAGEMENT | State management with React Query and Context |
| NAVIGATION | Navigation system with Expo Router |
| STYLING | Design system, colors and styles |
| ADDING_FEATURES | Step-by-step guide to add features |
đ§ 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
| Document | Description |
|---|---|
| AUTHENTICATION | đ User authentication system |
| DATABASE | đïž Database integration |
| PAYMENTS | đ° Payments and subscriptions with RevenueCat |
| NOTIFICATIONS | đ Push and local notifications |
| ANALYTICS | đ Analytics and event tracking |
| AI | đ€ AI features |
| REVENUECAT | đł RevenueCat technical reference |
| I18N | đ Internationalization and translations |
| DEEP_LINKING | đ Deep links and universal links |
| ERROR_TRACKING | đ Error tracking and crash reporting |
đ Store Submission
| Document | Description |
|---|---|
| STORE_SUBMISSION | đ± App Store & Google Play submission guide |
| STORE_ASSETS | đš Icons, screenshots and marketing assets |
đ 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
// 1. Create file in app/(tabs)/my-tab/index.tsx
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' },
});
// 2. Create _layout.tsx in the same folder
import { Stack } from 'expo-router';
export default function MyTabLayout() {
return (
<Stack>
<Stack.Screen name="index" options={{ title: 'My Tab' }} />
</Stack>
);
}
// 3. Register in app/(tabs)/_layout.tsx
<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'); // 'light' | 'dark' | 'system'
Change Language
const { setLanguage, t, language } = useI18n();
setLanguage('en'); // 'es' | '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
# Start development
npx expo start
# Clear cache
npx expo start -c
# Check TypeScript types
npx tsc --noEmit
# Check ESLint
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