# salimtech353/reels_factory architecture

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

- Interactive diagram: https://gitdiagram.com/salimtech353/reels_factory
- Repository: https://github.com/salimtech353/reels_factory

## Overview

রিল কারখানা হলো ব্রাউজারভিত্তিক বাংলা স্ক্রিপ্ট-টু-ভিডিও সম্পাদক। ব্যবহারকারী অডিও ট্রান্সক্রাইব বা টাইমস্ট্যাম্পযুক্ত স্ক্রিপ্ট দেন, দৃশ্যের সার্চ কিওয়ার্ড তৈরি করেন, Pexels/Pixabay ফল থেকে মিডিয়া বাছেন, তারপর টাইমলাইন রেন্ডার করে ভিডিও প্রিভিউ/ডাউনলোড করেন। README-তে Shotstack রেন্ডারের কথা থাকলেও UI-র রেন্ডার-পথ GitHub সার্ভার/FFmpeg বলেও উল্লেখ আছে; app.js-এর সংশ্লিষ্ট অংশ অসম্পূর্ণ, তাই দুই পথের সংযোগ নিশ্চিত করে দেখানো হয়নি।

Main entry points: [`app.js`](https://github.com/salimtech353/reels_factory/blob/main/app.js) (স্ক্রিপ্ট সম্পাদক), [`functions/api/keywords.js`](https://github.com/salimtech353/reels_factory/blob/main/functions/api/keywords.js) (কিওয়ার্ড API), [`functions/api/search-media.js`](https://github.com/salimtech353/reels_factory/blob/main/functions/api/search-media.js) (মিডিয়া সার্চ API), [`functions/api/shotstack.js`](https://github.com/salimtech353/reels_factory/blob/main/functions/api/shotstack.js) (Shotstack API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_authoring["স্ক্রিপ্ট ও দৃশ্য"]
  node_editor["স্ক্রিপ্ট সম্পাদক<br/>[app.js]"]
  node_transcription["অডিও ট্রান্সক্রিপশন<br/>[app.js]"]
  node_keyword_ui["দৃশ্য বিশ্লেষণ<br/>[app.js]"]
  node_i18n["ভাষা ও UI লেখা<br/>[i18n.js]"]
  node_project_storage[("প্রজেক্ট সংরক্ষণ<br/>[app.js]")]
end

subgraph group_media["মিডিয়া অনুসন্ধান"]
  node_picker["মিডিয়া বাছাই<br/>[app.js]"]
end

subgraph group_render["রেন্ডার ও ফল"]
  node_timeline["টাইমলাইন প্রস্তুতি<br/>[app.js]"]
  node_render_result["ভিডিও প্রিভিউ ও ডাউনলোড<br/>[app.js]"]
end

subgraph group_services["API সেবা"]
  node_keyword_api["কিওয়ার্ড API<br/>[keywords.js]"]
  node_groq{{"Groq"}}
  node_openrouter{{"OpenRouter"}}
  node_search_api["মিডিয়া সার্চ API<br/>[search-media.js]"]
  node_pexels{{"Pexels"}}
  node_pixabay{{"Pixabay"}}
  node_shotstack_api["Shotstack API<br/>[shotstack.js]"]
  node_shotstack{{"Shotstack ক্লাউড"}}
end

node_user(("ভিডিও নির্মাতা"))

node_user -->|"লিখে ও সম্পাদনা"| node_editor
node_user -->|"অডিও দেয়"| node_transcription
node_editor -.->|"দৃশ্য বিশ্লেষণ"| node_keyword_ui
node_keyword_ui -.->|"কিওয়ার্ড চায়"| node_keyword_api
node_keyword_api -->|"বিশ্লেষণ করে"| node_groq
node_keyword_api -->|"ফলব্যাক করে"| node_openrouter
node_user -->|"মিডিয়া বেছে"| node_picker
node_picker -.->|"সার্চ চায়"| node_search_api
node_search_api -->|"খোঁজে"| node_pexels
node_search_api -->|"খোঁজে"| node_pixabay
node_user -->|"রেন্ডার শুরু"| node_timeline
node_timeline -.->|"টাইমলাইন পাঠায়"| node_shotstack_api
node_shotstack_api -->|"ইনজেস্ট ও রেন্ডার"| node_shotstack
node_shotstack -.->|"রেন্ডার URL দেয়"| node_render_result
node_editor -->|"UI অনুবাদ"| node_i18n
node_editor -->|"প্রজেক্ট পড়ে/লেখে"| node_project_storage

click node_editor "https://github.com/salimtech353/reels_factory/blob/main/app.js"
click node_transcription "https://github.com/salimtech353/reels_factory/blob/main/app.js"
click node_keyword_ui "https://github.com/salimtech353/reels_factory/blob/main/app.js"
click node_i18n "https://github.com/salimtech353/reels_factory/blob/main/i18n.js"
click node_keyword_api "https://github.com/salimtech353/reels_factory/blob/main/functions/api/keywords.js"
click node_picker "https://github.com/salimtech353/reels_factory/blob/main/app.js"
click node_search_api "https://github.com/salimtech353/reels_factory/blob/main/functions/api/search-media.js"
click node_timeline "https://github.com/salimtech353/reels_factory/blob/main/app.js"
click node_shotstack_api "https://github.com/salimtech353/reels_factory/blob/main/functions/api/shotstack.js"
click node_render_result "https://github.com/salimtech353/reels_factory/blob/main/app.js"
click node_project_storage "https://github.com/salimtech353/reels_factory/blob/main/app.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_editor,node_transcription,node_keyword_ui,node_i18n,node_project_storage toneBlue
class node_picker toneAmber
class node_timeline,node_render_result toneMint
class node_keyword_api,node_groq,node_openrouter,node_search_api,node_pexels,node_pixabay,node_shotstack_api,node_shotstack toneRose
class node_user toneIndigo
```

## Components

### স্ক্রিপ্ট ও দৃশ্য

- [স্ক্রিপ্ট সম্পাদক](https://github.com/salimtech353/reels_factory/blob/main/app.js): `app.js`
- [অডিও ট্রান্সক্রিপশন](https://github.com/salimtech353/reels_factory/blob/main/app.js): `app.js`
- [দৃশ্য বিশ্লেষণ](https://github.com/salimtech353/reels_factory/blob/main/app.js): `app.js`
- [ভাষা ও UI লেখা](https://github.com/salimtech353/reels_factory/blob/main/i18n.js): `i18n.js`
- [প্রজেক্ট সংরক্ষণ](https://github.com/salimtech353/reels_factory/blob/main/app.js): `app.js`

### মিডিয়া অনুসন্ধান

- [মিডিয়া বাছাই](https://github.com/salimtech353/reels_factory/blob/main/app.js): `app.js`

### রেন্ডার ও ফল

- [টাইমলাইন প্রস্তুতি](https://github.com/salimtech353/reels_factory/blob/main/app.js): `app.js`
- [ভিডিও প্রিভিউ ও ডাউনলোড](https://github.com/salimtech353/reels_factory/blob/main/app.js): `app.js`

### API সেবা

- [কিওয়ার্ড API](https://github.com/salimtech353/reels_factory/blob/main/functions/api/keywords.js): `functions/api/keywords.js`
- **Groq**
- **OpenRouter**
- [মিডিয়া সার্চ API](https://github.com/salimtech353/reels_factory/blob/main/functions/api/search-media.js): `functions/api/search-media.js`
- **Pexels**
- **Pixabay**
- [Shotstack API](https://github.com/salimtech353/reels_factory/blob/main/functions/api/shotstack.js): `functions/api/shotstack.js`
- **Shotstack ক্লাউড**

### Other components

- **ভিডিও নির্মাতা**

## Connections

- ভিডিও নির্মাতা → স্ক্রিপ্ট সম্পাদক: লিখে ও সম্পাদনা (evidence: `README.md`)
- ভিডিও নির্মাতা → অডিও ট্রান্সক্রিপশন: অডিও দেয় (evidence: `README.md`)
- স্ক্রিপ্ট সম্পাদক → দৃশ্য বিশ্লেষণ: দৃশ্য বিশ্লেষণ (evidence: `app.js`)
- দৃশ্য বিশ্লেষণ → কিওয়ার্ড API: কিওয়ার্ড চায়
- কিওয়ার্ড API → Groq: বিশ্লেষণ করে (evidence: `functions/api/keywords.js`)
- কিওয়ার্ড API → OpenRouter: ফলব্যাক করে (evidence: `functions/api/keywords.js`)
- ভিডিও নির্মাতা → মিডিয়া বাছাই: মিডিয়া বেছে (evidence: `README.md`)
- মিডিয়া বাছাই → মিডিয়া সার্চ API: সার্চ চায়
- মিডিয়া সার্চ API → Pexels: খোঁজে (evidence: `functions/api/search-media.js`)
- মিডিয়া সার্চ API → Pixabay: খোঁজে (evidence: `functions/api/search-media.js`)
- ভিডিও নির্মাতা → টাইমলাইন প্রস্তুতি: রেন্ডার শুরু (evidence: `README.md`)
- টাইমলাইন প্রস্তুতি → Shotstack API: টাইমলাইন পাঠায়
- Shotstack API → Shotstack ক্লাউড: ইনজেস্ট ও রেন্ডার (evidence: `functions/api/shotstack.js`)
- Shotstack ক্লাউড → ভিডিও প্রিভিউ ও ডাউনলোড: রেন্ডার URL দেয়
- স্ক্রিপ্ট সম্পাদক → ভাষা ও UI লেখা: UI অনুবাদ (evidence: `app.js`)
- স্ক্রিপ্ট সম্পাদক → প্রজেক্ট সংরক্ষণ: প্রজেক্ট পড়ে/লেখে (evidence: `app.js`)
