# rafsancuac/lekhok-forum architecture

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

- Interactive diagram: https://gitdiagram.com/rafsancuac/lekhok-forum
- Repository: https://github.com/rafsancuac/lekhok-forum

## Overview

লেখক ফোরাম হলো শিক্ষার্থী-লেখক সম্প্রদায়ের Express/EJS ওয়েব অ্যাপ; ব্যবহারকারীরা লগইন করে লেখা ও কমিউনিটি ফিচার ব্যবহার করেন, আর কর্মীরা বিষয়বস্তু ও সদস্য-সংক্রান্ত কাজ পরিচালনা করেন। পাশাপাশি, ই-পেপার বট Telegram থেকে পত্রিকার PDF নিয়ে Google Drive-এ রাখে এবং সাইটে সিঙ্ক করে। গ্রাফে README-র লাইভ অ্যাপ ও বটের ভূমিকা, এবং গাছের প্রধান feature routes অন্তর্ভুক্ত; unsampled route wiring দেখানো হয়নি, সংযোগ কেবল যেখানে নথি বা নমুনা তা সমর্থন করে।

Main entry points: [`lekhok-forum/server.js`](https://github.com/rafsancuac/lekhok-forum/blob/main/lekhok-forum/server.js) (Express অ্যাপ), [`epaper-bot/src/index.ts`](https://github.com/rafsancuac/lekhok-forum/blob/main/epaper-bot/src/index.ts) (ই-পেপার বট), [`lekhok-forum/db.js`](https://github.com/rafsancuac/lekhok-forum/blob/main/lekhok-forum/db.js) (অ্যাপ ডেটাবেস), [`lekhok-forum/routes/auth.js`](https://github.com/rafsancuac/lekhok-forum/blob/main/lekhok-forum/routes/auth.js) (লগইন ও প্রোফাইল)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["ওয়েব অ্যাপ"]
  node_server["Express অ্যাপ<br/>[server.js]"]
  node_auth["লগইন ও প্রোফাইল<br/>[auth.js]"]
  node_session["সেশন স্টোর<br/>[session-store.js]"]
  node_api["API এন্ট্রি<br/>[index.js]"]
  node_db[("অ্যাপ ডেটাবেস<br/>[db.js]")]
end

subgraph group_community["কমিউনিটি ফিচার"]
  node_posts["ফিড ও লেখা<br/>[social.js]"]
  node_pages["পেজ ও তথ্য<br/>[pages.js]"]
  node_calls["কমিউনিটি কল<br/>[calls.js]"]
  node_daily["দৈনিক কনটেন্ট<br/>[daily.js]"]
  node_epaperapi["ই-পেপার API<br/>[api-epaper.js]"]
  node_uploads["মিডিয়া আপলোড<br/>[upload.js]"]
end

subgraph group_governance["সদস্য ও প্রশাসন"]
  node_admin["অ্যাডমিন প্যানেল<br/>[routes.js]"]
  node_superadmin["সুপার অ্যাডমিন<br/>[routes-super.js]"]
  node_claims["অ্যাকাউন্ট ক্লেইম<br/>[claim-service.js]"]
  node_constitution["গঠনতন্ত্র রেজিস্ট্রি<br/>[constitution.js]"]
end

subgraph group_epaper["ই-পেপার সিঙ্ক"]
  node_bot["ই-পেপার বট<br/>[index.ts]"]
  node_cleaner["PDF পরিষ্কারক<br/>[cleaner.ts]"]
  node_renderer["PDF-ээс зураг<br/>[render-page.mjs]"]
end

node_visitor(("পাঠক / সদস্য"))
node_staff(("কর্মী / প্রশাসক"))
node_telegram(("Telegram চ্যানেল"))
node_drive[("Google Drive")]

node_visitor -->|"অনুরোধ পাঠায়"| node_server
node_staff -->|"অনুরোধ পাঠায়"| node_server
node_server -->|"HTTP রুটে পাঠায়"| node_auth
node_server -->|"HTTP রুটে পাঠায়"| node_posts
node_server -->|"HTTP রুটে পাঠায়"| node_pages
node_server -->|"HTTP রুটে পাঠায়"| node_calls
node_server -->|"HTTP রুটে পাঠায়"| node_daily
node_server -->|"HTTP রুটে পাঠায়"| node_epaperapi
node_api -->|"অ্যাপ চালায়"| node_server
node_auth -->|"অ্যাকাউন্ট পড়ে/লেখে"| node_db
node_auth -->|"সেশন পরিচালনা"| node_session
node_session -->|"সেশন সংরক্ষণ করে"| node_db
node_claims -->|"ক্লেইম ও সদস্য বদলায়"| node_db
node_admin -->|"ადმინისტრაციულ তথ্য পড়ে/লেখে"| node_db
node_superadmin -->|"অ্যাডমিন নিয়ন্ত্রণ করে"| node_db
node_admin -->|"কনটেন্ট পরিচালনা দেয়"| node_staff
node_uploads -.->|"ক্লাউডে আপলোড"| node_drive
node_telegram -->|"পত্রিকা সংগ্রহ"| node_bot
node_bot -->|"PDF পরিষ্কার করে"| node_cleaner
node_bot -->|"থাম্বনেইল রেন্ডার"| node_renderer
node_bot -->|"PDF আপলোড"| node_drive
node_bot -->|"সিঙ্ক অনুরোধ"| node_epaperapi

click node_server "https://github.com/rafsancuac/lekhok-forum/blob/main/lekhok-forum/server.js"
click node_auth "https://github.com/rafsancuac/lekhok-forum/blob/main/lekhok-forum/routes/auth.js"
click node_session "https://github.com/rafsancuac/lekhok-forum/blob/main/lekhok-forum/session-store.js"
click node_api "https://github.com/rafsancuac/lekhok-forum/blob/main/lekhok-forum/api/index.js"
click node_posts "https://github.com/rafsancuac/lekhok-forum/blob/main/lekhok-forum/routes/social.js"
click node_pages "https://github.com/rafsancuac/lekhok-forum/blob/main/lekhok-forum/routes/pages.js"
click node_calls "https://github.com/rafsancuac/lekhok-forum/blob/main/lekhok-forum/routes/calls.js"
click node_daily "https://github.com/rafsancuac/lekhok-forum/blob/main/lekhok-forum/routes/daily.js"
click node_epaperapi "https://github.com/rafsancuac/lekhok-forum/blob/main/lekhok-forum/routes/api-epaper.js"
click node_uploads "https://github.com/rafsancuac/lekhok-forum/blob/main/lekhok-forum/middleware/upload.js"
click node_admin "https://github.com/rafsancuac/lekhok-forum/blob/main/lekhok-forum/admin/routes.js"
click node_superadmin "https://github.com/rafsancuac/lekhok-forum/blob/main/lekhok-forum/admin/routes-super.js"
click node_claims "https://github.com/rafsancuac/lekhok-forum/blob/main/lekhok-forum/helpers/claim-service.js"
click node_constitution "https://github.com/rafsancuac/lekhok-forum/blob/main/lekhok-forum/data/constitution.js"
click node_db "https://github.com/rafsancuac/lekhok-forum/blob/main/lekhok-forum/db.js"
click node_bot "https://github.com/rafsancuac/lekhok-forum/blob/main/epaper-bot/src/index.ts"
click node_cleaner "https://github.com/rafsancuac/lekhok-forum/blob/main/epaper-bot/src/cleaner.ts"
click node_renderer "https://github.com/rafsancuac/lekhok-forum/blob/main/epaper-bot/src/render-page.mjs"

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_server,node_auth,node_session,node_api,node_db toneBlue
class node_posts,node_pages,node_calls,node_daily,node_epaperapi,node_uploads,node_drive toneAmber
class node_admin,node_superadmin,node_claims,node_constitution toneMint
class node_bot,node_cleaner,node_renderer toneRose
class node_visitor,node_staff,node_telegram toneIndigo
```

## Components

### ওয়েব অ্যাপ

- [Express অ্যাপ](https://github.com/rafsancuac/lekhok-forum/blob/main/lekhok-forum/server.js): `lekhok-forum/server.js`
- [লগইন ও প্রোফাইল](https://github.com/rafsancuac/lekhok-forum/blob/main/lekhok-forum/routes/auth.js): `lekhok-forum/routes/auth.js`
- [সেশন স্টোর](https://github.com/rafsancuac/lekhok-forum/blob/main/lekhok-forum/session-store.js): `lekhok-forum/session-store.js`
- [API এন্ট্রি](https://github.com/rafsancuac/lekhok-forum/blob/main/lekhok-forum/api/index.js): `lekhok-forum/api/index.js`
- [অ্যাপ ডেটাবেস](https://github.com/rafsancuac/lekhok-forum/blob/main/lekhok-forum/db.js): `lekhok-forum/db.js`

### কমিউনিটি ফিচার

- [ফিড ও লেখা](https://github.com/rafsancuac/lekhok-forum/blob/main/lekhok-forum/routes/social.js): `lekhok-forum/routes/social.js`
- [পেজ ও তথ্য](https://github.com/rafsancuac/lekhok-forum/blob/main/lekhok-forum/routes/pages.js): `lekhok-forum/routes/pages.js`
- [কমিউনিটি কল](https://github.com/rafsancuac/lekhok-forum/blob/main/lekhok-forum/routes/calls.js): `lekhok-forum/routes/calls.js`
- [দৈনিক কনটেন্ট](https://github.com/rafsancuac/lekhok-forum/blob/main/lekhok-forum/routes/daily.js): `lekhok-forum/routes/daily.js`
- [ই-পেপার API](https://github.com/rafsancuac/lekhok-forum/blob/main/lekhok-forum/routes/api-epaper.js): `lekhok-forum/routes/api-epaper.js`
- [মিডিয়া আপলোড](https://github.com/rafsancuac/lekhok-forum/blob/main/lekhok-forum/middleware/upload.js): `lekhok-forum/middleware/upload.js`

### সদস্য ও প্রশাসন

- [অ্যাডমিন প্যানেল](https://github.com/rafsancuac/lekhok-forum/blob/main/lekhok-forum/admin/routes.js): `lekhok-forum/admin/routes.js`
- [সুপার অ্যাডমিন](https://github.com/rafsancuac/lekhok-forum/blob/main/lekhok-forum/admin/routes-super.js): `lekhok-forum/admin/routes-super.js`
- [অ্যাকাউন্ট ক্লেইম](https://github.com/rafsancuac/lekhok-forum/blob/main/lekhok-forum/helpers/claim-service.js): `lekhok-forum/helpers/claim-service.js`
- [গঠনতন্ত্র রেজিস্ট্রি](https://github.com/rafsancuac/lekhok-forum/blob/main/lekhok-forum/data/constitution.js): `lekhok-forum/data/constitution.js`

### ই-পেপার সিঙ্ক

- [ই-পেপার বট](https://github.com/rafsancuac/lekhok-forum/blob/main/epaper-bot/src/index.ts): `epaper-bot/src/index.ts`
- [PDF পরিষ্কারক](https://github.com/rafsancuac/lekhok-forum/blob/main/epaper-bot/src/cleaner.ts): `epaper-bot/src/cleaner.ts`
- [PDF-ээс зураг](https://github.com/rafsancuac/lekhok-forum/blob/main/epaper-bot/src/render-page.mjs): `epaper-bot/src/render-page.mjs`

### Other components

- **পাঠক / সদস্য**
- **কর্মী / প্রশাসক**
- **Telegram চ্যানেল**
- **Google Drive**

## Connections

- পাঠক / সদস্য → Express অ্যাপ: অনুরোধ পাঠায়
- কর্মী / প্রশাসক → Express অ্যাপ: অনুরোধ পাঠায়
- Express অ্যাপ → লগইন ও প্রোফাইল: HTTP রুটে পাঠায়
- Express অ্যাপ → ফিড ও লেখা: HTTP রুটে পাঠায়
- Express অ্যাপ → পেজ ও তথ্য: HTTP রুটে পাঠায়
- Express অ্যাপ → কমিউনিটি কল: HTTP রুটে পাঠায়
- Express অ্যাপ → দৈনিক কনটেন্ট: HTTP রুটে পাঠায়
- Express অ্যাপ → ই-পেপার API: HTTP রুটে পাঠায়
- API এন্ট্রি → Express অ্যাপ: অ্যাপ চালায়
- লগইন ও প্রোফাইল → অ্যাপ ডেটাবেস: অ্যাকাউন্ট পড়ে/লেখে
- লগইন ও প্রোফাইল → সেশন স্টোর: সেশন পরিচালনা
- সেশন স্টোর → অ্যাপ ডেটাবেস: সেশন সংরক্ষণ করে
- অ্যাকাউন্ট ক্লেইম → অ্যাপ ডেটাবেস: ক্লেইম ও সদস্য বদলায়
- অ্যাডমিন প্যানেল → অ্যাপ ডেটাবেস: ადმინისტრაციულ তথ্য পড়ে/লেখে
- সুপার অ্যাডমিন → অ্যাপ ডেটাবেস: অ্যাডমিন নিয়ন্ত্রণ করে
- অ্যাডমিন প্যানেল → কর্মী / প্রশাসক: কনটেন্ট পরিচালনা দেয়
- মিডিয়া আপলোড → Google Drive: ক্লাউডে আপলোড
- Telegram চ্যানেল → ই-পেপার বট: পত্রিকা সংগ্রহ
- ই-পেপার বট → PDF পরিষ্কারক: PDF পরিষ্কার করে
- ই-পেপার বট → PDF-ээс зураг: থাম্বনেইল রেন্ডার
- ই-পেপার বট → Google Drive: PDF আপলোড
- ই-পেপার বট → ই-পেপার API: সিঙ্ক অনুরোধ
