# ran28-p/business-learning-simulation- architecture

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

- Interactive diagram: https://gitdiagram.com/ran28-p/business-learning-simulation-
- Repository: https://github.com/ran28-p/business-learning-simulation-

## Overview

Portal Belajar is a static browser-based learning suite. The main user journey starts at the portal and leads into independent practice modules, where learners work through domain exercises and receive results; shared portal features provide authentication, progress views, and backup/export. The graph emphasizes the deeply evidenced Accounting and Excel runtimes while retaining README-documented SPT, SQL/Power Query, live-quiz, and teacher-analysis capabilities. Several latter modules are represented by their exact enclosing directories because their implementation was not sampled; their internal links are omitted rather than inferred.

Main entry points: [`apps/accounting/js/main.js`](https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/accounting/js/main.js) (Accounting Bootstrap), [`apps/excel/interactive/js/app.js`](https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/excel/interactive/js/app.js) (Excel Practice App), [`apps/sql-pq`](https://github.com/ran28-p/business-learning-simulation-/tree/main/apps/sql-pq) (SQL & Power Query Simulator), [`apps/accounting/js/accounting/engine.js`](https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/accounting/js/accounting/engine.js) (Accounting Cycle Engine)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_portal["Portal &amp; Progress"]
  node_portal_app["Portal Hub<br/>[portal.js]"]
  node_auth["Portal Authentication<br/>[auth.js]"]
  node_portal_progress["Progress Dashboard<br/>[portal-progress.js]"]
  node_shared_analytics["Learning Analytics"]
end

subgraph group_accounting["Accounting Simulator"]
  node_accounting_entry["Accounting Bootstrap<br/>[main.js]"]
  node_accounting_cycle["Accounting Cycle Engine<br/>[engine.js]"]
  node_accounting_core["Journal &amp; Ledger Core<br/>[core.js]"]
  node_accounting_statements["Statements &amp; Closing<br/>[statements.js]"]
  node_accounting_generator["Scenario Generation<br/>[index.js]"]
  node_accounting_validation["Work Validation"]
  node_accounting_scoring["Learning Scores<br/>[scoringEngine.js]"]
  node_accounting_ui["Accounting UI<br/>[ui.js]"]
  node_accounting_tax_ui["Invoice &amp; VAT UI<br/>[taxUI.js]"]
  node_accounting_tax_state["Tax Workspace State<br/>[taxState.js]"]
  node_accounting_tax_journal["Tax Journals &amp; VAT<br/>[journalEngine.js]"]
  node_accounting_tax_practice["Invoice Case Scoring<br/>[latihanEngine.js]"]
  node_accounting_storage[("Accounting Persistence<br/>[localStorage.js]")]
end

subgraph group_excel["Excel Practice"]
  node_excel_app["Excel Practice App<br/>[app.js]"]
  node_excel_engine["Spreadsheet Formula Engine"]
  node_excel_refs["Cell Reference Parser<br/>[refs.js]"]
  node_excel_exercises["Exercise Generators"]
  node_excel_workbook["Workbook Export"]
  node_excel_progress["Practice Progress"]
  node_excel_storage[("Excel Local Storage<br/>[storage-manager.js]")]
end

subgraph group_tax_spt["SPT &amp; Tax Career"]
  node_spt_suite["SPT, Forms &amp; Tax Career"]
  node_spt_tax_engine["SPT Tax Engine<br/>[tax-engine.js]"]
end

subgraph group_sql["SQL &amp; Power Query"]
  node_sql_suite["SQL &amp; Power Query Simulator"]
  node_sql_engine["SQL Query Engine<br/>[sql-engine.js]"]
  node_pq_engine["Power Query Engine"]
  node_sql_grading["Query Grading<br/>[grading-engine.js]"]
end

subgraph group_live_teaching["Live &amp; Teacher Tools"]
  node_game_hub["Live Quiz Hub"]
  node_livequiz_engine["Live Quiz Runtime<br/>[livequiz-engine.js]"]
  node_teacher_tools["Teacher File Analysis<br/>[app.js]"]
end

node_learner(("Learner"))

node_learner -->|"opens portal"| node_portal_app
node_portal_app -.->|"offers sign-in"| node_auth
node_learner -->|"opens simulator"| node_accounting_entry
node_accounting_entry -->|"initializes cycle"| node_accounting_cycle
node_accounting_entry -->|"initializes interface"| node_accounting_ui
node_accounting_entry -->|"initializes tax UI"| node_accounting_tax_ui
node_accounting_entry -->|"hydrates tax state"| node_accounting_tax_state
node_accounting_entry -->|"loads progress"| node_accounting_scoring
node_accounting_entry -->|"restores session"| node_accounting_storage
node_accounting_cycle -->|"delegates cycle"| node_accounting_core
node_accounting_cycle -->|"runs statements"| node_accounting_statements
node_accounting_core -->|"generates scenarios"| node_accounting_generator
node_accounting_validation -->|"checks submissions"| node_accounting_cycle
node_accounting_scoring -.->|"scores feedback"| node_accounting_validation
node_accounting_tax_ui -.->|"records tax journals"| node_accounting_tax_journal
node_accounting_tax_journal -->|"updates journal state"| node_accounting_tax_state
node_accounting_tax_ui -.->|"scores practice"| node_accounting_tax_practice
node_accounting_tax_state -->|"persists tax state"| node_accounting_storage
node_learner -->|"opens practice"| node_excel_app
node_excel_app -.->|"evaluates formulas"| node_excel_engine
node_excel_engine -->|"parses references"| node_excel_refs
node_excel_app -.->|"offers exercises"| node_excel_exercises
node_excel_app -.->|"exports workbook"| node_excel_workbook
node_excel_app -.->|"tracks practice"| node_excel_progress
node_excel_progress -->|"loads and saves"| node_excel_storage
node_excel_storage -.->|"stores locally"| node_excel_storage
node_learner -->|"opens tax simulator"| node_spt_suite
node_spt_suite -.->|"uses tax calculations"| node_spt_tax_engine
node_learner -->|"opens data practice"| node_sql_suite
node_sql_suite -.->|"runs SQL practice"| node_sql_engine
node_sql_suite -.->|"runs transformations"| node_pq_engine
node_sql_suite -.->|"grades queries"| node_sql_grading
node_learner -->|"joins live quiz"| node_game_hub
node_game_hub -.->|"uses quiz runtime"| node_livequiz_engine
node_learner -->|"analyzes recap file"| node_teacher_tools
node_learner -->|"views progress"| node_portal_progress
node_portal_progress -.->|"summarizes learning"| node_shared_analytics

click node_portal_app "https://github.com/ran28-p/business-learning-simulation-/blob/main/js/portal.js"
click node_auth "https://github.com/ran28-p/business-learning-simulation-/blob/main/js/auth.js"
click node_portal_progress "https://github.com/ran28-p/business-learning-simulation-/blob/main/js/portal-progress.js"
click node_shared_analytics "https://github.com/ran28-p/business-learning-simulation-/blob/main/js/shared/learning-analytics.js"
click node_accounting_entry "https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/accounting/js/main.js"
click node_accounting_cycle "https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/accounting/js/accounting/engine.js"
click node_accounting_core "https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/accounting/js/accounting/engine/core.js"
click node_accounting_statements "https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/accounting/js/accounting/engine/statements.js"
click node_accounting_generator "https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/accounting/js/generators/index.js"
click node_accounting_validation "https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/accounting/js/accounting/validationEngine.js"
click node_accounting_scoring "https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/accounting/js/business/scoringEngine.js"
click node_accounting_ui "https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/accounting/js/presentation/ui.js"
click node_accounting_tax_ui "https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/accounting/js/presentation/taxUI.js"
click node_accounting_tax_state "https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/accounting/js/tax/taxState.js"
click node_accounting_tax_journal "https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/accounting/js/tax/journalEngine.js"
click node_accounting_tax_practice "https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/accounting/js/tax/latihanEngine.js"
click node_accounting_storage "https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/accounting/js/storage/localStorage.js"
click node_excel_app "https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/excel/interactive/js/app.js"
click node_excel_engine "https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/excel/js/spreadsheet-engine.js"
click node_excel_refs "https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/excel/js/spreadsheet/refs.js"
click node_excel_exercises "https://github.com/ran28-p/business-learning-simulation-/tree/main/apps/excel/js/exercise"
click node_excel_workbook "https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/excel/js/export/exercise-workbook-writer.js"
click node_excel_progress "https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/excel/js/progress-manager.js"
click node_excel_storage "https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/excel/js/storage-manager.js"
click node_spt_suite "https://github.com/ran28-p/business-learning-simulation-/tree/main/apps/spt"
click node_spt_tax_engine "https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/spt/js/shared/tax-engine.js"
click node_sql_suite "https://github.com/ran28-p/business-learning-simulation-/tree/main/apps/sql-pq"
click node_sql_engine "https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/sql-pq/js/sql-engine.js"
click node_pq_engine "https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/sql-pq/js/powerquery-engine.js"
click node_sql_grading "https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/sql-pq/js/grading-engine.js"
click node_game_hub "https://github.com/ran28-p/business-learning-simulation-/tree/main/apps/game-hub"
click node_livequiz_engine "https://github.com/ran28-p/business-learning-simulation-/blob/main/js/shared/livequiz-engine.js"
click node_teacher_tools "https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/pengajar/js/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_portal_app,node_auth,node_portal_progress,node_shared_analytics toneBlue
class node_accounting_entry,node_accounting_cycle,node_accounting_core,node_accounting_statements,node_accounting_generator,node_accounting_validation,node_accounting_scoring,node_accounting_ui,node_accounting_tax_ui,node_accounting_tax_state,node_accounting_tax_journal,node_accounting_tax_practice,node_accounting_storage toneAmber
class node_excel_app,node_excel_engine,node_excel_refs,node_excel_exercises,node_excel_workbook,node_excel_progress,node_excel_storage toneMint
class node_spt_suite,node_spt_tax_engine toneRose
class node_sql_suite,node_sql_engine,node_pq_engine,node_sql_grading,node_learner toneIndigo
class node_game_hub,node_livequiz_engine,node_teacher_tools toneTeal
```

## Components

### Portal & Progress

- [Portal Hub](https://github.com/ran28-p/business-learning-simulation-/blob/main/js/portal.js): `js/portal.js`
- [Portal Authentication](https://github.com/ran28-p/business-learning-simulation-/blob/main/js/auth.js): `js/auth.js`
- [Progress Dashboard](https://github.com/ran28-p/business-learning-simulation-/blob/main/js/portal-progress.js): `js/portal-progress.js`
- [Learning Analytics](https://github.com/ran28-p/business-learning-simulation-/blob/main/js/shared/learning-analytics.js): `js/shared/learning-analytics.js`

### Accounting Simulator

- [Accounting Bootstrap](https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/accounting/js/main.js): `apps/accounting/js/main.js`
- [Accounting Cycle Engine](https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/accounting/js/accounting/engine.js): `apps/accounting/js/accounting/engine.js`
- [Journal & Ledger Core](https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/accounting/js/accounting/engine/core.js): `apps/accounting/js/accounting/engine/core.js`
- [Statements & Closing](https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/accounting/js/accounting/engine/statements.js): `apps/accounting/js/accounting/engine/statements.js`
- [Scenario Generation](https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/accounting/js/generators/index.js): `apps/accounting/js/generators/index.js`
- [Work Validation](https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/accounting/js/accounting/validationEngine.js): `apps/accounting/js/accounting/validationEngine.js`
- [Learning Scores](https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/accounting/js/business/scoringEngine.js): `apps/accounting/js/business/scoringEngine.js`
- [Accounting UI](https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/accounting/js/presentation/ui.js): `apps/accounting/js/presentation/ui.js`
- [Invoice & VAT UI](https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/accounting/js/presentation/taxUI.js): `apps/accounting/js/presentation/taxUI.js`
- [Tax Workspace State](https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/accounting/js/tax/taxState.js): `apps/accounting/js/tax/taxState.js`
- [Tax Journals & VAT](https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/accounting/js/tax/journalEngine.js): `apps/accounting/js/tax/journalEngine.js`
- [Invoice Case Scoring](https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/accounting/js/tax/latihanEngine.js): `apps/accounting/js/tax/latihanEngine.js`
- [Accounting Persistence](https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/accounting/js/storage/localStorage.js): `apps/accounting/js/storage/localStorage.js`

### Excel Practice

- [Excel Practice App](https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/excel/interactive/js/app.js): `apps/excel/interactive/js/app.js`
- [Spreadsheet Formula Engine](https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/excel/js/spreadsheet-engine.js): `apps/excel/js/spreadsheet-engine.js`
- [Cell Reference Parser](https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/excel/js/spreadsheet/refs.js): `apps/excel/js/spreadsheet/refs.js`
- [Exercise Generators](https://github.com/ran28-p/business-learning-simulation-/tree/main/apps/excel/js/exercise): `apps/excel/js/exercise`
- [Workbook Export](https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/excel/js/export/exercise-workbook-writer.js): `apps/excel/js/export/exercise-workbook-writer.js`
- [Practice Progress](https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/excel/js/progress-manager.js): `apps/excel/js/progress-manager.js`
- [Excel Local Storage](https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/excel/js/storage-manager.js): `apps/excel/js/storage-manager.js`

### SPT & Tax Career

- [SPT, Forms & Tax Career](https://github.com/ran28-p/business-learning-simulation-/tree/main/apps/spt): `apps/spt`
- [SPT Tax Engine](https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/spt/js/shared/tax-engine.js): `apps/spt/js/shared/tax-engine.js`

### SQL & Power Query

- [SQL & Power Query Simulator](https://github.com/ran28-p/business-learning-simulation-/tree/main/apps/sql-pq): `apps/sql-pq`
- [SQL Query Engine](https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/sql-pq/js/sql-engine.js): `apps/sql-pq/js/sql-engine.js`
- [Power Query Engine](https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/sql-pq/js/powerquery-engine.js): `apps/sql-pq/js/powerquery-engine.js`
- [Query Grading](https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/sql-pq/js/grading-engine.js): `apps/sql-pq/js/grading-engine.js`

### Live & Teacher Tools

- [Live Quiz Hub](https://github.com/ran28-p/business-learning-simulation-/tree/main/apps/game-hub): `apps/game-hub`
- [Live Quiz Runtime](https://github.com/ran28-p/business-learning-simulation-/blob/main/js/shared/livequiz-engine.js): `js/shared/livequiz-engine.js`
- [Teacher File Analysis](https://github.com/ran28-p/business-learning-simulation-/blob/main/apps/pengajar/js/app.js): `apps/pengajar/js/app.js`

### Other components

- **Learner**

## Connections

- Learner → Portal Hub: opens portal (evidence: `README.md`)
- Portal Hub → Portal Authentication: offers sign-in (evidence: `README.md`)
- Learner → Accounting Bootstrap: opens simulator (evidence: `README.md`)
- Accounting Bootstrap → Accounting Cycle Engine: initializes cycle (evidence: `apps/accounting/js/main.js`)
- Accounting Bootstrap → Accounting UI: initializes interface (evidence: `apps/accounting/js/main.js`)
- Accounting Bootstrap → Invoice & VAT UI: initializes tax UI (evidence: `apps/accounting/js/main.js`)
- Accounting Bootstrap → Tax Workspace State: hydrates tax state (evidence: `apps/accounting/js/main.js`)
- Accounting Bootstrap → Learning Scores: loads progress (evidence: `apps/accounting/js/main.js`)
- Accounting Bootstrap → Accounting Persistence: restores session (evidence: `apps/accounting/js/main.js`)
- Accounting Cycle Engine → Journal & Ledger Core: delegates cycle (evidence: `apps/accounting/js/accounting/engine.js`)
- Accounting Cycle Engine → Statements & Closing: runs statements (evidence: `apps/accounting/js/accounting/engine.js`)
- Journal & Ledger Core → Scenario Generation: generates scenarios (evidence: `apps/accounting/js/accounting/engine/core.js`)
- Work Validation → Accounting Cycle Engine: checks submissions (evidence: `apps/accounting/js/accounting/validationEngine.js`)
- Learning Scores → Work Validation: scores feedback
- Invoice & VAT UI → Tax Journals & VAT: records tax journals
- Tax Journals & VAT → Tax Workspace State: updates journal state (evidence: `apps/accounting/js/tax/journalEngine.js`)
- Invoice & VAT UI → Invoice Case Scoring: scores practice
- Tax Workspace State → Accounting Persistence: persists tax state (evidence: `apps/accounting/js/tax/taxState.js`)
- Learner → Excel Practice App: opens practice (evidence: `README.md`)
- Excel Practice App → Spreadsheet Formula Engine: evaluates formulas
- Spreadsheet Formula Engine → Cell Reference Parser: parses references (evidence: `apps/excel/js/spreadsheet-engine.js`)
- Excel Practice App → Exercise Generators: offers exercises
- Excel Practice App → Workbook Export: exports workbook
- Excel Practice App → Practice Progress: tracks practice
- Practice Progress → Excel Local Storage: loads and saves (evidence: `apps/excel/js/progress-manager.js`)
- Excel Local Storage → Excel Local Storage: stores locally (evidence: `apps/excel/js/storage-manager.js`)
- Learner → SPT, Forms & Tax Career: opens tax simulator (evidence: `README.md`)
- SPT, Forms & Tax Career → SPT Tax Engine: uses tax calculations
- Learner → SQL & Power Query Simulator: opens data practice (evidence: `README.md`)
- SQL & Power Query Simulator → SQL Query Engine: runs SQL practice
- SQL & Power Query Simulator → Power Query Engine: runs transformations
- SQL & Power Query Simulator → Query Grading: grades queries
- Learner → Live Quiz Hub: joins live quiz (evidence: `README.md`)
- Live Quiz Hub → Live Quiz Runtime: uses quiz runtime
- Learner → Teacher File Analysis: analyzes recap file (evidence: `README.md`)
- Learner → Progress Dashboard: views progress (evidence: `README.md`)
- Progress Dashboard → Learning Analytics: summarizes learning
