Features and Screens - PlugImt/transat-app GitHub Wiki

Features & Screens

๐Ÿ  Home Screen

The Home screen is the central hub of the Transat 2.0 app, featuring a customizable widget system that provides quick access to essential campus services.

Key Features

  • Customizable Widgets: Drag-and-drop widget reordering
  • Real-time Data: Live updates for weather, restaurant, and washing machines
  • Pull-to-Refresh: Manual data refresh capability
  • Dark/Light Theme Support: Automatic theme switching

Widget System

The home screen uses a draggable widget system powered by react-native-draggable-flatlist:

  1. Weather Widget

    • Current weather conditions
    • Temperature and weather icon
    • Location-based data
    • Loading skeleton during data fetch
  2. Restaurant Widget

    • Daily menu display
    • Lunch and dinner options
    • Real-time menu updates
    • Weekend status handling
  3. Washing Machine Widget

    • Machine availability status
    • Real-time occupancy tracking
    • Push notification integration
    • Machine booking interface

Widget Customization

Users can customize their home screen through the widget customization modal:

  • Enable/disable specific widgets
  • Reorder widgets via drag-and-drop
  • Personalized dashboard experience

๐Ÿ” Authentication System

Comprehensive authentication flow supporting multiple sign-in methods and user management.

Sign In Flow

  • Email/Password Authentication
  • Social Sign-In Options (if configured)
  • Forgot Password Recovery
  • Account Verification

Registration Process

  • User Account Creation
  • Email Verification
  • Profile Setup
  • Campus Affiliation

Security Features

  • Secure Token Storage
  • Biometric Authentication (Face ID/Touch ID)
  • Session Management
  • Password Strength Validation

Authentication Screens

  • src/app/screens/auth/: Authentication-related screens
  • Login/Register forms with validation
  • Password recovery workflow
  • Account verification process

๐Ÿฝ๏ธ Restaurant Services

Comprehensive dining information and menu management for campus restaurants.

Menu Display

  • Daily Menu: Current day's lunch and dinner options
  • Meal Categories: Starters, mains, desserts, sides
  • Nutritional Information: Dietary restrictions and allergens
  • Price Information: Meal pricing and payment options

Features

  • Real-time Updates: Live menu changes
  • Weekend Handling: Special weekend menu display
  • Meal Time Detection: Automatic lunch/dinner switching
  • Favorites System: Save preferred meals

Restaurant Screen Components

// Restaurant.tsx features:
- Menu browsing interface
- Meal categorization
- Nutritional information display
- Real-time availability updates

๐Ÿงบ Washing Machine Management

Advanced washing machine booking and monitoring system with real-time updates.

Machine Monitoring

  • Real-time Status: Available, occupied, out of order
  • Booking System: Reserve machines in advance
  • Queue Management: Fair usage scheduling
  • Usage Statistics: Track washing patterns

Notification System

  • Start Notifications: When cycle begins
  • Completion Alerts: When washing is done
  • Availability Alerts: When preferred machine becomes available
  • Maintenance Notifications: Service updates

Smart Features

  • Push Notification Integration: Expo notifications
  • Background Updates: Real-time status tracking
  • Machine Preferences: Favorite machine selection
  • Usage History: Track personal washing history

Washing Machine Screen

// WashingMachine.tsx features:
- Live machine status grid
- Booking interface
- Notification preferences
- Usage analytics

๐ŸŽฎ Games & Entertainment

Interactive games and entertainment features for campus community engagement.

Available Games

  • Trivia Contests: Campus and general knowledge
  • Social Games: Community interaction features
  • Leaderboards: Competitive scoring system
  • Daily Challenges: Regular engagement content

Social Features

  • Player Profiles: User statistics and achievements
  • Community Interaction: Social gaming elements
  • Achievement System: Unlock rewards and badges
  • Event Participation: Special gaming events

๐Ÿ‘ค Account Management

Comprehensive user profile and account settings management.

Profile Management

  • Personal Information: Name, email, student ID
  • Profile Picture: Image upload and management
  • Campus Affiliation: School and department info
  • Privacy Settings: Data visibility controls

Settings & Preferences

  • Theme Selection: Light/dark mode preferences
  • Language Settings: Multi-language support
  • Notification Preferences: Granular notification controls
  • Data Management: Export and delete account data

Account Settings Screen Structure

