A modern React Native application built with Expo and TypeScript for browsing and booking fitness classes.
Features beautiful Indian-themed design with smooth animations and intuitive user experience.
- Class Listings: Display comprehensive class information including name, level, instructor, and center
- Smart Filters:
- Level filter chips (Beginner/Intermediate/Advanced) with color-coded design
- Instructor dropdown with searchable modal interface
- Quick Booking:
- One-tap booking with optimistic UI updates
- 15% simulated failure rate with automatic rollback
- Toast notifications for success/error states
- Loading & Empty States:
- Animated loading spinner on app start
- Helpful empty state with "Clear Filters" functionality
- User Information Display: Avatar, name, mobile, credits, city, and join date
- Editable Name: Inline editing with modal interface and local storage persistence
- Modern Card Design: Clean information cards with icons and proper hierarchy
- Framework: Expo (React Native + TypeScript)
- Navigation: React Navigation v6 with bottom tabs
- State Management: React hooks (useState, useEffect)
- Storage: AsyncStorage for profile data persistence
- UI Components: Custom component library with consistent theming
- Notifications: React Native Toast Message
src/
βββ components/ # Reusable UI components
β βββ Button.tsx # Customizable button with variants and states
β βββ ClassCard.tsx # Class information display with booking
β βββ LevelChip.tsx # Filter chip component
βββ data/ # Mock data and constants
β βββ mockData.ts # Classes and user data
βββ screens/ # Screen components
β βββ HomeScreen.tsx # Class browsing and filtering
β βββ ProfileScreen.tsx # User profile with editing
βββ theme/ # Design system
β βββ index.ts # Colors, typography, spacing, shadows
βββ types/ # TypeScript definitions
β βββ index.ts # Interfaces for Class, User, etc.
βββ hooks/ # Custom hooks (reserved for future use)
- Colors: Modern color palette with semantic naming
- Typography: Hierarchical text styles (h1, h2, h3, body, caption)
- Spacing: Consistent spacing scale (xs, sm, md, lg, xl, xxl)
- Shadows: Layered shadow system for depth
- Border Radius: Consistent corner radius values
- Node.js (v16 or later)
- npm or yarn
- Expo Go app on your mobile device (or simulator)
-
Clone the repository
git clone https://github.com/35sonu/Browse-Class.git cd Browse-Class -
Install dependencies
npm install
-
Start the development server
npx expo start
-
Run on your device
- π± Mobile: Install Expo Go and scan the QR code
- π» Web: Press
wor visithttp://localhost:8081 - π€ Android: Press
a(requires Android Studio/emulator) - π iOS: Press
i(requires Xcode - macOS only)
# Start development server
npm start
# Run on web browser
npm run web
# Run on Android
npm run android
# Run on iOS
npm run ios- Optimistic Updates: Booking appears instantly, then rollback on failure for better perceived performance
- Progressive Disclosure: Filters are easily accessible but don't overwhelm the interface
- Consistent Feedback: Toast messages provide clear success/error communication
- Touch-Friendly: All interactive elements meet minimum touch target sizes
- Component Composition: Reusable components with prop-based customization
- TypeScript: Strong typing for better developer experience and fewer runtime errors
- Local State: Simple useState/useEffect pattern appropriate for app scope
- File Organization: Feature-based structure for scalability
- Modern Material Design: Elevated cards with consistent shadows and spacing
- Color Psychology: Different colors for class levels (green=easy, amber=medium, red=hard)
- Visual Hierarchy: Clear information hierarchy with appropriate font weights and sizes
- Responsive Layout: Flexible layouts that work on various screen sizes
- Optimistic Updates: UI updates immediately, then handles server response
- Filter State: Centralized filter state with derived computed values
- Local Persistence: User profile changes saved to AsyncStorage
- Error Boundaries: Graceful error handling with user-friendly messages
- Open the app and wait for loading to complete
- Try level filter chips - notice color-coded selections
- Use instructor dropdown - see modal interface
- Apply multiple filters simultaneously
- Clear all filters using empty state button
- Find an available class
- Tap "Quick Book" - notice immediate UI update
- Wait for simulation to complete
- Observe success toast or rollback behavior on failure
- Navigate to Profile screen
- Tap edit icon next to name
- Modify name in modal
- Save changes - persistence confirmed on app restart
- Lazy Loading: Components render efficiently with proper key props
- Optimized Filtering: Efficient array operations with early returns
- Memory Management: Proper cleanup of timers and effects
- Bundle Size: Minimal dependencies, tree-shaking friendly imports
- Search: Text-based class search functionality
- Favorites: Save favorite classes and instructors
- Calendar: Schedule view with time slots
- Push Notifications: Booking confirmations and reminders
- Offline Support: Cached data for offline browsing
- Authentication: User login and personalization
The app includes comprehensive error simulation and state management testing:
- Booking Failures: 15% random failure rate for realistic testing
- Network Simulation: Loading states and error handling
- Data Persistence: Profile changes survive app restarts
- Filter Edge Cases: Empty states and filter combinations
Development Time: ~4-5 hours
Focus Areas: Clean architecture (40%), Intuitive UI/UX (30%), Product thinking (20%), Documentation (10%)