A modern Android application for AFL watch parties built with Kotlin, Jetpack Compose, and Clean Architecture. Features a complete event management system with location-based discovery, smart notifications, and gamification elements.
- Firebase Authentication: Google Sign-In and email/password registration
- User Onboarding: Multi-step registration flow with validation
- Profile Management: User profile with points system and team selection
- QR Code Generation: Personal QR codes for user identification
- Legal Documents: Built-in Privacy Policy and Terms & Conditions viewer
- Event Creation: Full event hosting with match details, location, and amenities
- Event Discovery: Interactive map with Google Maps integration
- Location-Based Search: Find events by location with geocoding
- Event Details: Comprehensive event information with attendee tracking
- Event Updates: Real-time event modification and notifications
- Google Maps Integration: Interactive map with custom markers
- Location Services: GPS tracking and location-based event filtering
- Nearby Events: Automatic detection of events within 3km radius
- Location Search: Geocoding for address-based event discovery
- Viewport-Based Loading: Efficient event loading based on map view
- Favorite Team Alerts: Notifications when favorite teams have events nearby (5km)
- Proximity Notifications: Real-time alerts when approaching events (100m)
- Event Updates: Notifications for event changes and cancellations
- Location-Based Triggers: Automatic notifications based on location changes
- Points System: Earn points for event participation and check-ins
- Points Levels: Rookie Fan โ Regular Supporter โ Dedicated Fan โ Super Fan โ Ultimate Fan โ Legend
- Shake-to-Reveal: Interactive points reveal with haptic feedback
- Points Tracking: Real-time points updates and history
- QR Code Scanning: Camera-based QR code scanning for event check-in
- Secure Check-in: Duplicate check-in prevention and validation
- Host Event Discovery: Scan host QR codes to find their events
- Check-in Confirmation: Visual confirmation with points rewards
- Microphone Sampling: Real-time audio level detection using device microphone
- Event Ambiance Tracking: Capture and store audio snapshots during events
- Rolling Average Calculation: 20-minute rolling average of event noise levels
- Ambiance Analytics: Track event atmosphere and energy levels
- Jetpack Compose: Modern declarative UI with custom components
- Custom Theme: Racing Sans One typography with orange/yellow color scheme
- Material Design 3: Latest Material Design components and patterns
- Responsive Design: Adaptive layouts for different screen sizes
- Custom Icons: Professional visibility toggles and menu icons
- MVVM Pattern: Model-View-ViewModel architecture with reactive data streams
- Clean Architecture: Separation of concerns with domain, data, and presentation layers
- Dependency Injection: Hilt for comprehensive dependency management
- Repository Pattern: Abstracted data access with repository interfaces
- Use Cases: Business logic encapsulated in use case classes
- Error Handling: Comprehensive error handling with user-friendly messages
This project follows MVVM (Model-View-ViewModel) architecture pattern with Clean Architecture principles:
โโโโโโโโโโโโโโโโโโโ
โ Presentation โ โ Jetpack Compose UI + ViewModels
โโโโโโโโโโโโโโโโโโโค
โ Domain โ โ Business Logic + Use Cases
โโโโโโโโโโโโโโโโโโโค
โ Data โ โ Repositories + Data Sources
โโโโโโโโโโโโโโโโโโโ
app/src/main/java/com/example/mobilecomputingassignment/
โโโ data/ # โ
Data Layer
โ โโโ constants/ # โ
Constant data sources
โ โ โโโ TeamConstants.kt # AFL team data with local logos
โ โโโ models/ # โ
Data transfer objects
โ โ โโโ UserDto.kt # User data model
โ โ โโโ EventDto.kt # Event data model
โ โ โโโ MatchDetailsDto.kt # Match data model
โ โโโ remote/ # โ
External data sources
โ โ โโโ firebase/ # Firebase integration
โ โ โโโ FirestoreService.kt # Firestore database service
โ โ โโโ EventFirestoreService.kt # Event-specific operations
โ โโโ repository/ # โ
Repository implementations
โ โ โโโ UserRepository.kt # User data repository
โ โ โโโ EventRepository.kt # Event data repository
โ โโโ service/ # โ
Background services
โ โโโ FavoriteTeamNotificationService.kt # Smart notifications
โ โโโ EventNotificationService.kt # Event notifications
โ โโโ FavoriteTeamMonitorService.kt # Location monitoring
โ
โโโ domain/ # โ
Business Logic Layer
โ โโโ models/ # โ
Domain models
โ โ โโโ User.kt # User domain model
โ โ โโโ Event.kt # Event domain model
โ โ โโโ MatchDetails.kt # Match domain model
โ โโโ repository/ # โ
Repository interfaces
โ โ โโโ IUserRepository.kt # User repository contract
โ โ โโโ IEventRepository.kt # Event repository contract
โ โโโ usecases/ # โ
Business use cases
โ โ โโโ auth/ # Authentication operations
โ โ โ โโโ CheckEmailExistUseCase.kt
โ โ โ โโโ CheckUsernameExistUseCase.kt
โ โ โ โโโ GoogleSignInUseCase.kt
โ โ โ โโโ LoginUseCase.kt
โ โ โ โโโ RegisterUseCase.kt
โ โ โโโ events/ # Event operations
โ โ โ โโโ CreateEventUseCase.kt
โ โ โ โโโ GetUserEventsUseCase.kt
โ โ โ โโโ UpdateEventUseCase.kt
โ โ โโโ notifications/ # Notification operations
โ โ โโโ ManageFavoriteTeamNotificationsUseCase.kt
โ โโโ util/ # โ
Domain utilities
โ โโโ NoiseSampler.kt # Audio sampling utility
โ
โโโ presentation/ # โ
UI Layer
โ โโโ ui/ # Jetpack Compose UI
โ โ โโโ component/ # โ
Reusable components
โ โ โ โโโ ProfileCard.kt # User profile component
โ โ โ โโโ ShakeToReveal.kt # Points reveal component
โ โ โ โโโ MapPickerDialog.kt # Location picker
โ โ โโโ screen/ # โ
All app screens
โ โ โ โโโ auth/ # Authentication screens
โ โ โ โ โโโ LoginStep.kt # Login screen
โ โ โ โ โโโ OnboardingScreen.kt # Onboarding flow
โ โ โ โ โโโ SignupSteps.kt # Registration steps
โ โ โ โโโ main/ # Main app screens
โ โ โ โ โโโ MainAppScreen.kt # Main navigation
โ โ โ โ โโโ ExploreScreen.kt # Map and discovery
โ โ โ โ โโโ EventsScreen.kt # Event management
โ โ โ โ โโโ ProfileScreen.kt # User profile
โ โ โ โโโ events/ # Event-specific screens
โ โ โ โ โโโ CreateEventScreen.kt # Event creation
โ โ โ โ โโโ EventDetailsScreen.kt # Event details
โ โ โ โ โโโ CheckInCompleteScreen.kt # Check-in flow
โ โ โ โโโ qr/ # QR code screens
โ โ โ โโโ QRCodeScreen.kt # QR code display
โ โ โ โโโ QRScannerScreen.kt # QR code scanning
โ โ โโโ theme/ # โ
Custom WatchMates theme
โ โ โโโ Color.kt # Color scheme
โ โ โโโ Theme.kt # Theme definition
โ โ โโโ Type.kt # Typography (Racing Sans One)
โ โโโ viewmodel/ # โ
State management
โ โ โโโ AuthViewModel.kt # Authentication view model
โ โ โโโ ProfileViewModel.kt # Profile view model
โ โ โโโ EventViewModel.kt # Event view model
โ โ โโโ ExploreViewModel.kt # Map exploration view model
โ โ โโโ CheckInViewModel.kt # Check-in view model
โ โ โโโ PointsViewModel.kt # Points system view model
โ โโโ utils/ # โ
UI utilities
โ โโโ QRCodeGenerator.kt # QR code generation
โ โโโ ContentFilter.kt # Content validation
โ
โโโ core/ # โ
Infrastructure
โ โโโ di/ # Dependency injection (Hilt)
โ โโโ AppModule.kt # Application module
โ โโโ RepositoryModule.kt # Repository bindings
โ
โโโ MainActivity.kt # โ
Main entry point
โโโ WatchMatesApplication.kt # โ
Application class with Hilt
Legend: โ
Fully Implemented | ๐ In Progress | ๐ฒ Planned
- Kotlin - Primary programming language with modern language features
- Jetpack Compose - Declarative UI toolkit with custom components
- MVVM Architecture - Reactive architecture with StateFlow
- Clean Architecture - Domain-driven design with clear separation of concerns
- Hilt - Comprehensive dependency injection framework
- Navigation Compose - Type-safe navigation between screens
- ViewModel - UI state management with lifecycle awareness
- StateFlow - Reactive data streams for real-time UI updates
- Lifecycle Components - Proper lifecycle management for all components
- Firebase Authentication - Google Sign-In and email/password authentication
- Cloud Firestore - Real-time NoSQL database with offline support
- Firebase Storage - File storage for user avatars and event images
- Firebase Cloud Messaging - Push notifications for event updates
- Google Maps SDK - Interactive maps with custom markers and clustering
- Location Services - GPS tracking with permission management
- Geocoding API - Address-to-coordinates conversion
- Haversine Formula - Distance calculations for nearby events
- CameraX - QR code scanning with ML Kit integration
- AudioRecord API - Real-time microphone sampling for ambiance capture
- ZXing - QR code generation and scanning
- Vibration API - Haptic feedback for interactions
- Material Design 3 - Latest Material Design components
- Coil - Efficient image loading and caching
- Custom Components - Reusable UI components with consistent theming
- Responsive Design - Adaptive layouts for different screen sizes
- Gradle KTS - Type-safe build configuration
- ProGuard - Code obfuscation and optimization
- Logging - Comprehensive logging with different levels
- Error Handling - Graceful error handling with user-friendly messages
One of the most innovative features is the real-time audio ambiance capture:
- Microphone Sampling: Uses Android's AudioRecord API to capture 0.8-second audio samples
- dBFS Calculation: Converts audio levels to decibels relative to full scale for consistent measurement
- Rolling Average: Maintains a 20-minute rolling average of event noise levels
- Event Atmosphere: Tracks the energy and atmosphere of watch parties in real-time
- Privacy-Focused: Only captures audio levels, not actual audio content
Interactive points system with engaging UX:
- Shake Detection: Uses device accelerometer to detect shake gestures
- Haptic Feedback: Vibration patterns provide tactile feedback
- Points Animation: Smooth animations reveal earned points
- Level Progression: Six distinct fan levels from "Rookie Fan" to "Legend"
- Random Rewards: Points range from 10-50 for each check-in
Intelligent location-based notifications:
- Favorite Team Alerts: Notifications when your teams have events within 5km
- Proximity Notifications: Real-time alerts when you're within 100m of an event
- Location Triggers: Automatic notifications based on significant location changes
- Duplicate Prevention: Smart tracking prevents notification spam
- Haversine Distance: Accurate distance calculations using spherical geometry
Professional software engineering practices:
- Domain-Driven Design: Business logic separated from framework concerns
- Repository Pattern: Abstracted data access with clear interfaces
- Use Case Classes: Single-responsibility business operations
- Dependency Injection: Hilt provides comprehensive DI with minimal boilerplate
- Reactive Programming: StateFlow and Compose for reactive UI updates
- Error Handling: Comprehensive error handling with user-friendly messages
Cutting-edge mobile design patterns:
- Material Design 3: Latest Material Design components and theming
- Custom Components: Reusable UI components with consistent styling
- Responsive Layouts: Adaptive designs for different screen sizes
- Custom Typography: Racing Sans One font for sports-themed branding
- Color Psychology: Orange/yellow theme for energy and excitement
Leveraging modern Android capabilities:
- CameraX Integration: Modern camera API for QR code scanning
- Location Services: GPS tracking with permission management
- Google Maps: Interactive maps with custom markers and clustering
- Firebase Integration: Real-time database with offline support
- Background Services: Location monitoring for smart notifications
- Android Studio Arctic Fox or later
- Android SDK 24 or higher
- Google Play Services
- Firebase project setup
-
Clone the repository
git clone [[repository-url]](https://github.com/kevicebryan/COMP90018-Assignment.git) cd watchalong-app -
Firebase Configuration
- Create a Firebase project at Firebase Console
- Enable Authentication, Firestore, and Storage
- Download
google-services.jsonand place it inapp/directory
-
API Keys Setup
- Create
local.propertiesfile in root directory - Add your Google Maps API key:
# Google Maps API Key (keep this secret!) MAPS_API_KEY=your_google_maps_api_key_here
โ ๏ธ Important: The Google Maps API key is required for the explore maps functionality.- Get your API key from the Google Cloud Console
- Enable the Maps SDK for Android API
- For detailed setup instructions and API key configuration, refer to the separate documentation repository
- Never commit your API key to version control - the
local.propertiesfile is already in.gitignore
- Create
-
Build and Run
./gradlew assembles
WatchMates includes a comprehensive legal document management system:
- Comprehensive privacy protection guidelines
- Age restriction compliance (18+/21+ legal drinking age)
- Location data usage transparency
- Anonymous data collection policies
- User rights and data retention information
- Age verification requirements for alcohol-serving venues
- Community guidelines for sports watch-along events
- User responsibilities and acceptable use policies
- Venue liability disclaimers
- Legal jurisdiction and governing law
- Easy Content Management: Update legal documents in
LegalDocuments.kt - Professional Presentation: Consistent styling with app theme
- Accessible Navigation: Direct access from user profile
- Version Control: Track document changes with Git
- Compliance Ready: Structured for legal review and approval
Profile Menu
โโโ ๐ฑ Show QR
โโโ โฝ Teams
โโโ โน๏ธ Privacy Policy โ Legal Documents
โโโ ๐ Terms & Conditions โ Legal Documents
โโโ ๐ช Log Out
- Legal Drinking Age Requirement: 18+ or 21+ depending on jurisdiction
- Venue Alcohol Service: Clear disclaimers about alcohol-serving venues
- User Responsibility: Explicit acknowledgment of personal responsibility
- Community Safety: Guidelines for respectful participation
-
Onboarding & Authentication
- Welcome screen with app introduction
- Google Sign-In or email/password registration
- Multi-step profile setup with team selection
- QR code generation for user identification
-
Event Discovery & Creation
- Interactive map with Google Maps integration
- Location-based event filtering (3km radius)
- Create events with match details and amenities
- Real-time event updates and notifications
-
Event Participation
- Scan host QR codes to discover events
- Secure check-in with duplicate prevention
- Audio ambiance capture during events
- Points earning with shake-to-reveal interaction
-
Smart Notifications
- Favorite team alerts (5km radius)
- Proximity notifications (100m radius)
- Location-based event discovery
- Real-time event updates
-
Profile & Gamification
- Points tracking with six fan levels
- Event history and statistics
- Team preferences and notifications
- Legal documents and settings
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ Presentation โ โ Domain โ โ Data โ
โ โ โ โ โ โ
โ Jetpack Compose โโโโโบโ Use Cases โโโโโบโ Repositories โ
โ ViewModels โ โ Domain Models โ โ Firebase โ
โ StateFlow โ โ Business Logic โ โ Google Maps โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
- Firebase Firestore: Real-time database with offline support
- StateFlow: Reactive UI updates with lifecycle awareness
- Location Services: Continuous GPS tracking for smart notifications
- Background Services: Location monitoring and notification management
src/test/ # Unit Tests
โโโ data/repository/ # Repository tests
โโโ domain/usecases/ # Use case tests
โโโ presentation/viewmodels/ # ViewModel tests
src/androidTest/ # Integration Tests
โโโ data/local/ # Database tests
โโโ ui/ # UI tests
โโโ di/ # DI tests
# Unit tests
./gradlew test
# Instrumented tests
./gradlew connectedAndroidTest- Debug - Development build with logging
- Release - Production build with ProGuard
- Dev - Development environment
- Prod - Production environment
- Follow Kotlin Coding Conventions
- Use meaningful variable and function names
- Write KDoc for public APIs
- Keep functions small and focused
- Use feature branches:
feature/map-integration - Write descriptive commit messages
- Create pull requests for code review
- Data layer should not depend on presentation layer
- Domain layer should not depend on Android framework
- ViewModels should not hold references to Views
- Use dependency injection for all dependencies
- Fork the repository
- Create a feature branch
- Follow coding standards
- Write tests for new features
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Complete Navigation System: Full navigation with bottom tabs and screen transitions
- Comprehensive Error Handling: User-friendly error messages with proper error states
- Robust Input Validation: Email/username validation with content filtering
- Consistent Loading States: Loading indicators across all screens and operations
- Full Testing Coverage: Unit tests for use cases and integration tests for repositories
- Repository Pattern: Complete implementation with UserRepository and EventRepository
- Use Case Classes: Comprehensive business logic with auth, events, and notification use cases
- Firebase Integration: Real-time database with offline support and cloud functions
- Navigation System: Compose Navigation with type-safe navigation and deep linking
- Audio Ambiance Capture: Real-time microphone sampling with dBFS calculation
- Smart Notifications: Location-based notifications with proximity detection
- Gamification System: Points system with shake-to-reveal interactions
- QR Code System: Complete QR generation and scanning with camera integration
- Location Services: GPS tracking with Google Maps integration and geocoding
- Clean Architecture: Proper separation of concerns with domain, data, and presentation layers
- Dependency Injection: Comprehensive Hilt setup with proper scoping
- Reactive Programming: StateFlow and Compose for reactive UI updates
- Modern Android APIs: CameraX, Location Services, and Material Design 3
- Performance Optimization: Efficient image loading, viewport-based loading, and memory management
- Material Design 3: Latest Material Design components with custom theming
- Responsive Design: Adaptive layouts for different screen sizes and orientations
- Custom Components: Reusable UI components with consistent styling
- Accessibility: Proper accessibility support with content descriptions and navigation
- User Experience: Intuitive navigation with clear visual feedback and animations
- Offline Support: Room database for offline data storage and synchronization
- Push Notifications: Firebase Cloud Messaging for real-time notifications
- Social Features: Event sharing, user profiles, and social interactions
- Analytics: User behavior tracking and event analytics
- Performance: Further optimization with image caching and lazy loading
For questions or issues:
- Create an issue in the repository
- Contact the development team
- Check the documentation wiki
Built with โค๏ธ using Kotlin and Jetpack Compose