How amirchoudhary09/check_your_mental_health works
Project Type & Purpose
• This is a native Android mobile app implementing an MVVM architecture.
• Purpose: provide mental-health services via AI chat, quizzes, 1:1 sessions with licensed psychologists, and ad-supported revenue.
File Structure & Code Patterns
• Single Gradle module (“app”) with standard Android hierarchy under src/main/java and src/main/res.
• Packages:
• Authentication (login, signup, password recovery)
• Test (quiz flows)
• appointmentsRV, doctorsRV, workshopsRV (RecyclerView adapters & data models)
• Activities & Fragments (entry points, navigation)
• MVVM: UI layer (Activities/Fragments) ↔ ViewModels (not explicit packages but implied) ↔ Data layer (Firebase).
Key Services & External Dependencies
• Firebase Authentication: email/OAuth login & user management.
• Firebase Realtime Database: chat messages, appointment schedules.
• AI Chatbot Service: an external ML/REST API for conversational support.
• Google Ads SDK: ad retrieval/display.
• Real-Time Specialist Interaction: likely WebSockets or Firebase Cloud Messaging for notifications.
• Protected Resources: data-extraction & backup XML rules.
Main Components & Their Relationships
• Mobile App
• Presentation Layer: Activities & Fragments
• ViewModel Layer: state holders, business logic
• Repository/Data Layer: interfaces to Firebase & AI service
• Firebase
• Auth Module
• Realtime Database
• Cloud Messaging (notifications)
• External AI Chatbot API
• Psychologist Scheduling Backend (could be part of Firebase or a separate microservice)
• Google Ads Service
• Local Persistence (e.g., SharedPreferences or local DB – implied by data‐extraction rules)
Architectural Patterns & Design Principles
• MVVM: clear separation of concerns.
• Repository Pattern: abstract data-source access (Firebase, AI, local).
• Dependency Injection (if used – look for Hilt/Dagger).
• RecyclerViews for listing doctors, appointments, workshops.