# lgm1213/appideasocialsite architecture

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

- Interactive diagram: https://gitdiagram.com/lgm1213/appideasocialsite
- Repository: https://github.com/lgm1213/appideasocialsite

## Overview

This is a Rails social platform centered on member accounts, profiles, discovery, and social interaction, with messaging and community/business features alongside verification, trust, and administration. The routes excerpt shows the web and API entry points; sampled controllers show TOTP enrollment and Stripe-backed business enrollment. Source evidence is limited, so the graph emphasizes documented routes and sampled calls rather than inferring links among unsampled controllers and models.

Main entry points: [`config/routes.rb`](https://github.com/lgm1213/appideasocialsite/blob/main/config/routes.rb) (Web routes), [`app/controllers/totp_enrollments_controller.rb`](https://github.com/lgm1213/appideasocialsite/blob/main/app/controllers/totp_enrollments_controller.rb) (Web TOTP enrollment), [`app/controllers/api/v1/totp_enrollments_controller.rb`](https://github.com/lgm1213/appideasocialsite/blob/main/app/controllers/api/v1/totp_enrollments_controller.rb) (API TOTP enrollment), [`app/controllers/business_enrollments_controller.rb`](https://github.com/lgm1213/appideasocialsite/blob/main/app/controllers/business_enrollments_controller.rb) (Business enrollment)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_accounts["Accounts and identity"]
  node_web_auth["Web authentication"]
  node_api_auth["API authentication"]
  node_totp_web["Web TOTP enrollment"]
  node_totp_api["API TOTP enrollment"]
  node_totp_logic["TOTP enrollment logic<br/>[totp_enrollment.rb]"]
  node_profile["Member profiles"]
end

subgraph group_social["Discovery and social"]
  node_discovery["Discovery deck<br/>[deck_controller.rb]"]
  node_discovery_deck["Discovery deck logic<br/>[deck.rb]"]
  node_social_activity["Social activity"]
  node_social_posts["Posts and reactions"]
end

subgraph group_community["Community and commerce"]
  node_groups["Groups"]
  node_events["Events"]
  node_businesses["Business enrollment"]
  node_stripe["Stripe checkout"]
end

subgraph group_messaging["Messaging and media"]
  node_conversations["Conversations"]
  node_live_streams["Live streams"]
end

subgraph group_trust["Trust and operations"]
  node_admin["Admin console"]
  node_trust_engine["Trust scoring<br/>[trust_engine.rb]"]
end

subgraph group_platform["Application platform"]
  node_web_routes["Web routes<br/>[routes.rb]"]
  node_api_routes["API routes<br/>[routes.rb]"]
  node_boot["Rails boot<br/>[boot.rb]"]
  node_location_ui["Location autocomplete"]
end

node_member(("Member"))
node_google_places["Google Places"]

node_member -->|"uses web app"| node_web_routes
node_member -->|"uses API"| node_api_routes
node_web_routes -->|"routes auth"| node_web_auth
node_api_routes -->|"routes auth"| node_api_auth
node_web_routes -->|"routes enrollment"| node_totp_web
node_api_routes -->|"routes enrollment"| node_totp_api
node_web_routes -->|"routes profiles"| node_profile
node_api_routes -->|"routes profiles"| node_profile
node_api_routes -->|"routes discovery"| node_discovery
node_web_routes -->|"routes activity"| node_social_activity
node_web_routes -->|"routes posts"| node_social_posts
node_web_routes -->|"routes groups"| node_groups
node_web_routes -->|"routes events"| node_events
node_web_routes -->|"routes enrollment"| node_businesses
node_businesses -->|"creates checkout"| node_stripe
node_web_routes -->|"routes conversations"| node_conversations
node_api_routes -->|"routes conversations"| node_conversations
node_web_routes -->|"routes streams"| node_live_streams
node_web_routes -->|"routes admin"| node_admin
node_totp_web -->|"calls enrollment logic"| node_totp_logic
node_totp_api -->|"calls enrollment logic"| node_totp_logic
node_location_ui -->|"requests predictions"| node_google_places
node_boot -.->|"starts application"| node_member

click node_web_routes "https://github.com/lgm1213/appideasocialsite/blob/main/config/routes.rb"
click node_api_routes "https://github.com/lgm1213/appideasocialsite/blob/main/config/routes.rb"
click node_web_auth "https://github.com/lgm1213/appideasocialsite/blob/main/app/controllers/sessions_controller.rb"
click node_api_auth "https://github.com/lgm1213/appideasocialsite/blob/main/app/controllers/api/v1/sessions_controller.rb"
click node_totp_web "https://github.com/lgm1213/appideasocialsite/blob/main/app/controllers/totp_enrollments_controller.rb"
click node_totp_api "https://github.com/lgm1213/appideasocialsite/blob/main/app/controllers/api/v1/totp_enrollments_controller.rb"
click node_totp_logic "https://github.com/lgm1213/appideasocialsite/blob/main/app/models/totp_enrollment.rb"
click node_profile "https://github.com/lgm1213/appideasocialsite/blob/main/app/controllers/api/v1/profiles_controller.rb"
click node_discovery "https://github.com/lgm1213/appideasocialsite/blob/main/app/controllers/api/v1/discovery/deck_controller.rb"
click node_discovery_deck "https://github.com/lgm1213/appideasocialsite/blob/main/app/models/discovery/deck.rb"
click node_social_activity "https://github.com/lgm1213/appideasocialsite/blob/main/app/controllers/activity_controller.rb"
click node_social_posts "https://github.com/lgm1213/appideasocialsite/blob/main/app/controllers/posts_controller.rb"
click node_groups "https://github.com/lgm1213/appideasocialsite/blob/main/app/controllers/groups_controller.rb"
click node_events "https://github.com/lgm1213/appideasocialsite/blob/main/app/controllers/events_controller.rb"
click node_businesses "https://github.com/lgm1213/appideasocialsite/blob/main/app/controllers/business_enrollments_controller.rb"
click node_conversations "https://github.com/lgm1213/appideasocialsite/blob/main/app/controllers/conversations_controller.rb"
click node_live_streams "https://github.com/lgm1213/appideasocialsite/blob/main/app/controllers/live_streams_controller.rb"
click node_admin "https://github.com/lgm1213/appideasocialsite/blob/main/app/controllers/admin/users_controller.rb"
click node_trust_engine "https://github.com/lgm1213/appideasocialsite/blob/main/app/models/trust_engine.rb"
click node_boot "https://github.com/lgm1213/appideasocialsite/blob/main/config/boot.rb"
click node_location_ui "https://github.com/lgm1213/appideasocialsite/blob/main/app/javascript/controllers/location_autocomplete_controller.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_web_auth,node_api_auth,node_totp_web,node_totp_api,node_totp_logic,node_profile toneBlue
class node_discovery,node_discovery_deck,node_social_activity,node_social_posts toneAmber
class node_groups,node_events,node_businesses,node_stripe toneMint
class node_conversations,node_live_streams toneRose
class node_admin,node_trust_engine,node_member,node_google_places toneIndigo
class node_web_routes,node_api_routes,node_boot,node_location_ui toneTeal
```

## Components

### Accounts and identity

- [Web authentication](https://github.com/lgm1213/appideasocialsite/blob/main/app/controllers/sessions_controller.rb): `app/controllers/sessions_controller.rb`
- [API authentication](https://github.com/lgm1213/appideasocialsite/blob/main/app/controllers/api/v1/sessions_controller.rb): `app/controllers/api/v1/sessions_controller.rb`
- [Web TOTP enrollment](https://github.com/lgm1213/appideasocialsite/blob/main/app/controllers/totp_enrollments_controller.rb): `app/controllers/totp_enrollments_controller.rb`
- [API TOTP enrollment](https://github.com/lgm1213/appideasocialsite/blob/main/app/controllers/api/v1/totp_enrollments_controller.rb): `app/controllers/api/v1/totp_enrollments_controller.rb`
- [TOTP enrollment logic](https://github.com/lgm1213/appideasocialsite/blob/main/app/models/totp_enrollment.rb): `app/models/totp_enrollment.rb`
- [Member profiles](https://github.com/lgm1213/appideasocialsite/blob/main/app/controllers/api/v1/profiles_controller.rb): `app/controllers/api/v1/profiles_controller.rb`

### Discovery and social

- [Discovery deck](https://github.com/lgm1213/appideasocialsite/blob/main/app/controllers/api/v1/discovery/deck_controller.rb): `app/controllers/api/v1/discovery/deck_controller.rb`
- [Discovery deck logic](https://github.com/lgm1213/appideasocialsite/blob/main/app/models/discovery/deck.rb): `app/models/discovery/deck.rb`
- [Social activity](https://github.com/lgm1213/appideasocialsite/blob/main/app/controllers/activity_controller.rb): `app/controllers/activity_controller.rb`
- [Posts and reactions](https://github.com/lgm1213/appideasocialsite/blob/main/app/controllers/posts_controller.rb): `app/controllers/posts_controller.rb`

### Community and commerce

- [Groups](https://github.com/lgm1213/appideasocialsite/blob/main/app/controllers/groups_controller.rb): `app/controllers/groups_controller.rb`
- [Events](https://github.com/lgm1213/appideasocialsite/blob/main/app/controllers/events_controller.rb): `app/controllers/events_controller.rb`
- [Business enrollment](https://github.com/lgm1213/appideasocialsite/blob/main/app/controllers/business_enrollments_controller.rb): `app/controllers/business_enrollments_controller.rb`
- **Stripe checkout**

### Messaging and media

- [Conversations](https://github.com/lgm1213/appideasocialsite/blob/main/app/controllers/conversations_controller.rb): `app/controllers/conversations_controller.rb`
- [Live streams](https://github.com/lgm1213/appideasocialsite/blob/main/app/controllers/live_streams_controller.rb): `app/controllers/live_streams_controller.rb`

### Trust and operations

- [Admin console](https://github.com/lgm1213/appideasocialsite/blob/main/app/controllers/admin/users_controller.rb): `app/controllers/admin/users_controller.rb`
- [Trust scoring](https://github.com/lgm1213/appideasocialsite/blob/main/app/models/trust_engine.rb): `app/models/trust_engine.rb`

### Application platform

- [Web routes](https://github.com/lgm1213/appideasocialsite/blob/main/config/routes.rb): `config/routes.rb`
- [API routes](https://github.com/lgm1213/appideasocialsite/blob/main/config/routes.rb): `config/routes.rb`
- [Rails boot](https://github.com/lgm1213/appideasocialsite/blob/main/config/boot.rb): `config/boot.rb`
- [Location autocomplete](https://github.com/lgm1213/appideasocialsite/blob/main/app/javascript/controllers/location_autocomplete_controller.js): `app/javascript/controllers/location_autocomplete_controller.js`

### Other components

- **Member**
- **Google Places**

## Connections

- Member → Web routes: uses web app (evidence: `config/routes.rb`)
- Member → API routes: uses API (evidence: `config/routes.rb`)
- Web routes → Web authentication: routes auth (evidence: `config/routes.rb`)
- API routes → API authentication: routes auth (evidence: `config/routes.rb`)
- Web routes → Web TOTP enrollment: routes enrollment (evidence: `config/routes.rb`)
- API routes → API TOTP enrollment: routes enrollment (evidence: `config/routes.rb`)
- Web routes → Member profiles: routes profiles (evidence: `config/routes.rb`)
- API routes → Member profiles: routes profiles (evidence: `config/routes.rb`)
- API routes → Discovery deck: routes discovery (evidence: `config/routes.rb`)
- Web routes → Social activity: routes activity (evidence: `config/routes.rb`)
- Web routes → Posts and reactions: routes posts (evidence: `config/routes.rb`)
- Web routes → Groups: routes groups (evidence: `config/routes.rb`)
- Web routes → Events: routes events (evidence: `config/routes.rb`)
- Web routes → Business enrollment: routes enrollment (evidence: `config/routes.rb`)
- Business enrollment → Stripe checkout: creates checkout (evidence: `app/controllers/business_enrollments_controller.rb`)
- Web routes → Conversations: routes conversations (evidence: `config/routes.rb`)
- API routes → Conversations: routes conversations (evidence: `config/routes.rb`)
- Web routes → Live streams: routes streams (evidence: `config/routes.rb`)
- Web routes → Admin console: routes admin (evidence: `config/routes.rb`)
- Web TOTP enrollment → TOTP enrollment logic: calls enrollment logic (evidence: `app/controllers/totp_enrollments_controller.rb`)
- API TOTP enrollment → TOTP enrollment logic: calls enrollment logic (evidence: `app/controllers/api/v1/totp_enrollments_controller.rb`)
- Location autocomplete → Google Places: requests predictions (evidence: `app/javascript/controllers/location_autocomplete_controller.js`)
- Rails boot → Member: starts application
