# madhurakhandkar/roommatefinder architecture

> Architecture diagram of the GitHub repository madhurakhandkar/roommatefinder, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/madhurakhandkar/roommatefinder
- Repository: https://github.com/madhurakhandkar/roommatefinder

## Overview

##### Main components
- UI/Presentation Layer: This includes all the Android activities found in the “app/src/main/java/com/example/roombuds” folder (e.g., SplashScreenActivity, LoginActivity, MainActivity, SignUpActivity, CreateProfile, Profile, Notifications, AddCollege, and AddImage). These represent the primary screens users interact with.
- Resource Layer: The “res” folder under “app/src/main/res” contains layouts (XML files), drawable assets, fonts, and other UI resources. These support the look and feel of the app.
- Build & Configuration: The Gradle build scripts (build.gradle.kts, settings.gradle.kts, gradle wrapper, etc.) and configuration files (like google-services.json) represent the project’s build system and integration points (e.g., Firebase/Google Services).
- Testing: The “app/src/test” and “app/src/androidTest” directories underscore unit and instrumentation tests, indicating how components are verified.

##### Relationships and interactions
- Resource dependencies: Indicate that each Activity links to its corresponding layout files (found under “res/layout”).
- External Services: With the presence of the “google-services.json” file, indicate an integration with Firebase or Google APIs (for push notifications, analytics, or authentication).

##### Architectural patterns/design principles
- Modularity by showing the separation of resources from code, and test components which validate behavior predominantly via unit and instrumentation tests.

##### Relevant technologies/frameworks
- Kotlin as the programming language (as seen in build.gradle.kts and source files).
- Android SDK components (Activities, layouts, resources).
- Gradle and Kotlin DSL for build automation.
- Google Services/Firebase integration (inferred from google-services.json).
- Testing frameworks (JUnit in “src/test”, Espresso or similar in “src/androidTest”).

## Diagram (Mermaid)

```mermaid
graph TD
    %% UI/Presentation Layer
    subgraph "UI/Presentation Layer"
        sp["SplashScreenActivity"]:::ui
        la["LoginActivity"]:::ui
        su["SignUpActivity"]:::ui
        cp["CreateProfile"]:::ui
        ma["MainActivity"]:::ui
        pr["Profile"]:::ui
        noti["Notifications"]:::ui
        ac["AddCollege"]:::ui
        ai["AddImage"]:::ui
    end

    %% Resource Layer
    subgraph "Resource Layer"
        res["UI Resources (layouts, drawables, etc.)"]:::res
    end

    %% Build & Configuration
    subgraph "Build & Configuration"
        pbs["Project Build Script (build.gradle.kts)"]:::build
        abs["App Build Script (build.gradle.kts)"]:::build
        setnode["Settings (settings.gradle.kts)"]:::build
        gwrapper["Gradle Wrapper"]:::build
        gradlew["Gradlew"]:::build
        gradlewb["Gradlew.bat"]:::build
        gs["Google Services Config (google-services.json)"]:::build
    end

    %% Testing Infrastructure
    subgraph "Testing Infrastructure"
        unit["Unit Tests"]:::test
        inst["Instrumentation Tests"]:::test
    end

    %% Final APK Artifact
    subgraph "Final App"
        apk["APK Package"]:::external
    end

    %% UI Flow
    sp -->|"transition"| la
    sp -->|"transition"| su
    la -->|"transition"| ma
    su -->|"transition"| cp
    cp -->|"transition"| ma
    ma -->|"transition"| pr
    ma -->|"transition"| noti
    ma -->|"transition"| ac
    ma -->|"transition"| ai

    %% Resource Usage
    sp -->|"uses"| res
    ma -->|"uses"| res

    %% External Integration
    gs -->|"integrates"| ma

    %% Build Process to APK
    pbs --> apk
    abs --> apk
    setnode --> apk
    gwrapper --> apk
    gradlew --> apk
    gradlewb --> apk

    %% Deployment and Testing
    apk -->|"deploys"| sp
    unit -->|"tests"| sp
    inst -->|"tests"| sp

    %% Click Events for UI/Presentation Layer
    click sp "https://github.com/madhurakhandkar/roommatefinder/blob/master/app/src/main/java/com/example/roombuds/SplashScreenActivity.kt"
    click la "https://github.com/madhurakhandkar/roommatefinder/blob/master/app/src/main/java/com/example/roombuds/LoginActivity.kt"
    click su "https://github.com/madhurakhandkar/roommatefinder/blob/master/app/src/main/java/com/example/roombuds/SignUpActivity.kt"
    click cp "https://github.com/madhurakhandkar/roommatefinder/blob/master/app/src/main/java/com/example/roombuds/CreateProfile.kt"
    click ma "https://github.com/madhurakhandkar/roommatefinder/blob/master/app/src/main/java/com/example/roombuds/MainActivity.kt"
    click pr "https://github.com/madhurakhandkar/roommatefinder/blob/master/app/src/main/java/com/example/roombuds/Profile.kt"
    click noti "https://github.com/madhurakhandkar/roommatefinder/blob/master/app/src/main/java/com/example/roombuds/Notifications.kt"
    click ac "https://github.com/madhurakhandkar/roommatefinder/blob/master/app/src/main/java/com/example/roombuds/AddCollege.kt"
    click ai "https://github.com/madhurakhandkar/roommatefinder/blob/master/app/src/main/java/com/example/roombuds/AddImage.kt"

    %% Click Event for Resource Layer
    click res "https://github.com/madhurakhandkar/roommatefinder/tree/master/app/src/main/res"

    %% Click Events for Build & Configuration
    click pbs "https://github.com/madhurakhandkar/roommatefinder/blob/master/build.gradle.kts"
    click abs "https://github.com/madhurakhandkar/roommatefinder/blob/master/app/build.gradle.kts"
    click setnode "https://github.com/madhurakhandkar/roommatefinder/blob/master/settings.gradle.kts"
    click gwrapper "https://github.com/madhurakhandkar/roommatefinder/tree/master/gradle/wrapper"
    click gradlew "https://github.com/madhurakhandkar/roommatefinder/tree/master/gradlew"
    click gradlewb "https://github.com/madhurakhandkar/roommatefinder/blob/master/gradlew.bat"
    click gs "https://github.com/madhurakhandkar/roommatefinder/blob/master/app/google-services.json"

    %% Click Events for Testing Infrastructure
    click unit "https://github.com/madhurakhandkar/roommatefinder/tree/master/app/src/test"
    click inst "https://github.com/madhurakhandkar/roommatefinder/tree/master/app/src/androidTest"

%% Styles
classDef ui fill:#AED6F1,stroke:#1F618D,stroke-width:2px;
classDef res fill:#D5F5E3,stroke:#27AE60,stroke-width:2px;
classDef build fill:#FAD7A0,stroke:#D35400,stroke-width:2px;
classDef test fill:#F5B7B1,stroke:#C0392B,stroke-width:2px;
classDef external fill:#E8DAEF,stroke:#8E44AD,stroke-width:2px;
```
