Skip to content

Latest commit

 

History

History
89 lines (67 loc) · 2.25 KB

File metadata and controls

89 lines (67 loc) · 2.25 KB

Quick Start Guide

Initial Setup

  1. Install dependencies:

    npm install

    If you encounter peer dependency conflicts, you can use:

    npm install --legacy-peer-deps

    (This is usually not needed, but can help with version conflicts)

  2. Start the development server:

    npm start
  3. Choose your platform:

    • Press i for iOS simulator
    • Press a for Android emulator
    • Press w for web browser
    • Scan QR code with Expo Go app on your phone

Project Structure Overview

Models (OOP Classes)

  • Activity.ts - Activity model with business logic methods
  • User.ts - User model with role checking methods

Services (API Integration)

  • BaseService.ts - Abstract base class for all API services
  • ActivityService.ts - Handles all activity-related API calls
  • AuthService.ts - Handles authentication (ready for implementation)

Screens

  • HomeScreen.tsx - Landing page
  • ActivitiesScreen.tsx - List of all activities
  • AdminDashboardScreen.tsx - Admin features (desktop only)
  • OfficePortalScreen.tsx - Office staff features (desktop only)

Components

  • Button.tsx - Reusable button component
  • ActivityCard.tsx - Activity display card

Next Steps

  1. Configure AWS API:

    • Update src/utils/Config.ts with your API Gateway URL
    • Or set EXPO_PUBLIC_API_URL environment variable
  2. Add Assets:

    • Add app icons and splash screens to assets/ directory
    • See assets/README.md for details
  3. Implement Authentication:

    • Complete token storage in AuthService.ts
    • Add login/register screens
    • Implement protected routes
  4. Connect to Backend:

    • Deploy AWS Lambda functions
    • Test API endpoints
    • Update service methods as needed

Development Tips

  • All services use singleton pattern - access via Service.getInstance()
  • Models have helper methods like isAvailable(), getRemainingSpots()
  • Platform detection: PlatformDetector.getInstance().isDesktopPlatform()
  • Services automatically handle auth tokens via interceptors

Common Commands

# Type checking
npm run type-check

# Run on specific platform
npm run ios
npm run android
npm run web

# Build for production (web)
npm run build:web