🎯 Implemented Features
Summary
This boilerplate is a complete React Native application with 7 tabs, theme system, internationalization, and over 12 reusable components. It is ready to be customized for any type of app.
📱 Screens (Tabs)
1. Home Tab
Location: app/(tabs)/(home)/
Internal Stack: ✅ (home/index + home/item-detail)
Features:
- Dashboard with statistics
- Category grid
- Recent items list
- Navigation to item detail
How to modify:
// app/(tabs)/(home)/index.tsx
// Change statistics
const stats = [
{ label: 'Total Items', value: '1.2K', icon: Package },
// Add more stats here
];
// Change categories
const categories = [
{ id: '1', name: 'Tech', icon: '💻', color: '#FF6B35' },
// Add more categories
];
2. Explore Tab
Location: app/(tabs)/explore/
Features:
- Search bar with debounce
- Filter system (modal)
- Grid de items con lazy loading
- Real-time search
- Category filtering
How to modify:
// app/(tabs)/explore/index.tsx
// Change available filters
const categories = ['All', 'Tech', 'Design', 'Business', 'Marketing'];
// Modify search logic
const filteredItems = items.filter(item => {
const matchesSearch = item.title.toLowerCase().includes(searchQuery);
const matchesCategory = !selectedCategory || item.category === selectedCategory;
return matchesSearch && matchesCategory;
});
Components used:
SearchBar- Barra de búsqueda animadaFilterModal- Modal de filtrosCard- Tarjetas de itemsCategoryChip- Chips de categoría
3. Activity Tab
Location: app/(tabs)/activity/
Features:
- Activity feed
- Grouping by date (Hoy, Ayer, Esta semana)
- Pull to refresh
- Empty state
How to modify:
// app/(tabs)/activity/index.tsx
// Add activity types
type ActivityType = 'like' | 'comment' | 'follow' | 'purchase' | 'share';
// Modify activities
const activities: Activity[] = [
{
id: '1',
type: 'like',
title: 'Nueva actividad',
description: 'Descripción de la actividad',
timestamp: '2024-01-20T10:30:00Z',
icon: Heart,
},
];
// Customize colors by type
const getActivityColor = (type: ActivityType) => {
switch (type) {
case 'like': return Colors.error;
case 'comment': return Colors.primary;
// Add more types
}
};
4. Messages Tab
Location: app/(tabs)/messages/
Features:
- Conversation list
- Individual chat (con parámetro dinámico)
- Message input with send button
- Online/offline status
- Conversation search
How to modify:
// app/(tabs)/messages/index.tsx - Lista de chats
const conversations: Conversation[] = [
{
id: '1',
name: 'John Doe',
lastMessage: 'Hey, how are you?',
timestamp: '2m ago',
unread: 2,
avatar: 'https://i.pravatar.cc/150?img=1',
online: true,
},
];
// app/(tabs)/messages/[chatId].tsx - Individual chat
const messages: Message[] = [
{
id: '1',
text: 'Hello!',
sender: 'user', // 'user' | 'other'
timestamp: '10:30 AM',
},
];
Key components:
- Input de mensaje con auto-resize
- Burbujas de mensaje (diferentes estilos para user/other)
- Avatar con indicador online
5. Favorites Tab
Location: app/(tabs)/favorites/
Features:
- Favorites items list
- Synchronization with AppContext
- Empty state
- Remove from favorites
How to modify:
// app/(tabs)/favorites/index.tsx
const { favorites, toggleFavorite, isFavorite } = useApp();
// Favorites are managed globally in AppContext
// To add/remove favorites from anywhere:
toggleFavorite(itemId);
// To check if it is a favorite:
const isFav = isFavorite(itemId);
6. Profile Tab
Location: app/(tabs)/profile/
Internal Stack: ✅ (profile/index + profile/edit-profile)
Features:
- User profile with avatar
- Statistics (posts, followers, following)
- User information
- Edit button → Edit modal
- Bio, ubicación, website
How to modify:
// app/(tabs)/profile/index.tsx
const { user } = useApp();
// User structure (contexts/AppContext.tsx):
interface User {
id: string;
name: string;
username: string;
email: string;
avatar: string;
bio?: string;
location?: string;
website?: string;
stats: {
posts: number;
followers: number;
following: number;
};
}
// app/(tabs)/profile/edit-profile.tsx
// Form with validation to edit profile
7. Settings Tab
Location: app/(tabs)/settings/
Features:
- ✅ Tema (Light/Dark/System) - Funcional con ThemeContext
- ✅ Idioma (Español/English) - Funcional con I18nContext
- ✅ Haptic Feedback - Toggle funcional
- Push Notifications toggle
- Biometric Lock toggle
- Auto Backup toggle
- Acciones: Clear Cache, Share App, Rate Us
- Logout y Delete Account
How to modify:
// app/(tabs)/settings/index.tsx
// Add new section
const sections = [
{
title: t.settings.preferences,
data: [
{
id: 'nueva-opcion',
icon: <Icon size={20} color={colors.primary} />,
label: 'Nueva Opción',
type: 'toggle' as const,
value: nuevoEstado,
},
],
},
];
// Add handler for the new option
const handleNuevaOpcion = () => {
// Your logic here
};
Current sections:
- Preferences - Notificaciones, Dark Mode, Haptics, Language, Theme
- Security - Biometric Lock, Change Password
- Data - Auto Backup, Clear Cache
- Support - Help & FAQ, Privacy Policy, Terms
- More - Share App, Rate Us, Version
- Account - Logout, Delete Account
🎨 Theme System
Location: contexts/ThemeContext.tsx
Features:
- 3 modos: Light, Dark, System
- Persiste en AsyncStorage
- Colores dinámicos
- Detecta tema del sistema automáticamente
Usage:
import { useTheme } from '@/contexts/ThemeContext';
const { colors, isDark, themeMode, setTheme, toggleTheme } = useTheme();
// Apply dynamic color
<View style={{ backgroundColor: colors.surface }}>
<Text style={{ color: colors.text }}>Hola</Text>
</View>
// Change theme
setTheme('dark'); // 'light' | 'dark' | 'system'
// Cyclic toggle
toggleTheme(); // light → dark → system → light
Available colors:
colors = {
primary, primaryLight, primaryDark,
secondary, secondaryLight,
accent, accentLight,
success, successLight,
warning, warningLight,
error, errorLight,
background, surface, surfaceSecondary,
text, textSecondary, textTertiary, textInverse,
border, borderLight,
overlay,
}
🌍 Internationalization System
Location: contexts/I18nContext.tsx
Supported languages:
- Español (es) - Default
- English (en)
Features:
- Detección automática del idioma del dispositivo
- Persiste en AsyncStorage
- Traducciones organizadas por feature
Usage:
import { useI18n } from '@/contexts/I18nContext';
const { t, language, setLanguage, toggleLanguage } = useI18n();
// Use translation
<Text>{t.common.save}</Text>
<Text>{t.tabs.home}</Text>
<Text>{t.home.welcomeBack}</Text>
// Change language
setLanguage('en'); // 'en' | 'es'
// Toggle between languages
toggleLanguage(); // en ↔ es
Structure of traducciones:
t = {
common: { save, cancel, delete, edit, ... },
tabs: { home, explore, activity, ... },
home: { welcomeBack, overview, ... },
explore: { title, searchPlaceholder, ... },
activity: { title, today, yesterday, ... },
messages: { title, typeMessage, ... },
favorites: { title, noFavorites, ... },
profile: { title, editProfile, ... },
settings: { title, preferences, ... },
notifications: { title, markAllRead, ... },
onboarding: { skip, next, getStarted, ... },
}
Agregar nuevo idioma:
- Agregar tipo:
type Language = 'en' | 'es' | 'fr'; - Agregar traducciones al objeto
translations - Agregar en settings para selección
🧩 Reusable Components
Button
Location: components/Button.tsx
Props:
interface ButtonProps {
title: string;
onPress: () => void;
variant?: 'primary' | 'secondary' | 'outline' | 'ghost' | 'gradient';
size?: 'small' | 'medium' | 'large';
loading?: boolean;
disabled?: boolean;
icon?: ReactNode;
style?: ViewStyle;
}
Variants:
primary- Botón azul sólido (default)secondary- Botón púrpura sólidooutline- Bordes con fondo transparenteghost- Solo textogradient- Gradiente de colores
Card
Location: components/Card.tsx
Props:
interface CardProps {
item: Item;
onPress?: () => void;
onFavorite?: () => void;
isFavorite?: boolean;
variant?: 'default' | 'compact' | 'horizontal';
showActions?: boolean;
}
Variants:
default- Card vertical completahorizontal- Card horizontal (para listas)compact- Card pequeña (para carruseles)
Input
Location: components/Input.tsx
Props:
interface InputProps {
label?: string;
value: string;
onChangeText: (text: string) => void;
placeholder?: string;
error?: string;
leftIcon?: ReactNode;
rightIcon?: ReactNode;
secureTextEntry?: boolean;
multiline?: boolean;
numberOfLines?: number;
keyboardType?: KeyboardTypeOptions;
}
Features:
- Auto-focus en error
- Muestra mensaje de error
- Soporte para iconos
- Modo textarea (multiline)
- Validación visual
Avatar
Location: components/Avatar.tsx
Props:
interface AvatarProps {
source?: string;
name: string;
size?: 'small' | 'medium' | 'large' | 'xlarge';
showBorder?: boolean;
borderColor?: string;
}
Features:
- Muestra imagen si está disponible
- Fallback a iniciales del nombre
- 4 tamaños predefinidos
- Borde opcional
SearchBar
Location: components/SearchBar.tsx
Features:
- Animación al expandir/contraer
- Icono de búsqueda
- Botón de limpiar
- Placeholder animado
FilterModal
Location: components/FilterModal.tsx
Props:
interface FilterModalProps {
visible: boolean;
onClose: () => void;
onApply: (filters: Filters) => void;
categories: string[];
}
Features:
- Modal animado desde abajo
- Sistema de filtros por categoría
- Botones Apply/Reset
SkeletonLoader
Location: components/SkeletonLoader.tsx
Props:
interface SkeletonLoaderProps {
width: string | number;
height: number;
borderRadius?: number;
style?: ViewStyle;
}
Features:
- Animación de shimmer
- Personalizable en tamaño y forma
Toast
Location: components/Toast.tsx + contexts/ToastContext.tsx
Usage:
import { useToast } from '@/contexts/ToastContext';
const { showToast } = useToast();
showToast('Operación exitosa', 'success');
showToast('Hubo un error', 'error');
showToast('Advertencia', 'warning');
showToast('Información', 'info');
Features:
- 4 tipos con colores diferentes
- Auto-dismiss en 3 segundos
- Animación desde arriba
EmptyState
Location: components/EmptyState.tsx
Props:
interface EmptyStateProps {
icon: LucideIcon;
title: string;
description: string;
actionTitle?: string;
onAction?: () => void;
}
CategoryChip
Location: components/CategoryChip.tsx
Features:
- Selección visual
- Haptic feedback
- Animación de press
StatCard
Location: components/StatCard.tsx
Uso en Home para mostrar estadísticas
SettingsRow
Location: components/SettingsRow.tsx
Types:
toggle- Switch on/offaction- Navegación con flechalink- Texto con flecha
🔄 Global State
AppContext
Location: contexts/AppContext.tsx
Managed state:
{
user: User | null;
favorites: string[];
notifications: Notification[];
settings: {
pushNotifications: boolean;
hapticFeedback: boolean;
};
}
Functions:
{
setUser,
toggleFavorite,
isFavorite,
addNotification,
markNotificationAsRead,
updateSettings,
}
ThemeContext
Location: contexts/ThemeContext.tsx
See "Theme System" section above.
I18nContext
Location: contexts/I18nContext.tsx
See "Internationalization System" section above.
ToastContext
Location: contexts/ToastContext.tsx
Main function:
showToast(message: string, type: 'success' | 'error' | 'warning' | 'info')
🗺️ Navigation
Route Structure
/ (home tab)
/(tabs)/explore
/(tabs)/activity
/(tabs)/messages
/(tabs)/messages/[chatId]
/(tabs)/favorites
/(tabs)/profile
/(tabs)/profile/edit-profile
/(tabs)/settings
/notifications (modal)
/onboarding
Programmatic Navigation
import { useRouter } from 'expo-router';
const router = useRouter();
// Navigate to tab
router.push('/(tabs)/explore');
// Navigate with parameters
router.push({
pathname: '/(tabs)/(home)/item-detail',
params: { id: '123' }
});
// Open modal
router.push('/notifications');
// Go back
router.back();
📦 Mock Data
Location: mocks/data.ts
Available data:
mockItems- Lista de items para explore/homemockActivities- Actividades para activity feedmockConversations- Conversaciones para messagesmockMessages- Mensajes para chat individualmockNotifications- Notificaciones
Structure of Item:
interface Item {
id: string;
title: string;
description: string;
image: string;
category: string;
author: string;
authorAvatar: string;
date: string;
likes: number;
comments: number;
}
🎨 Design Constants
Location: constants/colors.ts
Exports:
export const Colors = { /* 30+ colores */ };
export const Spacing = { xs, sm, md, lg, xl, xxl, xxxl };
export const FontSizes = { xs, sm, md, lg, xl, xxl, xxxl, display };
export const FontWeights = { regular, medium, semibold, bold };
export const BorderRadius = { sm, md, lg, xl, full };
Usage:
import { Colors, Spacing, FontSizes, BorderRadius } from '@/constants/colors';
const styles = StyleSheet.create({
container: {
padding: Spacing.md,
backgroundColor: Colors.surface,
borderRadius: BorderRadius.lg,
},
text: {
fontSize: FontSizes.lg,
color: Colors.text,
},
});
🔧 Utilities
Location: utils/helpers.ts
Available functions:
// Haptic feedback
triggerHaptic(type: 'light' | 'medium' | 'heavy' | 'success' | 'warning' | 'error')
// Formateo de tiempo relativo
formatRelativeTime(date: string | Date): string // "2m ago", "5h ago", etc.
// Generar color aleatorio
getRandomColor(): string
// Abreviar números
abbreviateNumber(num: number): string // 1000 → "1K", 1000000 → "1M"
// Validación
isValidEmail(email: string): boolean
isValidUrl(url: string): boolean
// Generar ID único
generateId(): string
📄 Additional Screens
Notifications
Location: app/notifications.tsx
Tipo: Modal
Features:
- Lista de notificaciones
- Marca como leída
- Empty state
Onboarding
Location: app/onboarding.tsx
Features:
- 3 slides con animaciones
- Skip/Next buttons
- Get Started button
- Navegación a tabs después
✅ Checklist de Funcionalidades
Navegación
- Tab navigation (7 tabs)
- Stack navigation dentro de tabs
- Modales
- Parámetros de ruta
- Deep linking preparado
UI/UX
- Dark mode (3 modos)
- Internacionalización (2 idiomas)
- Haptic feedback
- Pull to refresh
- Loading states (skeletons)
- Empty states
- Error handling
- Toast notifications
- Animaciones sutiles
Estado
- Contextos globales (4)
- Persistencia con AsyncStorage
- React Query setup
- Estado local optimizado
Componentes
- 12+ componentes reutilizables
- TypeScript completo
- Props documentadas
- Variantes múltiples
Accesibilidad
- testIDs en componentes
- Colores con contraste adecuado
- Feedback visual
- Estados de loading/error
🚀 Próximos Pasos Sugeridos
To customize this boilerplate for your app:
- Define tu dominio - ¿Es una app de e-commerce, red social, productividad?
- Modifica los tipos - Actualiza
types/index.tscon tus modelos - Personaliza los tabs - Cambia nombres, iconos, o agrega/elimina tabs
- Agrega tu lógica de negocio - Integra APIs, base de datos
- Personaliza el diseño - Modifica colores en
constants/colors.ts - Agrega features específicas:
- Autenticación → Ver
docs/AUTHENTICATION.md - Base de datos → Ver
docs/DATABASE.md - Monetización → Ver
docs/REVENUECAT.md
- Autenticación → Ver
📚 Documentación Relacionada
- ARCHITECTURE.md - Patrones y estructura
- COMPONENTS.md - Guía detallada de componentes
- NAVIGATION.md - Sistema de navegación
- STATE_MANAGEMENT.md - Manejo de estado
- STYLING.md - Sistema de diseño
- ADDING_FEATURES.md - Cómo agregar nuevas funcionalidades
- I18N.md - Internacionalización detallada
- AUTHENTICATION.md - Implementar sistema de usuarios
- DATABASE.md - Conectar base de datos
- REVENUECAT.md - Monetización con IAPs