# ajay7616/writers_house architecture

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

- Interactive diagram: https://gitdiagram.com/ajay7616/writers_house
- Repository: https://github.com/ajay7616/writers_house

## Overview

WritersHouse is a social storytelling platform: readers discover and read works, writers publish and manage them, and administrators review content and manage the community. The tree and sampled pages show the PHP page structure and some calls into shared functions; most function implementations were not sampled, so database wiring and feature-level links are shown only where supported by the documented product or visible page behavior. Audio and music are documented capabilities, but their implementation is not identifiable in the supplied tree.

Main entry points: [`includes/function.php`](https://github.com/ajay7616/writers_house/blob/main/includes/function.php) (Shared functions), [`login/index.php`](https://github.com/ajay7616/writers_house/blob/main/login/index.php) (Sign in), [`registration/index.php`](https://github.com/ajay7616/writers_house/blob/main/registration/index.php) (Registration), [`writer/add_content.php`](https://github.com/ajay7616/writers_house/blob/main/writer/add_content.php) (Create and edit)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_accounts["Accounts and profiles"]
  node_auth["Sign in<br/>[index.php]"]
  node_registration["Registration<br/>[index.php]"]
  node_user["Reader profile<br/>[index.php]"]
  node_writer["Writer dashboard<br/>[index.php]"]
end

subgraph group_stories["Storytelling"]
  node_home["Home<br/>[index.php]"]
  node_writer_edit["Create and edit<br/>[add_content.php]"]
  node_content_list["Browse stories<br/>[content_list.php]"]
  node_explore["Explore stories<br/>[explore.php]"]
  node_search["Story search"]
  node_content_view["Read and engage"]
  node_likes["Story likes<br/>[insert_like.php]"]
end

subgraph group_community["Community"]
  node_chat_list["Message list<br/>[index.php]"]
  node_chat["One-to-one chat<br/>[chat.php]"]
  node_chat_messages["Message retrieval<br/>[get_message.php]"]
  node_feedback["Submit feedback<br/>[index.php]"]
end

subgraph group_admin["Administration"]
  node_admin_content["Content review"]
  node_admin_genre["Genre management<br/>[index.php]"]
  node_admin_people["User and writer management<br/>[index.php]"]
  node_admin_feedback["Review feedback<br/>[index.php]"]
end

subgraph group_shared["Shared services"]
  node_functions["Shared functions<br/>[function.php]"]
  node_database[("Application database<br/>[db.php]")]
end

node_visitor(("Reader or writer"))

node_visitor -->|"visits"| node_home
node_visitor -->|"registers"| node_registration
node_visitor -->|"signs in"| node_auth
node_registration -->|"registers account"| node_functions
node_auth -->|"authenticates"| node_functions
node_visitor -->|"discovers"| node_explore
node_visitor -->|"browses"| node_content_list
node_visitor -->|"searches"| node_search
node_visitor -->|"opens story"| node_content_view
node_content_view -->|"submits likes"| node_likes
node_visitor -->|"writes story"| node_writer_edit
node_writer_edit -->|"saves content"| node_functions
node_writer -->|"loads dashboard data"| node_functions
node_user -->|"loads visit history"| node_functions
node_visitor -->|"opens messages"| node_chat_list
node_chat_list -->|"opens conversation"| node_chat
node_chat -->|"retrieves messages"| node_chat_messages
node_visitor -->|"submits feedback"| node_feedback
node_feedback -->|"stores feedback"| node_functions
node_admin_content -->|"reviews content"| node_functions
node_admin_genre -->|"manages genres"| node_functions
node_admin_people -->|"manages accounts"| node_functions
node_admin_feedback -->|"loads feedback"| node_functions
node_functions -->|"reads and writes"| node_database

click node_home "https://github.com/ajay7616/writers_house/blob/main/index.php"
click node_auth "https://github.com/ajay7616/writers_house/blob/main/login/index.php"
click node_registration "https://github.com/ajay7616/writers_house/blob/main/registration/index.php"
click node_user "https://github.com/ajay7616/writers_house/blob/main/user/index.php"
click node_writer "https://github.com/ajay7616/writers_house/blob/main/writer/index.php"
click node_writer_edit "https://github.com/ajay7616/writers_house/blob/main/writer/add_content.php"
click node_content_list "https://github.com/ajay7616/writers_house/blob/main/content/content_list.php"
click node_explore "https://github.com/ajay7616/writers_house/blob/main/explore.php"
click node_search "https://github.com/ajay7616/writers_house/blob/main/content/content_search_list.php"
click node_content_view "https://github.com/ajay7616/writers_house/blob/main/content/content_view_page.php"
click node_likes "https://github.com/ajay7616/writers_house/blob/main/content/insert_like.php"
click node_chat_list "https://github.com/ajay7616/writers_house/blob/main/chat/index.php"
click node_chat "https://github.com/ajay7616/writers_house/blob/main/chat/chat.php"
click node_chat_messages "https://github.com/ajay7616/writers_house/blob/main/chat/get_message.php"
click node_feedback "https://github.com/ajay7616/writers_house/blob/main/feedback/index.php"
click node_admin_content "https://github.com/ajay7616/writers_house/blob/main/admin/content/pending_content_list.php"
click node_admin_genre "https://github.com/ajay7616/writers_house/blob/main/admin/genre/index.php"
click node_admin_people "https://github.com/ajay7616/writers_house/blob/main/admin/user/index.php"
click node_admin_feedback "https://github.com/ajay7616/writers_house/blob/main/admin/feedback/index.php"
click node_functions "https://github.com/ajay7616/writers_house/blob/main/includes/function.php"
click node_database "https://github.com/ajay7616/writers_house/blob/main/includes/db.php"

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_registration,node_user,node_writer toneBlue
class node_home,node_writer_edit,node_content_list,node_explore,node_search,node_content_view,node_likes toneAmber
class node_chat_list,node_chat,node_chat_messages,node_feedback toneMint
class node_admin_content,node_admin_genre,node_admin_people,node_admin_feedback toneRose
class node_functions,node_database,node_visitor toneIndigo
```

## Components

### Accounts and profiles

- [Sign in](https://github.com/ajay7616/writers_house/blob/main/login/index.php): `login/index.php`
- [Registration](https://github.com/ajay7616/writers_house/blob/main/registration/index.php): `registration/index.php`
- [Reader profile](https://github.com/ajay7616/writers_house/blob/main/user/index.php): `user/index.php`
- [Writer dashboard](https://github.com/ajay7616/writers_house/blob/main/writer/index.php): `writer/index.php`

### Storytelling

- [Home](https://github.com/ajay7616/writers_house/blob/main/index.php): `index.php`
- [Create and edit](https://github.com/ajay7616/writers_house/blob/main/writer/add_content.php): `writer/add_content.php`
- [Browse stories](https://github.com/ajay7616/writers_house/blob/main/content/content_list.php): `content/content_list.php`
- [Explore stories](https://github.com/ajay7616/writers_house/blob/main/explore.php): `explore.php`
- [Story search](https://github.com/ajay7616/writers_house/blob/main/content/content_search_list.php): `content/content_search_list.php`
- [Read and engage](https://github.com/ajay7616/writers_house/blob/main/content/content_view_page.php): `content/content_view_page.php`
- [Story likes](https://github.com/ajay7616/writers_house/blob/main/content/insert_like.php): `content/insert_like.php`

### Community

- [Message list](https://github.com/ajay7616/writers_house/blob/main/chat/index.php): `chat/index.php`
- [One-to-one chat](https://github.com/ajay7616/writers_house/blob/main/chat/chat.php): `chat/chat.php`
- [Message retrieval](https://github.com/ajay7616/writers_house/blob/main/chat/get_message.php): `chat/get_message.php`
- [Submit feedback](https://github.com/ajay7616/writers_house/blob/main/feedback/index.php): `feedback/index.php`

### Administration

- [Content review](https://github.com/ajay7616/writers_house/blob/main/admin/content/pending_content_list.php): `admin/content/pending_content_list.php`
- [Genre management](https://github.com/ajay7616/writers_house/blob/main/admin/genre/index.php): `admin/genre/index.php`
- [User and writer management](https://github.com/ajay7616/writers_house/blob/main/admin/user/index.php): `admin/user/index.php`
- [Review feedback](https://github.com/ajay7616/writers_house/blob/main/admin/feedback/index.php): `admin/feedback/index.php`

### Shared services

- [Shared functions](https://github.com/ajay7616/writers_house/blob/main/includes/function.php): `includes/function.php`
- [Application database](https://github.com/ajay7616/writers_house/blob/main/includes/db.php): `includes/db.php`

### Other components

- **Reader or writer**

## Connections

- Reader or writer → Home: visits
- Reader or writer → Registration: registers
- Reader or writer → Sign in: signs in
- Registration → Shared functions: registers account
- Sign in → Shared functions: authenticates
- Reader or writer → Explore stories: discovers
- Reader or writer → Browse stories: browses
- Reader or writer → Story search: searches
- Reader or writer → Read and engage: opens story
- Read and engage → Story likes: submits likes
- Reader or writer → Create and edit: writes story
- Create and edit → Shared functions: saves content
- Writer dashboard → Shared functions: loads dashboard data
- Reader profile → Shared functions: loads visit history
- Reader or writer → Message list: opens messages
- Message list → One-to-one chat: opens conversation
- One-to-one chat → Message retrieval: retrieves messages
- Reader or writer → Submit feedback: submits feedback
- Submit feedback → Shared functions: stores feedback
- Content review → Shared functions: reviews content
- Genre management → Shared functions: manages genres
- User and writer management → Shared functions: manages accounts
- Review feedback → Shared functions: loads feedback
- Shared functions → Application database: reads and writes
