# harshjpatel/itmd555project_nexus architecture

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

- Interactive diagram: https://gitdiagram.com/harshjpatel/itmd555project_nexus
- Repository: https://github.com/harshjpatel/itmd555project_nexus

## Overview

Nexus is an Android community discussion app: users authenticate, choose feed interests, browse communities and posts, then engage through reactions, comments, bookmarks, and sharing. The README also describes Firebase-backed identity and content, push notifications, and a recent-post home-screen widget. App implementation files are listed in the tree but were not excerpted, so internal routing and data calls are not verified; edges below are limited to README-documented behavior, with the local preview server shown separately.

Main entry points: [`app/src/main/java/com/example/nexus/DashboardActivity.java`](https://github.com/harshjpatel/itmd555project_nexus/blob/main/app/src/main/java/com/example/nexus/DashboardActivity.java) (Dashboard), [`app/src/main/java/com/example/nexus/LoginActivity.java`](https://github.com/harshjpatel/itmd555project_nexus/blob/main/app/src/main/java/com/example/nexus/LoginActivity.java) (Login), [`app/src/main/java/com/example/nexus/SignupActivity.java`](https://github.com/harshjpatel/itmd555project_nexus/blob/main/app/src/main/java/com/example/nexus/SignupActivity.java) (Signup), [`app/src/main/java/com/example/nexus/FeedAdapter.java`](https://github.com/harshjpatel/itmd555project_nexus/blob/main/app/src/main/java/com/example/nexus/FeedAdapter.java) (Post feed)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and personalization"]
  node_login["Login<br/>[LoginActivity.java]"]
  node_signup["Signup"]
  node_customize["Feed setup"]
  node_dashboard["Dashboard"]
  node_main["Main activity<br/>[MainActivity.java]"]
end

subgraph group_community["Community discussions"]
  node_feed["Post feed<br/>[FeedAdapter.java]"]
  node_community_pages["Communities<br/>[Community.java]"]
  node_community_adapter["Community listing"]
  node_post_detail["Post detail"]
  node_post_model["Post data<br/>[Post.java]"]
  node_comment_model["Comment data<br/>[Comment.java]"]
end

subgraph group_services["Firebase services"]
  node_firebase_auth{{"Firebase Auth"}}
  node_firestore[("Cloud Firestore")]
  node_messaging["Push notifications"]
end

subgraph group_engagement["Engagement and surfaces"]
  node_comment_list["Comment list"]
  node_widget["Recent-post widget<br/>[PostWidget.java]"]
  node_widget_worker["Widget refresh worker"]
  node_share_server["Share preview server<br/>[server.py]"]
end

node_user(("User"))
node_android{{"Android platform"}}

node_user -->|"signs in"| node_login
node_user -->|"creates account"| node_signup
node_user -->|"chooses interests"| node_customize
node_user -->|"browses feed"| node_dashboard
node_login -->|"authenticates with"| node_firebase_auth
node_signup -->|"registers with"| node_firebase_auth
node_dashboard -->|"shows posts"| node_feed
node_dashboard -->|"offers communities"| node_community_pages
node_community_pages -->|"lists communities"| node_community_adapter
node_user -->|"opens post"| node_post_detail
node_post_detail -->|"shows comments"| node_comment_list
node_user -->|"creates and engages"| node_firestore
node_feed -->|"loads content"| node_firestore
node_firestore -->|"stores posts"| node_post_model
node_firestore -->|"stores comments"| node_comment_model
node_messaging -->|"sends notifications"| node_user
node_widget -->|"renders home widget"| node_android
node_widget_worker -->|"refreshes widget"| node_widget
node_user -.->|"views shared preview"| node_share_server

click node_login "https://github.com/harshjpatel/itmd555project_nexus/blob/main/app/src/main/java/com/example/nexus/LoginActivity.java"
click node_signup "https://github.com/harshjpatel/itmd555project_nexus/blob/main/app/src/main/java/com/example/nexus/SignupActivity.java"
click node_customize "https://github.com/harshjpatel/itmd555project_nexus/blob/main/app/src/main/java/com/example/nexus/CustomizeFeedActivity.java"
click node_dashboard "https://github.com/harshjpatel/itmd555project_nexus/blob/main/app/src/main/java/com/example/nexus/DashboardActivity.java"
click node_main "https://github.com/harshjpatel/itmd555project_nexus/blob/main/app/src/main/java/com/example/nexus/MainActivity.java"
click node_feed "https://github.com/harshjpatel/itmd555project_nexus/blob/main/app/src/main/java/com/example/nexus/FeedAdapter.java"
click node_community_pages "https://github.com/harshjpatel/itmd555project_nexus/blob/main/app/src/main/java/com/example/nexus/Community.java"
click node_community_adapter "https://github.com/harshjpatel/itmd555project_nexus/blob/main/app/src/main/java/com/example/nexus/CommunityAdapter.java"
click node_post_detail "https://github.com/harshjpatel/itmd555project_nexus/blob/main/app/src/main/java/com/example/nexus/PostDetailActivity.java"
click node_post_model "https://github.com/harshjpatel/itmd555project_nexus/blob/main/app/src/main/java/com/example/nexus/Post.java"
click node_comment_model "https://github.com/harshjpatel/itmd555project_nexus/blob/main/app/src/main/java/com/example/nexus/Comment.java"
click node_comment_list "https://github.com/harshjpatel/itmd555project_nexus/blob/main/app/src/main/java/com/example/nexus/CommentAdapter.java"
click node_messaging "https://github.com/harshjpatel/itmd555project_nexus/blob/main/app/src/main/java/com/example/nexus/MyFirebaseMessagingService.java"
click node_widget "https://github.com/harshjpatel/itmd555project_nexus/blob/main/app/src/main/java/com/example/nexus/PostWidget.java"
click node_widget_worker "https://github.com/harshjpatel/itmd555project_nexus/blob/main/app/src/main/java/com/example/nexus/WidgetUpdateWorker.java"
click node_share_server "https://github.com/harshjpatel/itmd555project_nexus/blob/main/server.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_login,node_signup,node_customize,node_dashboard,node_main,node_user toneBlue
class node_feed,node_community_pages,node_community_adapter,node_post_detail,node_post_model,node_comment_model toneAmber
class node_firebase_auth,node_firestore,node_messaging toneMint
class node_comment_list,node_widget,node_widget_worker,node_share_server toneRose
class node_android toneIndigo
```

## Components

### Entry and personalization

- [Login](https://github.com/harshjpatel/itmd555project_nexus/blob/main/app/src/main/java/com/example/nexus/LoginActivity.java): `app/src/main/java/com/example/nexus/LoginActivity.java`
- [Signup](https://github.com/harshjpatel/itmd555project_nexus/blob/main/app/src/main/java/com/example/nexus/SignupActivity.java): `app/src/main/java/com/example/nexus/SignupActivity.java`
- [Feed setup](https://github.com/harshjpatel/itmd555project_nexus/blob/main/app/src/main/java/com/example/nexus/CustomizeFeedActivity.java): `app/src/main/java/com/example/nexus/CustomizeFeedActivity.java`
- [Dashboard](https://github.com/harshjpatel/itmd555project_nexus/blob/main/app/src/main/java/com/example/nexus/DashboardActivity.java): `app/src/main/java/com/example/nexus/DashboardActivity.java`
- [Main activity](https://github.com/harshjpatel/itmd555project_nexus/blob/main/app/src/main/java/com/example/nexus/MainActivity.java): `app/src/main/java/com/example/nexus/MainActivity.java`

### Community discussions

- [Post feed](https://github.com/harshjpatel/itmd555project_nexus/blob/main/app/src/main/java/com/example/nexus/FeedAdapter.java): `app/src/main/java/com/example/nexus/FeedAdapter.java`
- [Communities](https://github.com/harshjpatel/itmd555project_nexus/blob/main/app/src/main/java/com/example/nexus/Community.java): `app/src/main/java/com/example/nexus/Community.java`
- [Community listing](https://github.com/harshjpatel/itmd555project_nexus/blob/main/app/src/main/java/com/example/nexus/CommunityAdapter.java): `app/src/main/java/com/example/nexus/CommunityAdapter.java`
- [Post detail](https://github.com/harshjpatel/itmd555project_nexus/blob/main/app/src/main/java/com/example/nexus/PostDetailActivity.java): `app/src/main/java/com/example/nexus/PostDetailActivity.java`
- [Post data](https://github.com/harshjpatel/itmd555project_nexus/blob/main/app/src/main/java/com/example/nexus/Post.java): `app/src/main/java/com/example/nexus/Post.java`
- [Comment data](https://github.com/harshjpatel/itmd555project_nexus/blob/main/app/src/main/java/com/example/nexus/Comment.java): `app/src/main/java/com/example/nexus/Comment.java`

### Firebase services

- **Firebase Auth**
- **Cloud Firestore**
- [Push notifications](https://github.com/harshjpatel/itmd555project_nexus/blob/main/app/src/main/java/com/example/nexus/MyFirebaseMessagingService.java): `app/src/main/java/com/example/nexus/MyFirebaseMessagingService.java`

### Engagement and surfaces

- [Comment list](https://github.com/harshjpatel/itmd555project_nexus/blob/main/app/src/main/java/com/example/nexus/CommentAdapter.java): `app/src/main/java/com/example/nexus/CommentAdapter.java`
- [Recent-post widget](https://github.com/harshjpatel/itmd555project_nexus/blob/main/app/src/main/java/com/example/nexus/PostWidget.java): `app/src/main/java/com/example/nexus/PostWidget.java`
- [Widget refresh worker](https://github.com/harshjpatel/itmd555project_nexus/blob/main/app/src/main/java/com/example/nexus/WidgetUpdateWorker.java): `app/src/main/java/com/example/nexus/WidgetUpdateWorker.java`
- [Share preview server](https://github.com/harshjpatel/itmd555project_nexus/blob/main/server.py): `server.py`

### Other components

- **User**
- **Android platform**

## Connections

- User → Login: signs in (evidence: `README.md`)
- User → Signup: creates account (evidence: `README.md`)
- User → Feed setup: chooses interests (evidence: `README.md`)
- User → Dashboard: browses feed (evidence: `README.md`)
- Login → Firebase Auth: authenticates with (evidence: `README.md`)
- Signup → Firebase Auth: registers with (evidence: `README.md`)
- Dashboard → Post feed: shows posts (evidence: `README.md`)
- Dashboard → Communities: offers communities (evidence: `README.md`)
- Communities → Community listing: lists communities (evidence: `README.md`)
- User → Post detail: opens post (evidence: `README.md`)
- Post detail → Comment list: shows comments (evidence: `README.md`)
- User → Cloud Firestore: creates and engages (evidence: `README.md`)
- Post feed → Cloud Firestore: loads content (evidence: `README.md`)
- Cloud Firestore → Post data: stores posts (evidence: `README.md`)
- Cloud Firestore → Comment data: stores comments (evidence: `README.md`)
- Push notifications → User: sends notifications (evidence: `README.md`)
- Recent-post widget → Android platform: renders home widget (evidence: `README.md`)
- Widget refresh worker → Recent-post widget: refreshes widget (evidence: `README.md`)
- User → Share preview server: views shared preview (evidence: `README.md`)
