# dadavemyster/truecircle architecture

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

- Interactive diagram: https://gitdiagram.com/dadavemyster/truecircle
- Repository: https://github.com/dadavemyster/truecircle

## Overview

True Circle is a static social platform for sharing posts and building smaller friend communities. Users create an account, publish text or image posts to a selected circle, then browse posts and interact through votes, comments, and expressive image reactions. Profiles and friend requests support ongoing connections; the outer circle also surfaces ads. The graph focuses on product behavior visible in the README and excerpts. Some page wiring and unsampled modules are not shown, so their relationships are omitted rather than inferred.

Main entry points: [`js/inner_circle.js`](https://github.com/dadavemyster/truecircle/blob/main/js/inner_circle.js) (Inner circle feed), [`js/profilePosts.js`](https://github.com/dadavemyster/truecircle/blob/main/js/profilePosts.js) (Profile posts), [`js/index.js`](https://github.com/dadavemyster/truecircle/blob/main/js/index.js) (Account access), [`js/new_post.js`](https://github.com/dadavemyster/truecircle/blob/main/js/new_post.js) (Post composer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Identity and profiles"]
  node_auth["Account access<br/>[index.js]"]
  node_profile["Profile editing<br/>[profile.js]"]
  node_profileposts["Profile posts<br/>[profilePosts.js]"]
end

subgraph group_sharing["Posts and circles"]
  node_compose["Post composer<br/>[new_post.js]"]
  node_inner["Inner circle feed<br/>[inner_circle.js]"]
  node_outer["Outer circle feed<br/>[outer_circle.js]"]
  node_activity["Voted posts<br/>[activityposts.js]"]
  node_scorefilter["Low-score filter"]
end

subgraph group_community["Friends and requests"]
  node_friends["Friend list<br/>[friends.js]"]
  node_addfriend["Friend requests<br/>[addfriend.js]"]
  node_requestpage["Request review"]
end

subgraph group_services["Firebase services"]
  node_realtimedb[("Realtime Database")]
  node_storage[("Firebase Storage")]
  node_firebaseauth["Firebase Authentication"]
end

node_visitor(("Visitor / member"))

node_visitor -.->|"signs in"| node_auth
node_auth -->|"authenticates"| node_firebaseauth
node_auth -->|"reads / writes"| node_realtimedb
node_visitor -.->|"creates post"| node_compose
node_compose -->|"uploads image"| node_storage
node_compose -->|"writes post"| node_realtimedb
node_inner -->|"subscribes / updates"| node_realtimedb
node_outer -->|"subscribes / updates"| node_realtimedb
node_activity -->|"reads / updates"| node_realtimedb
node_profileposts -->|"reads / updates"| node_realtimedb
node_inner -->|"filters posts"| node_scorefilter
node_activity -->|"filters posts"| node_scorefilter
node_profileposts -->|"filters posts"| node_scorefilter
node_inner -->|"uploads / lists reactions"| node_storage
node_outer -->|"uploads / lists reactions"| node_storage
node_profileposts -->|"uploads / lists reactions"| node_storage
node_profile -->|"updates profile"| node_realtimedb
node_profile -->|"uploads profile image"| node_storage
node_friends -->|"reads / removes links"| node_realtimedb
node_addfriend -->|"requests / links friends"| node_realtimedb
node_requestpage -->|"reads / resolves requests"| node_realtimedb
node_visitor -.->|"browses feed"| node_inner
node_visitor -.->|"browses feed"| node_outer
node_visitor -.->|"manages connections"| node_friends

click node_auth "https://github.com/dadavemyster/truecircle/blob/main/js/index.js"
click node_profile "https://github.com/dadavemyster/truecircle/blob/main/js/profile.js"
click node_profileposts "https://github.com/dadavemyster/truecircle/blob/main/js/profilePosts.js"
click node_compose "https://github.com/dadavemyster/truecircle/blob/main/js/new_post.js"
click node_inner "https://github.com/dadavemyster/truecircle/blob/main/js/inner_circle.js"
click node_outer "https://github.com/dadavemyster/truecircle/blob/main/js/outer_circle.js"
click node_activity "https://github.com/dadavemyster/truecircle/blob/main/js/activityposts.js"
click node_scorefilter "https://github.com/dadavemyster/truecircle/blob/main/js/filterLowScorePosts.js"
click node_friends "https://github.com/dadavemyster/truecircle/blob/main/js/friends.js"
click node_addfriend "https://github.com/dadavemyster/truecircle/blob/main/js/addfriend.js"
click node_requestpage "https://github.com/dadavemyster/truecircle/blob/main/js/friendrequestspage.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_auth,node_profile,node_profileposts toneBlue
class node_compose,node_inner,node_outer,node_activity,node_scorefilter toneAmber
class node_friends,node_addfriend,node_requestpage toneMint
class node_realtimedb,node_storage,node_firebaseauth toneRose
class node_visitor toneIndigo
```

## Components

### Identity and profiles

- [Account access](https://github.com/dadavemyster/truecircle/blob/main/js/index.js): `js/index.js`
- [Profile editing](https://github.com/dadavemyster/truecircle/blob/main/js/profile.js): `js/profile.js`
- [Profile posts](https://github.com/dadavemyster/truecircle/blob/main/js/profilePosts.js): `js/profilePosts.js`

### Posts and circles

- [Post composer](https://github.com/dadavemyster/truecircle/blob/main/js/new_post.js): `js/new_post.js`
- [Inner circle feed](https://github.com/dadavemyster/truecircle/blob/main/js/inner_circle.js): `js/inner_circle.js`
- [Outer circle feed](https://github.com/dadavemyster/truecircle/blob/main/js/outer_circle.js): `js/outer_circle.js`
- [Voted posts](https://github.com/dadavemyster/truecircle/blob/main/js/activityposts.js): `js/activityposts.js`
- [Low-score filter](https://github.com/dadavemyster/truecircle/blob/main/js/filterLowScorePosts.js): `js/filterLowScorePosts.js`

### Friends and requests

- [Friend list](https://github.com/dadavemyster/truecircle/blob/main/js/friends.js): `js/friends.js`
- [Friend requests](https://github.com/dadavemyster/truecircle/blob/main/js/addfriend.js): `js/addfriend.js`
- [Request review](https://github.com/dadavemyster/truecircle/blob/main/js/friendrequestspage.js): `js/friendrequestspage.js`

### Firebase services

- **Realtime Database**
- **Firebase Storage**
- **Firebase Authentication**

### Other components

- **Visitor / member**

## Connections

- Visitor / member → Account access: signs in
- Account access → Firebase Authentication: authenticates (evidence: `js/index.js`)
- Account access → Realtime Database: reads / writes (evidence: `js/index.js`)
- Visitor / member → Post composer: creates post
- Post composer → Firebase Storage: uploads image (evidence: `js/new_post.js`)
- Post composer → Realtime Database: writes post (evidence: `js/new_post.js`)
- Inner circle feed → Realtime Database: subscribes / updates (evidence: `js/inner_circle.js`)
- Outer circle feed → Realtime Database: subscribes / updates (evidence: `js/outer_circle.js`)
- Voted posts → Realtime Database: reads / updates (evidence: `js/activityposts.js`)
- Profile posts → Realtime Database: reads / updates (evidence: `js/profilePosts.js`)
- Inner circle feed → Low-score filter: filters posts (evidence: `js/inner_circle.js`)
- Voted posts → Low-score filter: filters posts (evidence: `js/activityposts.js`)
- Profile posts → Low-score filter: filters posts (evidence: `js/profilePosts.js`)
- Inner circle feed → Firebase Storage: uploads / lists reactions (evidence: `js/inner_circle.js`)
- Outer circle feed → Firebase Storage: uploads / lists reactions (evidence: `js/outer_circle.js`)
- Profile posts → Firebase Storage: uploads / lists reactions (evidence: `js/profilePosts.js`)
- Profile editing → Realtime Database: updates profile (evidence: `js/profile.js`)
- Profile editing → Firebase Storage: uploads profile image (evidence: `js/profile.js`)
- Friend list → Realtime Database: reads / removes links (evidence: `js/friends.js`)
- Friend requests → Realtime Database: requests / links friends (evidence: `js/addfriend.js`)
- Request review → Realtime Database: reads / resolves requests (evidence: `js/friendrequestspage.js`)
- Visitor / member → Inner circle feed: browses feed
- Visitor / member → Outer circle feed: browses feed
- Visitor / member → Friend list: manages connections
