# sainadhperuri/go_together architecture

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

- Interactive diagram: https://gitdiagram.com/sainadhperuri/go_together
- Repository: https://github.com/sainadhperuri/go_together

## Overview

GoTogether is a Flutter travel-companion discovery and coordination app organized around age communities. Its main flow is account/profile setup, discovering compatible trips, requesting to join, host review, then private group coordination by chat. The graph also preserves safety, notifications, and profile capabilities documented in the README. The README describes client-to-Firebase behavior, but the sampled Dart feature and repository implementations were not provided; edges therefore cite documented relationships rather than claiming source-level call paths.

Main entry points: [`lib/features/requests`](https://github.com/sainadhperuri/go_together/tree/main/lib/features/requests) (Join requests), [`lib/main.dart`](https://github.com/sainadhperuri/go_together/blob/main/lib/main.dart) (Flutter app), [`lib/features/auth`](https://github.com/sainadhperuri/go_together/tree/main/lib/features/auth) (Account setup), [`lib/features/search`](https://github.com/sainadhperuri/go_together/tree/main/lib/features/search) (Trip search)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Flutter client"]
  node_app["Flutter app<br/>[main.dart]"]
  node_account["Account setup"]
  node_profile["Profiles"]
  node_dashboard["Explore dashboard"]
end

subgraph group_trip_flow["Trip lifecycle"]
  node_trip_search["Trip search"]
  node_trip_host["Host trips"]
  node_trip_record["Trip data<br/>[trip_model.dart]"]
  node_join_requests["Join requests"]
  node_request_data["Request data"]
end

subgraph group_community["Community features"]
  node_private_chat["Group chat"]
  node_chat_data["Message data"]
  node_safety["Safety tools"]
  node_settings["Privacy settings"]
  node_notifications["Notifications"]
end

subgraph group_backend["Firebase services"]
  node_auth_service["Firebase Auth"]
  node_firestore[("Cloud Firestore")]
  node_storage[("Cloud Storage")]
  node_functions["Cloud Functions<br/>[index.js]"]
  node_messaging["Cloud Messaging"]
end

node_traveler(("Traveler"))

node_traveler -->|"uses"| node_app
node_app -->|"opens"| node_account
node_account -->|"authenticates"| node_auth_service
node_account -->|"sets up"| node_profile
node_app -->|"shows"| node_dashboard
node_dashboard -->|"discovers"| node_trip_search
node_trip_search -->|"reads trips"| node_firestore
node_trip_host -->|"writes trips"| node_firestore
node_trip_search -->|"presents"| node_trip_record
node_traveler -->|"requests to join"| node_join_requests
node_join_requests -->|"stores requests"| node_firestore
node_join_requests -->|"records"| node_request_data
node_join_requests -->|"routes for review"| node_trip_host
node_trip_host -->|"accepts or declines"| node_firestore
node_firestore -->|"exposes to members"| node_private_chat
node_private_chat -->|"uses messages"| node_chat_data
node_private_chat -->|"reads and writes"| node_firestore
node_traveler -->|"reports or blocks"| node_safety
node_safety -->|"records safety data"| node_firestore
node_traveler -->|"manages privacy"| node_settings
node_profile -->|"uploads photos"| node_storage
node_firestore -->|"triggers backend work"| node_functions
node_functions -->|"creates notifications"| node_notifications
node_functions -->|"sends pushes"| node_messaging

click node_app "https://github.com/sainadhperuri/go_together/blob/main/lib/main.dart"
click node_account "https://github.com/sainadhperuri/go_together/tree/main/lib/features/auth"
click node_profile "https://github.com/sainadhperuri/go_together/tree/main/lib/features/profile"
click node_dashboard "https://github.com/sainadhperuri/go_together/tree/main/lib/features/dashboard"
click node_trip_search "https://github.com/sainadhperuri/go_together/tree/main/lib/features/search"
click node_trip_host "https://github.com/sainadhperuri/go_together/tree/main/lib/features/trips"
click node_trip_record "https://github.com/sainadhperuri/go_together/blob/main/lib/models/trip_model.dart"
click node_join_requests "https://github.com/sainadhperuri/go_together/tree/main/lib/features/requests"
click node_request_data "https://github.com/sainadhperuri/go_together/blob/main/lib/models/join_request_model.dart"
click node_private_chat "https://github.com/sainadhperuri/go_together/tree/main/lib/features/chat"
click node_chat_data "https://github.com/sainadhperuri/go_together/blob/main/lib/models/chat_message_model.dart"
click node_safety "https://github.com/sainadhperuri/go_together/tree/main/lib/features/moderation"
click node_settings "https://github.com/sainadhperuri/go_together/tree/main/lib/features/settings"
click node_notifications "https://github.com/sainadhperuri/go_together/tree/main/lib/features/notifications"
click node_functions "https://github.com/sainadhperuri/go_together/blob/main/functions/index.js"

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_app,node_account,node_profile,node_dashboard toneBlue
class node_trip_search,node_trip_host,node_trip_record,node_join_requests,node_request_data toneAmber
class node_private_chat,node_chat_data,node_safety,node_settings,node_notifications toneMint
class node_auth_service,node_firestore,node_storage,node_functions,node_messaging toneRose
class node_traveler toneIndigo
```

## Components

### Flutter client

- [Flutter app](https://github.com/sainadhperuri/go_together/blob/main/lib/main.dart): `lib/main.dart`
- [Account setup](https://github.com/sainadhperuri/go_together/tree/main/lib/features/auth): `lib/features/auth`
- [Profiles](https://github.com/sainadhperuri/go_together/tree/main/lib/features/profile): `lib/features/profile`
- [Explore dashboard](https://github.com/sainadhperuri/go_together/tree/main/lib/features/dashboard): `lib/features/dashboard`

### Trip lifecycle

- [Trip search](https://github.com/sainadhperuri/go_together/tree/main/lib/features/search): `lib/features/search`
- [Host trips](https://github.com/sainadhperuri/go_together/tree/main/lib/features/trips): `lib/features/trips`
- [Trip data](https://github.com/sainadhperuri/go_together/blob/main/lib/models/trip_model.dart): `lib/models/trip_model.dart`
- [Join requests](https://github.com/sainadhperuri/go_together/tree/main/lib/features/requests): `lib/features/requests`
- [Request data](https://github.com/sainadhperuri/go_together/blob/main/lib/models/join_request_model.dart): `lib/models/join_request_model.dart`

### Community features

- [Group chat](https://github.com/sainadhperuri/go_together/tree/main/lib/features/chat): `lib/features/chat`
- [Message data](https://github.com/sainadhperuri/go_together/blob/main/lib/models/chat_message_model.dart): `lib/models/chat_message_model.dart`
- [Safety tools](https://github.com/sainadhperuri/go_together/tree/main/lib/features/moderation): `lib/features/moderation`
- [Privacy settings](https://github.com/sainadhperuri/go_together/tree/main/lib/features/settings): `lib/features/settings`
- [Notifications](https://github.com/sainadhperuri/go_together/tree/main/lib/features/notifications): `lib/features/notifications`

### Firebase services

- **Firebase Auth**
- **Cloud Firestore**
- **Cloud Storage**
- [Cloud Functions](https://github.com/sainadhperuri/go_together/blob/main/functions/index.js): `functions/index.js`
- **Cloud Messaging**

### Other components

- **Traveler**

## Connections

- Traveler → Flutter app: uses (evidence: `README.md`)
- Flutter app → Account setup: opens (evidence: `README.md`)
- Account setup → Firebase Auth: authenticates (evidence: `README.md`)
- Account setup → Profiles: sets up (evidence: `README.md`)
- Flutter app → Explore dashboard: shows (evidence: `README.md`)
- Explore dashboard → Trip search: discovers (evidence: `README.md`)
- Trip search → Cloud Firestore: reads trips (evidence: `README.md`)
- Host trips → Cloud Firestore: writes trips (evidence: `README.md`)
- Trip search → Trip data: presents (evidence: `README.md`)
- Traveler → Join requests: requests to join (evidence: `README.md`)
- Join requests → Cloud Firestore: stores requests (evidence: `README.md`)
- Join requests → Request data: records (evidence: `README.md`)
- Join requests → Host trips: routes for review (evidence: `README.md`)
- Host trips → Cloud Firestore: accepts or declines (evidence: `README.md`)
- Cloud Firestore → Group chat: exposes to members (evidence: `README.md`)
- Group chat → Message data: uses messages (evidence: `README.md`)
- Group chat → Cloud Firestore: reads and writes (evidence: `README.md`)
- Traveler → Safety tools: reports or blocks (evidence: `README.md`)
- Safety tools → Cloud Firestore: records safety data (evidence: `README.md`)
- Traveler → Privacy settings: manages privacy (evidence: `README.md`)
- Profiles → Cloud Storage: uploads photos (evidence: `README.md`)
- Cloud Firestore → Cloud Functions: triggers backend work (evidence: `README.md`)
- Cloud Functions → Notifications: creates notifications (evidence: `README.md`)
- Cloud Functions → Cloud Messaging: sends pushes (evidence: `README.md`)