src/app/screens/account/
โ”œโ”€โ”€ settings/               # Settings subdirectory
โ”‚   โ”œโ”€โ”€ Profile.tsx        # Profile management
โ”‚   โ”œโ”€โ”€ Notifications.tsx  # Notification preferences
โ”‚   โ”œโ”€โ”€ Privacy.tsx        # Privacy settings
โ”‚   โ””โ”€โ”€ About.tsx          # App information
โ””โ”€โ”€ AccountMain.tsx        # Main account screen

๐Ÿ”ง Services Overview

Additional campus services accessible through the app.

Clubs & Organizations

  • Club Directory: Campus organization listings
  • Event Calendar: Club events and activities
  • Membership Management: Join and manage club memberships
  • Communication Tools: Club messaging and updates

Campus Services Integration

  • Academic Calendar: Important academic dates
  • Campus Maps: Interactive location guides
  • Resource Booking: Room and facility reservations
  • Support Services: Help desk and IT support

๐Ÿ“ฑ Screen Architecture

Navigation Hierarchy

App Root
โ”œโ”€โ”€ Authentication Stack
โ”‚   โ”œโ”€โ”€ Login
โ”‚   โ”œโ”€โ”€ Register
โ”‚   โ”œโ”€โ”€ Forgot Password
โ”‚   โ””โ”€โ”€ Verification
โ”œโ”€โ”€ Main Tab Navigator
โ”‚   โ”œโ”€โ”€ Home (Widget Dashboard)
โ”‚   โ”œโ”€โ”€ Services
โ”‚   โ”‚   โ”œโ”€โ”€ Restaurant
โ”‚   โ”‚   โ”œโ”€โ”€ Washing Machines
โ”‚   โ”‚   โ”œโ”€โ”€ Clubs
โ”‚   โ”‚   โ””โ”€โ”€ Games
โ”‚   โ”œโ”€โ”€ Games Hub
โ”‚   โ””โ”€โ”€ Account
โ”‚       โ”œโ”€โ”€ Profile
โ”‚       โ”œโ”€โ”€ Settings
โ”‚       โ””โ”€โ”€ Preferences
โ””โ”€โ”€ Modal Screens
    โ”œโ”€โ”€ Widget Customization
    โ”œโ”€โ”€ Machine Booking
    โ””โ”€โ”€ Game Sessions

Screen Components Structure

Each screen follows a consistent pattern:

  • Page Wrapper: Consistent layout and safe area handling
  • Header: Navigation and action buttons
  • Content Area: Main screen content
  • Loading States: Skeleton loaders and spinners
  • Error Handling: Error boundaries and retry mechanisms

Common Screen Patterns

Data Loading Pattern

export const ExampleScreen = () => {
  const { data, isLoading, error, refetch } = useQuery({
    queryKey: ['example'],
    queryFn: fetchData
  });

  if (isLoading) return <LoadingSkeleton />;
  if (error) return <ErrorState onRetry={refetch} />;
  
  return (
    <Page>
      {/* Screen content */}
    </Page>
  );
};

Form Screen Pattern

export const FormScreen = () => {
  const { control, handleSubmit, formState } = useForm({
    resolver: zodResolver(schema)
  });

  return (
    <Page>
      <Form>
        {/* Form fields */}
      </Form>
    </Page>
  );
};

๐Ÿ”„ Real-time Features

Live Data Updates

  • WebSocket Connections: Real-time data streaming
  • Background Refresh: Automatic data synchronization
  • Optimistic Updates: Immediate UI feedback
  • Conflict Resolution: Handle concurrent updates

Push Notifications

  • Service Alerts: Restaurant menu changes, machine availability
  • Personal Reminders: Booking confirmations, task reminders
  • Campus Updates: Important announcements and events
  • Social Notifications: Game invitations, club updates

๐Ÿ“Š Analytics & Tracking

User Analytics

  • Screen Navigation: User journey tracking
  • Feature Usage: Popular features and interactions
  • Performance Metrics: App performance monitoring
  • Error Tracking: Crash reporting and error logs

Privacy-First Approach

  • Opt-in Analytics: User consent for data collection
  • Data Minimization: Collect only necessary data
  • Local Processing: Process data locally when possible
  • Transparent Reporting: Clear data usage policies

Next Steps: Explore the app's internationalization system in Internationalization documentation.

โš ๏ธ **GitHub.com Fallback** โš ๏ธ