# badhanroy/bangla-byte architecture

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

- Interactive diagram: https://gitdiagram.com/badhanroy/bangla-byte
- Repository: https://github.com/badhanroy/bangla-byte

## Overview

Bangla Byte is a student-focused competitive-programming learning platform, with Bengali-language learning features alongside problem solving, contests, and coding practice. The principal documented path is account creation, choosing a problem, writing and running code, and reviewing the result. The repository also contains an online judge, admin problem-management pages, error-finding quizzes, a sorting visualizer, and 1v1 coding battles. The excerpts show some implementation details, but not all page-to-page wiring; uncertain links are omitted.

Main entry points: [`index.php`](https://github.com/badhanroy/bangla-byte/blob/main/index.php) (Platform home), [`1v1/coding_room.php`](https://github.com/badhanroy/bangla-byte/blob/main/1v1/coding_room.php) (Coding room), [`online-judge/index.php`](https://github.com/badhanroy/bangla-byte/blob/main/online-judge/index.php) (Published problems), [`online-judge/submit.php`](https://github.com/badhanroy/bangla-byte/blob/main/online-judge/submit.php) (Code submission)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and accounts"]
  node_home["Platform home<br/>[index.php]"]
  node_register["Registration<br/>[register.php]"]
  node_login["Login<br/>[login.php]"]
  node_profile["Profile editing<br/>[edit_profile.php]"]
end

subgraph group_judge["Problem solving"]
  node_problem_list["Published problems<br/>[index.php]"]
  node_problem_detail["Problem details<br/>[view_problem.php]"]
  node_submission["Code submission<br/>[submit.php]"]
end

subgraph group_learning["Learning tools"]
  node_error_quiz["Error-finding quiz<br/>[index.php]"]
  node_quiz_content["Quiz problems<br/>[problems.php]"]
  node_sorting_page["Sorting visualizer<br/>[index.php]"]
  node_sorting_logic["Sorting animations<br/>[script.js]"]
  node_sorting_algorithms["Sorting functions"]
end

subgraph group_battle["Coding battles"]
  node_battle_entry["Battle registration<br/>[index.php]"]
  node_battle_room["Coding room<br/>[coding_room.php]"]
  node_battle_compiler["Battle compiler<br/>[compiler.php]"]
end

subgraph group_admin["Administration"]
  node_admin_problems["Problem management<br/>[index.php]"]
  node_admin_publish["Problem publishing"]
  node_admin_submissions["Submission review<br/>[list.php]"]
  node_admin_users["User management<br/>[list.php]"]
end

node_student(("Student"))
node_db[("Platform database")]
node_python["Python runtime"]

node_student -->|"opens"| node_home
node_home -->|"offers signup"| node_register
node_home -->|"offers login"| node_login
node_home -->|"links quiz"| node_error_quiz
node_register -->|"creates account"| node_db
node_login -->|"checks credentials"| node_db
node_profile -->|"updates profile"| node_db
node_student -->|"browses problems"| node_problem_list
node_problem_list -->|"reads published"| node_db
node_problem_list -->|"opens problem"| node_problem_detail
node_problem_detail -->|"submits code"| node_submission
node_submission -->|"loads test data"| node_db
node_submission -->|"executes code"| node_python
node_admin_problems -->|"reads problems"| node_db
node_admin_publish -->|"publishes problems"| node_db
node_admin_submissions -->|"reviews submissions"| node_db
node_admin_users -->|"manages users"| node_db
node_error_quiz -->|"loads questions"| node_quiz_content
node_sorting_page -->|"loads interactions"| node_sorting_logic
node_sorting_page -->|"loads functions"| node_sorting_algorithms
node_student -->|"joins battle"| node_battle_entry
node_battle_entry -->|"registers user"| node_db
node_battle_room -->|"includes compiler"| node_battle_compiler
node_battle_room -->|"runs test cases"| node_python
node_battle_room -->|"stores results"| node_db

click node_home "https://github.com/badhanroy/bangla-byte/blob/main/index.php"
click node_register "https://github.com/badhanroy/bangla-byte/blob/main/register.php"
click node_login "https://github.com/badhanroy/bangla-byte/blob/main/login.php"
click node_profile "https://github.com/badhanroy/bangla-byte/blob/main/edit_profile.php"
click node_problem_list "https://github.com/badhanroy/bangla-byte/blob/main/online-judge/index.php"
click node_problem_detail "https://github.com/badhanroy/bangla-byte/blob/main/online-judge/view_problem.php"
click node_submission "https://github.com/badhanroy/bangla-byte/blob/main/online-judge/submit.php"
click node_admin_problems "https://github.com/badhanroy/bangla-byte/blob/main/admin/problems/index.php"
click node_admin_publish "https://github.com/badhanroy/bangla-byte/blob/main/admin/publish_problems.php"
click node_admin_submissions "https://github.com/badhanroy/bangla-byte/blob/main/admin/submissions/list.php"
click node_admin_users "https://github.com/badhanroy/bangla-byte/blob/main/admin/users/list.php"
click node_error_quiz "https://github.com/badhanroy/bangla-byte/blob/main/error-finding/index.php"
click node_quiz_content "https://github.com/badhanroy/bangla-byte/blob/main/error-finding/problems.php"
click node_sorting_page "https://github.com/badhanroy/bangla-byte/blob/main/visual/index.php"
click node_sorting_logic "https://github.com/badhanroy/bangla-byte/blob/main/visual/script.js"
click node_sorting_algorithms "https://github.com/badhanroy/bangla-byte/blob/main/visual/sorting_functions.php"
click node_battle_entry "https://github.com/badhanroy/bangla-byte/blob/main/1v1/index.php"
click node_battle_room "https://github.com/badhanroy/bangla-byte/blob/main/1v1/coding_room.php"
click node_battle_compiler "https://github.com/badhanroy/bangla-byte/blob/main/1v1/compiler.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_home,node_register,node_login,node_profile toneBlue
class node_problem_list,node_problem_detail,node_submission,node_db toneAmber
class node_error_quiz,node_quiz_content,node_sorting_page,node_sorting_logic,node_sorting_algorithms toneMint
class node_battle_entry,node_battle_room,node_battle_compiler toneRose
class node_admin_problems,node_admin_publish,node_admin_submissions,node_admin_users,node_student,node_python toneIndigo
```

## Components

### Entry and accounts

- [Platform home](https://github.com/badhanroy/bangla-byte/blob/main/index.php): `index.php`
- [Registration](https://github.com/badhanroy/bangla-byte/blob/main/register.php): `register.php`
- [Login](https://github.com/badhanroy/bangla-byte/blob/main/login.php): `login.php`
- [Profile editing](https://github.com/badhanroy/bangla-byte/blob/main/edit_profile.php): `edit_profile.php`

### Problem solving

- [Published problems](https://github.com/badhanroy/bangla-byte/blob/main/online-judge/index.php): `online-judge/index.php`
- [Problem details](https://github.com/badhanroy/bangla-byte/blob/main/online-judge/view_problem.php): `online-judge/view_problem.php`
- [Code submission](https://github.com/badhanroy/bangla-byte/blob/main/online-judge/submit.php): `online-judge/submit.php`

### Learning tools

- [Error-finding quiz](https://github.com/badhanroy/bangla-byte/blob/main/error-finding/index.php): `error-finding/index.php`
- [Quiz problems](https://github.com/badhanroy/bangla-byte/blob/main/error-finding/problems.php): `error-finding/problems.php`
- [Sorting visualizer](https://github.com/badhanroy/bangla-byte/blob/main/visual/index.php): `visual/index.php`
- [Sorting animations](https://github.com/badhanroy/bangla-byte/blob/main/visual/script.js): `visual/script.js`
- [Sorting functions](https://github.com/badhanroy/bangla-byte/blob/main/visual/sorting_functions.php): `visual/sorting_functions.php`

### Coding battles

- [Battle registration](https://github.com/badhanroy/bangla-byte/blob/main/1v1/index.php): `1v1/index.php`
- [Coding room](https://github.com/badhanroy/bangla-byte/blob/main/1v1/coding_room.php): `1v1/coding_room.php`
- [Battle compiler](https://github.com/badhanroy/bangla-byte/blob/main/1v1/compiler.php): `1v1/compiler.php`

### Administration

- [Problem management](https://github.com/badhanroy/bangla-byte/blob/main/admin/problems/index.php): `admin/problems/index.php`
- [Problem publishing](https://github.com/badhanroy/bangla-byte/blob/main/admin/publish_problems.php): `admin/publish_problems.php`
- [Submission review](https://github.com/badhanroy/bangla-byte/blob/main/admin/submissions/list.php): `admin/submissions/list.php`
- [User management](https://github.com/badhanroy/bangla-byte/blob/main/admin/users/list.php): `admin/users/list.php`

### Other components

- **Student**
- **Platform database**
- **Python runtime**

## Connections

- Student → Platform home: opens
- Platform home → Registration: offers signup
- Platform home → Login: offers login
- Platform home → Error-finding quiz: links quiz
- Registration → Platform database: creates account
- Login → Platform database: checks credentials
- Profile editing → Platform database: updates profile
- Student → Published problems: browses problems
- Published problems → Platform database: reads published
- Published problems → Problem details: opens problem
- Problem details → Code submission: submits code
- Code submission → Platform database: loads test data
- Code submission → Python runtime: executes code
- Problem management → Platform database: reads problems
- Problem publishing → Platform database: publishes problems
- Submission review → Platform database: reviews submissions
- User management → Platform database: manages users
- Error-finding quiz → Quiz problems: loads questions
- Sorting visualizer → Sorting animations: loads interactions
- Sorting visualizer → Sorting functions: loads functions
- Student → Battle registration: joins battle
- Battle registration → Platform database: registers user
- Coding room → Battle compiler: includes compiler
- Coding room → Python runtime: runs test cases
- Coding room → Platform database: stores results
