# manassebonsomi/clone_x_adonisjs architecture

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

- Interactive diagram: https://gitdiagram.com/manassebonsomi/clone_x_adonisjs
- Repository: https://github.com/manassebonsomi/clone_x_adonisjs

## Overview

NovaTech is an AdonisJS social network. Its principal workflow is account creation or login, then authenticated users publish posts and browse timelines or profiles, with social interactions and privacy controls; users can also search, message, and request AI assistance. The graph emphasizes documented routes and directly visible calls. Many controllers and their persistence details were not sampled, so those feature branches are included from the route map without speculative model or database edges.

Main entry points: [`start/routes.ts`](https://github.com/manassebonsomi/clone_x_adonisjs/blob/main/start/routes.ts) (HTTP routes), [`app/controllers/profile_controller.ts`](https://github.com/manassebonsomi/clone_x_adonisjs/blob/main/app/controllers/profile_controller.ts) (Profiles and privacy), [`app/controllers/tweets_controller.ts`](https://github.com/manassebonsomi/clone_x_adonisjs/blob/main/app/controllers/tweets_controller.ts) (Post publishing), [`app/controllers/session_controller.ts`](https://github.com/manassebonsomi/clone_x_adonisjs/blob/main/app/controllers/session_controller.ts) (Signup and login)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Accounts and profiles"]
  node_auth["Signup and login"]
  node_signup["Account creation"]
  node_google["Google sign-in"]
  node_profile["Profiles and privacy"]
  node_user["User records<br/>[user.ts]"]
  node_avatar["Avatar uploads<br/>[upload_service.ts]"]
end

subgraph group_social["Social publishing"]
  node_tweets["Post publishing"]
  node_timeline["Timeline feed"]
  node_tweetdata["Posts and media<br/>[tweet.ts]"]
  node_reactions["Likes, reposts, comments"]
  node_comments["Comment handling"]
  node_relations["Follows and requests"]
  node_blocks["Blocks"]
end

subgraph group_discovery["Discovery and messaging"]
  node_search["Search and hashtags"]
  node_tags["Hashtag browsing"]
  node_messages["Direct messages"]
end

subgraph group_ai["AI assistance"]
  node_ai_controller["AI endpoints"]
  node_ai_service["AI generation and audit<br/>[grok_service.ts]"]
end

subgraph group_runtime["HTTP runtime"]
  node_routes["HTTP routes<br/>[routes.ts]"]
end

node_member(("Visitor / member"))
node_groq["Groq API"]
node_database[("Application database<br/>[database.ts]")]
node_client(("Web client"))

node_member -->|"sends requests"| node_routes
node_routes -->|"routes login"| node_auth
node_routes -->|"routes signup"| node_signup
node_routes -->|"routes OAuth"| node_google
node_routes -->|"routes profiles"| node_profile
node_routes -->|"routes feed"| node_timeline
node_routes -->|"routes posts"| node_tweets
node_routes -->|"routes reactions"| node_reactions
node_routes -->|"routes comments"| node_comments
node_routes -->|"routes follows"| node_relations
node_routes -->|"routes blocks"| node_blocks
node_routes -->|"routes search"| node_search
node_routes -->|"routes tags"| node_tags
node_routes -->|"routes messages"| node_messages
node_routes -->|"routes AI"| node_ai_controller
node_auth -->|"queries and saves"| node_user
node_profile -->|"queries and saves"| node_user
node_profile -->|"uploads avatars"| node_avatar
node_tweets -->|"creates posts"| node_tweetdata
node_tweets -->|"attaches hashtags"| node_tags
node_profile -->|"loads activity"| node_tweetdata
node_ai_controller -.->|"delegates requests"| node_ai_service
node_ai_service -->|"calls completion API"| node_groq
node_client -.->|"uses web interface"| node_routes

click node_routes "https://github.com/manassebonsomi/clone_x_adonisjs/blob/main/start/routes.ts"
click node_auth "https://github.com/manassebonsomi/clone_x_adonisjs/blob/main/app/controllers/session_controller.ts"
click node_signup "https://github.com/manassebonsomi/clone_x_adonisjs/blob/main/app/controllers/new_account_controller.ts"
click node_google "https://github.com/manassebonsomi/clone_x_adonisjs/blob/main/app/controllers/google_auths_controller.ts"
click node_profile "https://github.com/manassebonsomi/clone_x_adonisjs/blob/main/app/controllers/profile_controller.ts"
click node_user "https://github.com/manassebonsomi/clone_x_adonisjs/blob/main/app/models/user.ts"
click node_avatar "https://github.com/manassebonsomi/clone_x_adonisjs/blob/main/app/services/upload_service.ts"
click node_tweets "https://github.com/manassebonsomi/clone_x_adonisjs/blob/main/app/controllers/tweets_controller.ts"
click node_timeline "https://github.com/manassebonsomi/clone_x_adonisjs/blob/main/app/controllers/timelines_controller.ts"
click node_tweetdata "https://github.com/manassebonsomi/clone_x_adonisjs/blob/main/app/models/tweet.ts"
click node_reactions "https://github.com/manassebonsomi/clone_x_adonisjs/blob/main/app/controllers/retweets_controller.ts"
click node_comments "https://github.com/manassebonsomi/clone_x_adonisjs/blob/main/app/controllers/comments_controller.ts"
click node_relations "https://github.com/manassebonsomi/clone_x_adonisjs/blob/main/app/controllers/follows_controller.ts"
click node_blocks "https://github.com/manassebonsomi/clone_x_adonisjs/blob/main/app/controllers/blocks_controller.ts"
click node_search "https://github.com/manassebonsomi/clone_x_adonisjs/blob/main/app/controllers/searches_controller.ts"
click node_tags "https://github.com/manassebonsomi/clone_x_adonisjs/blob/main/app/controllers/hashtags_controller.ts"
click node_messages "https://github.com/manassebonsomi/clone_x_adonisjs/blob/main/app/controllers/messages_controller.ts"
click node_ai_controller "https://github.com/manassebonsomi/clone_x_adonisjs/blob/main/app/controllers/groks_controller.ts"
click node_ai_service "https://github.com/manassebonsomi/clone_x_adonisjs/blob/main/app/services/grok_service.ts"
click node_database "https://github.com/manassebonsomi/clone_x_adonisjs/blob/main/config/database.ts"

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_signup,node_google,node_profile,node_user,node_avatar,node_client toneBlue
class node_tweets,node_timeline,node_tweetdata,node_reactions,node_comments,node_relations,node_blocks,node_database toneAmber
class node_search,node_tags,node_messages,node_groq toneMint
class node_ai_controller,node_ai_service toneRose
class node_routes,node_member toneIndigo
```

## Components

### Accounts and profiles

- [Signup and login](https://github.com/manassebonsomi/clone_x_adonisjs/blob/main/app/controllers/session_controller.ts): `app/controllers/session_controller.ts`
- [Account creation](https://github.com/manassebonsomi/clone_x_adonisjs/blob/main/app/controllers/new_account_controller.ts): `app/controllers/new_account_controller.ts`
- [Google sign-in](https://github.com/manassebonsomi/clone_x_adonisjs/blob/main/app/controllers/google_auths_controller.ts): `app/controllers/google_auths_controller.ts`
- [Profiles and privacy](https://github.com/manassebonsomi/clone_x_adonisjs/blob/main/app/controllers/profile_controller.ts): `app/controllers/profile_controller.ts`
- [User records](https://github.com/manassebonsomi/clone_x_adonisjs/blob/main/app/models/user.ts): `app/models/user.ts`
- [Avatar uploads](https://github.com/manassebonsomi/clone_x_adonisjs/blob/main/app/services/upload_service.ts): `app/services/upload_service.ts`

### Social publishing

- [Post publishing](https://github.com/manassebonsomi/clone_x_adonisjs/blob/main/app/controllers/tweets_controller.ts): `app/controllers/tweets_controller.ts`
- [Timeline feed](https://github.com/manassebonsomi/clone_x_adonisjs/blob/main/app/controllers/timelines_controller.ts): `app/controllers/timelines_controller.ts`
- [Posts and media](https://github.com/manassebonsomi/clone_x_adonisjs/blob/main/app/models/tweet.ts): `app/models/tweet.ts`
- [Likes, reposts, comments](https://github.com/manassebonsomi/clone_x_adonisjs/blob/main/app/controllers/retweets_controller.ts): `app/controllers/retweets_controller.ts`
- [Comment handling](https://github.com/manassebonsomi/clone_x_adonisjs/blob/main/app/controllers/comments_controller.ts): `app/controllers/comments_controller.ts`
- [Follows and requests](https://github.com/manassebonsomi/clone_x_adonisjs/blob/main/app/controllers/follows_controller.ts): `app/controllers/follows_controller.ts`
- [Blocks](https://github.com/manassebonsomi/clone_x_adonisjs/blob/main/app/controllers/blocks_controller.ts): `app/controllers/blocks_controller.ts`

### Discovery and messaging

- [Search and hashtags](https://github.com/manassebonsomi/clone_x_adonisjs/blob/main/app/controllers/searches_controller.ts): `app/controllers/searches_controller.ts`
- [Hashtag browsing](https://github.com/manassebonsomi/clone_x_adonisjs/blob/main/app/controllers/hashtags_controller.ts): `app/controllers/hashtags_controller.ts`
- [Direct messages](https://github.com/manassebonsomi/clone_x_adonisjs/blob/main/app/controllers/messages_controller.ts): `app/controllers/messages_controller.ts`

### AI assistance

- [AI endpoints](https://github.com/manassebonsomi/clone_x_adonisjs/blob/main/app/controllers/groks_controller.ts): `app/controllers/groks_controller.ts`
- [AI generation and audit](https://github.com/manassebonsomi/clone_x_adonisjs/blob/main/app/services/grok_service.ts): `app/services/grok_service.ts`

### HTTP runtime

- [HTTP routes](https://github.com/manassebonsomi/clone_x_adonisjs/blob/main/start/routes.ts): `start/routes.ts`

### Other components

- **Visitor / member**
- **Groq API**
- [Application database](https://github.com/manassebonsomi/clone_x_adonisjs/blob/main/config/database.ts): `config/database.ts`
- **Web client**

## Connections

- Visitor / member → HTTP routes: sends requests (evidence: `start/routes.ts`)
- HTTP routes → Signup and login: routes login (evidence: `start/routes.ts`)
- HTTP routes → Account creation: routes signup (evidence: `start/routes.ts`)
- HTTP routes → Google sign-in: routes OAuth (evidence: `start/routes.ts`)
- HTTP routes → Profiles and privacy: routes profiles (evidence: `start/routes.ts`)
- HTTP routes → Timeline feed: routes feed (evidence: `start/routes.ts`)
- HTTP routes → Post publishing: routes posts (evidence: `start/routes.ts`)
- HTTP routes → Likes, reposts, comments: routes reactions (evidence: `start/routes.ts`)
- HTTP routes → Comment handling: routes comments (evidence: `start/routes.ts`)
- HTTP routes → Follows and requests: routes follows (evidence: `start/routes.ts`)
- HTTP routes → Blocks: routes blocks (evidence: `start/routes.ts`)
- HTTP routes → Search and hashtags: routes search (evidence: `start/routes.ts`)
- HTTP routes → Hashtag browsing: routes tags (evidence: `start/routes.ts`)
- HTTP routes → Direct messages: routes messages (evidence: `start/routes.ts`)
- HTTP routes → AI endpoints: routes AI (evidence: `start/routes.ts`)
- Signup and login → User records: queries and saves (evidence: `app/controllers/session_controller.ts`)
- Profiles and privacy → User records: queries and saves (evidence: `app/controllers/profile_controller.ts`)
- Profiles and privacy → Avatar uploads: uploads avatars (evidence: `app/controllers/profile_controller.ts`)
- Post publishing → Posts and media: creates posts (evidence: `app/controllers/tweets_controller.ts`)
- Post publishing → Hashtag browsing: attaches hashtags (evidence: `app/controllers/tweets_controller.ts`)
- Profiles and privacy → Posts and media: loads activity (evidence: `app/controllers/profile_controller.ts`)
- AI endpoints → AI generation and audit: delegates requests
- AI generation and audit → Groq API: calls completion API (evidence: `app/services/grok_service.ts`)
- Web client → HTTP routes: uses web interface
